[PATCH] D64911: [AMDGPU] Extend the SI Load/Store optimizer
Piotr Sobczak via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Fri Oct 11 07:08:27 PDT 2019
piotr marked 2 inline comments as done.
piotr 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;
----------------
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.
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