This is an archive of the discontinued LLVM Phabricator instance.

CodeGen: Fix pointer info in expandUnalignedLoad/Store
ClosedPublic

Authored by yaxunl on Jul 13 2017, 9:26 AM.

Details

Summary

Currently expandUnalignedLoad/Store uses place holder pointer info for temporary memory operand
in stack, which does not have correct address space. This causes unaligned private double16 load/store to be
lowered to flat_load instead of buffer_load for amdgcn target.

This fixes failures of OpenCL conformance test basic/vload_private/vstore_private on target amdgcn---amdgizcl.

Diff Detail

Event Timeline

yaxunl created this revision.Jul 13 2017, 9:26 AM
arsenm edited edge metadata.Jul 13 2017, 2:22 PM

Repeat of D35089?

Repeat of D35089?

TargetLowering::expandUnalignedLoad part is not covered by D35089. I am going to rebase my change after D35089 is committed.

yaxunl retitled this revision from CodeGen: Fix address space of MachineMemOperand to CodeGen: Fix pointer info in expandUnalignedLoad.Jul 13 2017, 5:47 PM
yaxunl edited the summary of this revision. (Show Details)
arsenm added inline comments.Jul 13 2017, 6:07 PM
lib/CodeGen/SelectionDAG/TargetLowering.cpp
3556

Declaring these as stack accesses with a specific offset is broken. These need to use the created frame index

yaxunl updated this revision to Diff 112361.Aug 23 2017, 7:05 AM

Use frame index in the pointer info.

yaxunl updated this revision to Diff 116480.Sep 24 2017, 6:14 AM
yaxunl retitled this revision from CodeGen: Fix pointer info in expandUnalignedLoad to CodeGen: Fix pointer info in expandUnalignedLoad/Store.
yaxunl edited the summary of this revision. (Show Details)

Rebased to ToT.

yaxunl marked an inline comment as done.Sep 24 2017, 6:15 AM
yaxunl added inline comments.
lib/CodeGen/SelectionDAG/TargetLowering.cpp
3556

Fixed.

yaxunl marked an inline comment as done.Sep 29 2017, 11:07 AM

ping.

rampitec added inline comments.Sep 29 2017, 11:44 AM
test/CodeGen/AMDGPU/load-private-double16-amdgiz.ll
6

Please add -check-prefix=GCN and change CHECK with GCN.
Also please move check strings right below corresponding CHECK-LABEL.

yaxunl updated this revision to Diff 117198.Sep 29 2017, 12:16 PM
yaxunl marked an inline comment as done.

Revised by Stas' comments.

This revision is now accepted and ready to land.Sep 29 2017, 12:17 PM
This revision was automatically updated to reflect the committed changes.