[PATCH] D66958: [AMDGPU] Enable constant offset promotion to immediate operand for VMEM stores
Stanislav Mekhanoshin via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed Sep 4 15:23:45 PDT 2019
rampitec added inline comments.
================
Comment at: lib/Target/AMDGPU/SILoadStoreOptimizer.cpp:1326
- // TODO: Support Store.
- if (!MI.mayLoad())
+ if (MI.mayLoad() && TII->getNamedOperand(MI, AMDGPU::OpName::vdata) != NULL)
return false;
----------------
vpykhtin wrote:
> rampitec wrote:
> > rampitec wrote:
> > > nullptr or !TII->getNamedOperand()
> > Stores also have vdata, aren't they?
> this was done to save the original semantic for mayLoad checks, I'm not sure why it is used.
What will happen it you remove mayLoad() from this condition? I think it will still work as expected.
================
Comment at: test/CodeGen/AMDGPU/promote-constOffset-to-imm.mir:194
+# GFX9-LABEL: name: diffoporder_add_store
+# GFX9: GLOBAL_STORE_DWORD %{{[0-9]+}}, %0.sub0, 1000, 0, 0, 0
+# GFX9: GLOBAL_STORE_DWORD %{{[0-9]+}}, %0.sub1, 0, 0, 0, 0
----------------
vpykhtin wrote:
> rampitec wrote:
> > Needs test where stores are actually combined.
> I'm not sure what do you mean, this is about address offset promotion, in this sence it is combined.
I see, that is constant promotion, not the combining.
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D66958/new/
https://reviews.llvm.org/D66958
More information about the llvm-commits
mailing list