[llvm] [InstCombine] Use existing `(icmp pred (add x, y), C)` folds with `or disjoint` (PR #87937)
Yingwei Zheng via llvm-commits
llvm-commits at lists.llvm.org
Sun Apr 7 23:07:55 PDT 2024
================
@@ -2986,10 +2986,10 @@ Instruction *InstCombinerImpl::foldICmpAddConstant(ICmpInst &Cmp,
Value *Op0, *Op1;
Instruction *Ext0, *Ext1;
const CmpInst::Predicate Pred = Cmp.getPredicate();
- if (match(Add,
- m_Add(m_CombineAnd(m_Instruction(Ext0), m_ZExtOrSExt(m_Value(Op0))),
- m_CombineAnd(m_Instruction(Ext1),
- m_ZExtOrSExt(m_Value(Op1))))) &&
+ if (match(Add, m_AddLike(m_CombineAnd(m_Instruction(Ext0),
----------------
dtcxzyw wrote:
Duplicate of https://github.com/llvm/llvm-project/pull/75899.
https://github.com/llvm/llvm-project/pull/87937
More information about the llvm-commits
mailing list