[llvm] [Instcombine] Fold away shift in or reduction chain. (PR #137875)
Yingwei Zheng via llvm-commits
llvm-commits at lists.llvm.org
Wed Apr 30 00:49:52 PDT 2025
================
@@ -7742,6 +7765,11 @@ Instruction *InstCombinerImpl::visitICmpInst(ICmpInst &I) {
}
}
+ // icmp eq/ne or(shl(a), b), 0 -> icmp eq/ne or(a, b)
+ if (I.isEquality() && match(Op1, m_Zero()) && isa<Instruction>(Op0))
----------------
dtcxzyw wrote:
It would be better to move this fold into `InstCombinerImpl::foldICmpWithZero`.
https://github.com/llvm/llvm-project/pull/137875
More information about the llvm-commits
mailing list