Skip to content

Commit 9c1e6c4

Browse files
committed
[VPlan] Improve code using VPlan::getFalse (NFC)
1 parent f3f9e7b commit 9c1e6c4

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

llvm/lib/Transforms/Vectorize/VPlanTransforms.cpp

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1110,8 +1110,7 @@ static void simplifyRecipe(VPRecipeBase &R, VPTypeAnalysis &TypeInfo) {
11101110

11111111
// x && !x -> 0
11121112
if (match(&R, m_LogicalAnd(m_VPValue(X), m_Not(m_Deferred(X)))))
1113-
return Def->replaceAllUsesWith(Plan->getOrAddLiveIn(
1114-
ConstantInt::getFalse(VPTypeAnalysis(*Plan).inferScalarType(Def))));
1113+
return Def->replaceAllUsesWith(Plan->getFalse());
11151114

11161115
if (match(Def, m_Select(m_VPValue(), m_VPValue(X), m_Deferred(X))))
11171116
return Def->replaceAllUsesWith(X);

0 commit comments

Comments
 (0)