[PATCH] D121371: [AMDGPUPromoteAlloca] Make compatible with opaque pointers

Nikita Popov via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Mar 10 03:56:41 PST 2022


nikic created this revision.
nikic added reviewers: arsenm, rampitec, opaque-pointers.
Herald added subscribers: foad, dexonsmith, kerbowa, hiraditya, t-tye, tpr, dstuttard, yaxunl, nhaehnle, jvesely, kzhuravl.
Herald added a project: All.
nikic requested review of this revision.
Herald added subscribers: llvm-commits, wdng.
Herald added a project: LLVM.

This mainly changes the handling of bitcasts to not check the types being casted from/to -- we should only care about the actual load/store types. The GEP handling is also changed to not care about types, and just make sure that we get an offset corresponding to a vector element.

This was a bit of a struggle for me, because this code seems to be pretty sensitive to small changes. The end result seems to produce strictly better results for the existing test coverage though, because we can now deal with more situations involving bitcasts.


https://reviews.llvm.org/D121371

Files:
  llvm/lib/Target/AMDGPU/AMDGPUPromoteAlloca.cpp
  llvm/test/CodeGen/AMDGPU/promote-alloca-array-aggregate.ll
  llvm/test/CodeGen/AMDGPU/vector-alloca-bitcast.ll
  llvm/test/CodeGen/AMDGPU/vector-alloca.ll

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D121371.414334.patch
Type: text/x-patch
Size: 18052 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20220310/3fe8498f/attachment.bin>


More information about the llvm-commits mailing list