Skip to content

Commit 3b55bb9

Browse files
committed
Simplify pattern matching
1 parent cdfaef9 commit 3b55bb9

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

llvm/lib/Transforms/InstCombine/InstCombineSelect.cpp

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1589,9 +1589,7 @@ static Value *canonicalizeClampLike(SelectInst &Sel0, ICmpInst &Cmp0,
15891589
Value *ReplacementLow, *ReplacementHigh;
15901590
bool FoldSExtICmp;
15911591
auto MatchSExtICmp = [](Value *PossibleSextIcmp, Value *&Cmp1) -> bool {
1592-
Value *ICmpOp0, *ICmpOp1;
1593-
return match(PossibleSextIcmp, m_SExt(m_Value(Cmp1))) &&
1594-
match(Cmp1, m_ICmp(m_Value(ICmpOp0), m_Value(ICmpOp1)));
1592+
return match(PossibleSextIcmp, m_SExt(m_Value(Cmp1, m_ICmp(m_Value(), m_Value()))));
15951593
};
15961594
if (!((FoldSExtICmp = MatchSExtICmp(Sel1, Cmp1)) ||
15971595
match(Sel1, m_Select(m_Value(Cmp1), m_Value(ReplacementLow),

0 commit comments

Comments
 (0)