Page MenuHomePhabricator

AMDGPU/SI: Don't promote alloca to vector for AddrSpaceCast instruction.

Authored by cfang on Apr 23 2018, 3:01 PM.

Diff Detail


Event Timeline

cfang created this revision.Apr 23 2018, 3:01 PM

Needs tests

cfang updated this revision to Diff 143832.Apr 24 2018, 4:15 PM

Add a test.

yaxunl added inline comments.Apr 24 2018, 6:10 PM
25 ↗(On Diff #143832)

address space 4 is constant address space. Do you intend to cast %tmp to generic address space? If so, you should use the default address space (0) since that is generic address space.

cfang updated this revision to Diff 143952.Apr 25 2018, 10:08 AM

Fix addrspacecast in the test since generic address space is 0 (default) now. Thanks, Sam!

cfang added a comment.Apr 26 2018, 1:46 PM

What do you think of the test? Thanks;

cfang updated this revision to Diff 144933.May 2 2018, 2:40 PM

Update the test:

  1. correct a few wrong checking;
  2. Remove the -amdgiz from the triple since it is no longer necessary;
  3. Add "-data-layout=A5" to explicitly specify the data layout for address space 5 for alloca
    • and to remove the "target:" line for the same data layout purpose.
arsenm accepted this revision.May 10 2018, 5:11 AM


This revision is now accepted and ready to land.May 10 2018, 5:11 AM
This revision was automatically updated to reflect the committed changes.