Skip to content

Commit 2a014b9

Browse files
committed
[VPlan] Mark Scalar instruction as not predicated
For instruction that is still scalar after vectorization, mark it as not predicated. Fixes #94328
1 parent 0c5319e commit 2a014b9

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

llvm/lib/Transforms/Vectorize/LoopVectorize.cpp

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8326,7 +8326,11 @@ VPReplicateRecipe *VPRecipeBuilder::handleReplication(Instruction *I,
83268326
[&](ElementCount VF) { return CM.isUniformAfterVectorization(I, VF); },
83278327
Range);
83288328

8329-
bool IsPredicated = CM.isPredicatedInst(I);
8329+
bool IsPredicated = LoopVectorizationPlanner::getDecisionAndClampRange(
8330+
[&](ElementCount VF) {
8331+
return CM.isPredicatedInst(I) && !CM.isScalarAfterVectorization(I, VF);
8332+
},
8333+
Range);
83308334

83318335
// Even if the instruction is not marked as uniform, there are certain
83328336
// intrinsic calls that can be effectively treated as such, so we check for

0 commit comments

Comments
 (0)