Skip to content

Commit 1f22567

Browse files
authored
[VPlan] Improve code using VPlan::getFalse (NFC) (#161681)
1 parent 8f67cdd commit 1f22567

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)