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

Alexey Bataev via llvm-commits llvm-commits at lists.llvm.org
Thu May 2 17:32:30 PDT 2024


================
@@ -9383,12 +9377,17 @@ void VPWidenLoadRecipe::execute(VPTransformState &State) {
   }
 }
 
+static Value *reverseMask(IRBuilderBase &Builder, Value *Mask, Value *EVL,
+                          Value *AllTrueMask) {
----------------
alexey-bataev wrote:

1.
> As noted, it's "Unclear if/when "masked reverse" should be used, when reversing masked operands", i.e., where - for which reverses, if any? - all-true would not be good enough.

The reversing of the values in registers is safe (the actual length of the reversed data is controlled by EVL, we just cut extra unused lanes, because of that we can safely use all-true mask). Does it answer your question?

2. Added createReverseEVL and used it.

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


More information about the llvm-commits mailing list