[llvm] [LV][EVL]Support reversed loads/stores. (PR #88025)
via llvm-commits
llvm-commits at lists.llvm.org
Thu May 2 16:53:08 PDT 2024
================
@@ -9383,12 +9377,17 @@ void VPWidenLoadRecipe::execute(VPTransformState &State) {
}
}
+static Value *reverseMask(IRBuilderBase &Builder, Value *Mask, Value *EVL,
+ Value *AllTrueMask) {
----------------
ayalz wrote:
>> Should the above reverse of the loaded values use the partial mask of these values, rather than an all-true mask?
>>
>> Should the above reverse of the to-be-stored values use the partial mask of these values, rather than an all-true mask?
>
> Not necessary, all-true is good enough here, real mask just increases pressure on mask register with no effect
Worth a comment that the real mask is being optimized away _here_ by a cheaper AllTrueMask.
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.
Would it be better to have `createReverseEVL(IRBuilderBase &Builder, Value *Operand, Value *EVL, const Twine &Name)` generate an `experimental_vp_reverse` for masks and values alike, also filling-in the optimized-out AllTrueMask?
https://github.com/llvm/llvm-project/pull/88025
More information about the llvm-commits
mailing list