Skip to content

Commit 17ad848

Browse files
committed
[VPlan] Convert redundant isSingleScalar check into assert (NFC).
Follow-up to post-commit suggestion in #165506. C must be a single-scalar, turn check into assert.
1 parent 973b173 commit 17ad848

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

llvm/lib/Transforms/Vectorize/VPlanTransforms.cpp

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1288,8 +1288,9 @@ static void simplifyRecipe(VPSingleDefRecipe *Def, VPTypeAnalysis &TypeInfo) {
12881288
// Look through broadcast of single-scalar when used as select conditions; in
12891289
// that case the scalar condition can be used directly.
12901290
if (match(Def,
1291-
m_Select(m_Broadcast(m_VPValue(C)), m_VPValue(), m_VPValue())) &&
1292-
vputils::isSingleScalar(C)) {
1291+
m_Select(m_Broadcast(m_VPValue(C)), m_VPValue(), m_VPValue()))) {
1292+
assert(vputils::isSingleScalar(C) &&
1293+
"broadcast operand must be single-scalar");
12931294
Def->setOperand(0, C);
12941295
return;
12951296
}

0 commit comments

Comments
 (0)