Skip to content

Commit 736210d

Browse files
committed
patch planContainsAdditionalSimplifications
1 parent 5d99c2e commit 736210d

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
@@ -6964,6 +6964,12 @@ static bool planContainsAdditionalSimplifications(VPlan &Plan,
69646964
RepR->getUnderlyingInstr(), VF))
69656965
return true;
69666966
}
6967+
6968+
// The strided load is transformed from a gather through VPlanTransform,
6969+
// and its cost will be lower than the original gather.
6970+
if (isa<VPWidenStridedLoadRecipe>(&R))
6971+
return true;
6972+
69676973
if (Instruction *UI = GetInstructionForCost(&R)) {
69686974
// If we adjusted the predicate of the recipe, the cost in the legacy
69696975
// cost model may be different.

0 commit comments

Comments
 (0)