Skip to content

Commit 8d98c01

Browse files
committed
patch planContainsAdditionalSimplifications
1 parent 75bd781 commit 8d98c01

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

llvm/lib/Transforms/Vectorize/LoopVectorize.cpp

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6941,6 +6941,12 @@ static bool planContainsAdditionalSimplifications(VPlan &Plan,
69416941
RepR->getUnderlyingInstr(), VF))
69426942
return true;
69436943
}
6944+
6945+
// The strided load is transformed from a gather through VPlanTransform,
6946+
// and its cost will be lower than the original gather.
6947+
if (isa<VPWidenStridedLoadRecipe>(&R))
6948+
return true;
6949+
69446950
if (Instruction *UI = GetInstructionForCost(&R)) {
69456951
// If we adjusted the predicate of the recipe, the cost in the legacy
69466952
// cost model may be different.

0 commit comments

Comments
 (0)