@@ -9427,6 +9427,8 @@ void VPWidenLoadRecipe::execute(VPTransformState &State) {
9427
9427
}
9428
9428
}
9429
9429
9430
+ // / Use all-true mask for reverse rather than actual mask, as it avoids a
9431
+ // / dependence w/o affecting the result.
9430
9432
static Instruction *createReverseEVL (IRBuilderBase &Builder, Value *Operand,
9431
9433
Value *EVL, const Twine &Name) {
9432
9434
VectorType *ValTy = cast<VectorType>(Operand->getType ());
@@ -9474,11 +9476,8 @@ void VPWidenLoadEVLRecipe::execute(VPTransformState &State) {
9474
9476
0 , Attribute::getWithAlignment (NewLI->getContext (), Alignment));
9475
9477
State.addMetadata (NewLI, LI);
9476
9478
Instruction *Res = NewLI;
9477
- if (isReverse ()) {
9478
- // Use cheap all-true mask for reverse rather than actual mask, it does not
9479
- // affect the result.
9479
+ if (isReverse ())
9480
9480
Res = createReverseEVL (Builder, Res, EVL, " vp.reverse" );
9481
- }
9482
9481
State.set (this , Res, 0 );
9483
9482
}
9484
9483
@@ -9537,11 +9536,8 @@ void VPWidenStoreEVLRecipe::execute(VPTransformState &State) {
9537
9536
CallInst *NewSI = nullptr ;
9538
9537
Value *StoredVal = State.get (StoredValue, 0 );
9539
9538
Value *EVL = State.get (getEVL (), VPIteration (0 , 0 ));
9540
- if (isReverse ()) {
9541
- // Use cheap all-true mask for reverse rather than actual mask, it does not
9542
- // affect the result.
9539
+ if (isReverse ())
9543
9540
StoredVal = createReverseEVL (Builder, StoredVal, EVL, " vp.reverse" );
9544
- }
9545
9541
Value *Mask = nullptr ;
9546
9542
if (VPValue *VPMask = getMask ()) {
9547
9543
Mask = State.get (VPMask, 0 );
0 commit comments