[PATCH] D120279: [AMDGPU] Extend SILoadStoreOptimizer to handle global loads

Stanislav Mekhanoshin via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Feb 21 13:23:40 PST 2022


rampitec created this revision.
rampitec added a reviewer: foad.
Herald added subscribers: kerbowa, hiraditya, t-tye, tpr, dstuttard, yaxunl, nhaehnle, jvesely, kzhuravl, arsenm.
rampitec requested review of this revision.
Herald added a subscriber: wdng.
Herald added a project: LLVM.

There can be sitaions where global and flat loads and stores are not
combined by the vectorizer, in particular if their address space
differ in th IR but they end up the same class instructions after
selection. For example a divergent load from constant address space
ends up being the same global_load as a load from global address space.

TODO: merge global stores.
TODO: handle SADDR forms.
TODO: merge flat load/stores.
TODO: merge flat with global promoting to flat.


https://reviews.llvm.org/D120279

Files:
  llvm/lib/Target/AMDGPU/SILoadStoreOptimizer.cpp
  llvm/test/CodeGen/AMDGPU/memcpy-fixed-align.ll
  llvm/test/CodeGen/AMDGPU/merge-global-load-store.mir
  llvm/test/CodeGen/AMDGPU/promote-kernel-arguments.ll

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D120279.410377.patch
Type: text/x-patch
Size: 22922 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20220221/2cba1ef0/attachment.bin>


More information about the llvm-commits mailing list