[llvm] [LV][EVL]Support reversed loads/stores. (PR #88025)
Florian Hahn via llvm-commits
llvm-commits at lists.llvm.org
Fri May 3 01:44:58 PDT 2024
================
@@ -9478,10 +9486,18 @@ void VPWidenStoreEVLRecipe::execute(VPTransformState &State) {
CallInst *NewSI = nullptr;
Value *StoredVal = State.get(StoredValue, 0);
Value *EVL = State.get(getEVL(), VPIteration(0, 0));
- // FIXME: Support reverse store after vp_reverse is added.
- Value *Mask = getMask()
- ? State.get(getMask(), 0)
- : Builder.CreateVectorSplat(State.VF, Builder.getTrue());
+ if (isReverse())
+ // Use cheap all-true mask for reverse rather than actual mask, it does not
+ // affect the result.
+ StoredVal = createReverseEVL(Builder, StoredVal, EVL, "vp.reverse");
+ Value *Mask = nullptr;
+ if (getMask()) {
----------------
fhahn wrote:
```suggestion
if (VPValue *VPMask = getMask()) {
Mask = State.get(VPMask, 0);
```
https://github.com/llvm/llvm-project/pull/88025
More information about the llvm-commits
mailing list