Skip to content

Commit cda90a3

Browse files
bababuckdtcxzyw
andauthored
Match to m_I[Div/Rem] rather than the individual signed and unsigned versions
No functional change, reduces code size. Co-authored-by: Yingwei Zheng <[email protected]>
1 parent 3e8c74f commit cda90a3

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

llvm/lib/Transforms/InstCombine/InstCombineSelect.cpp

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -915,10 +915,8 @@ static Instruction *foldSelectZeroOrFixedOp(SelectInst &SI,
915915
match(FalseVal,
916916
m_c_Intrinsic<Intrinsic::umin>(m_Specific(X), m_Value(Y)))) {
917917
FreezeY = true;
918-
} else if (match(FalseVal, m_SDiv(m_Specific(X), m_Value(Y))) ||
919-
match(FalseVal, m_UDiv(m_Specific(X), m_Value(Y))) ||
920-
match(FalseVal, m_SRem(m_Specific(X), m_Value(Y))) ||
921-
match(FalseVal, m_URem(m_Specific(X), m_Value(Y)))) {
918+
} else if (match(FalseVal, m_IDiv(m_Specific(X), m_Value(Y))) ||
919+
match(FalseVal, m_IRem(m_Specific(X), m_Value(Y)))) {
922920
FreezeY = false;
923921
} else {
924922
return nullptr;

0 commit comments

Comments
 (0)