[PATCH] D64911: [AMDGPU] Extend the SI Load/Store optimizer
Nicolai Hähnle via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon Oct 14 09:38:43 PDT 2019
nhaehnle added inline comments.
================
Comment at: lib/Target/AMDGPU/SILoadStoreOptimizer.cpp:322-325
+ if (AMDGPU::getNamedOperandIdx(Opc, AMDGPU::OpName::vaddr) == -1)
+ return UNKNOWN;
+ if (!TII.get(Opc).mayLoad() || TII.isGather4(Opc))
+ return UNKNOWN;
----------------
piotr wrote:
> nhaehnle wrote:
> > This should probably check mayStore instead of mayLoad: we want to exclude both stores and atomics.
> >
> > You could also move the check for TFE and LWE to here.
> Good point about atomics, I added the condition to bail out on mayStore()). I am keeping !mayLoad() to avoid merging IMAGE_GET_RESINFO.
>
> For TFE/LWE I would like to keep the checks where they are, because I dislike extending getInstClass() with Instruction argument, and it would be necessary to query the actual value of TFE/LWE.
Can IMAGE_GET_RESINFO not be merged? I would kind of expect it can...
Fair point about TFE/LWE.
Repository:
rL LLVM
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D64911/new/
https://reviews.llvm.org/D64911
More information about the llvm-commits
mailing list