[llvm] [LV][EVL]Support reversed loads/stores. (PR #88025)

Florian Hahn via llvm-commits llvm-commits at lists.llvm.org
Wed Apr 17 03:32:49 PDT 2024


================
@@ -9460,11 +9466,20 @@ void VPWidenMemoryInstructionRecipe::execute(VPTransformState &State) {
         // is created only if TTI prefers predicated vectorization, thus if EVL
         // is not nullptr it also implies preference for predicated
         // vectorization.
-        // FIXME: Support reverse store after vp_reverse is added.
         Value *MaskPart = isMaskRequired ? BlockInMaskParts[Part] : nullptr;
+        if (isMaskRequired && isReverse() && !getMask()->isLiveIn()) {
----------------
fhahn wrote:

IIUC the check for `getMask()->isLiveIn()` here is to avoid reversing all-true masks? If that's the case, better check explicitly for that; the live-in doesn't necessarily imply a splatted constant; could theoretically be a VPValue without underlying IR value or a vector value/constant, which would still need reversing?

https://github.com/llvm/llvm-project/pull/88025


More information about the llvm-commits mailing list