Skip to content

Commit c51c4ee

Browse files
committed
Use m_c_Intrinsic<Intrinisic::umin> instead of m_c_UMin
m_c_UMin will also match with an icmp/select pattern which isn't desired here.
1 parent 63cfbe2 commit c51c4ee

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

llvm/lib/Transforms/InstCombine/InstCombineSelect.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -916,7 +916,8 @@ static Instruction *foldSelectZeroOrFixedOp(SelectInst &SI,
916916
match(FalseVal, m_FShr(m_Specific(X), m_Specific(X), m_Value(Y))) ||
917917
match(FalseVal, m_SDiv(m_Specific(X), m_Value(Y))) ||
918918
match(FalseVal, m_UDiv(m_Specific(X), m_Value(Y))) ||
919-
match(FalseVal, m_c_UMin(m_Specific(X), m_Value(Y))))) {
919+
match(FalseVal,
920+
m_c_Intrinsic<Intrinsic::umin>(m_Specific(X), m_Value(Y))))) {
920921
return nullptr;
921922
}
922923

0 commit comments

Comments
 (0)