[llvm] [InstCombine] Add transforms for `(or/and (icmp eq/ne X,0),(icmp eq/ne X,Pow2OrZero))` (PR #94648)
via llvm-commits
llvm-commits at lists.llvm.org
Sat Jun 8 12:14:49 PDT 2024
================
@@ -3240,6 +3277,11 @@ Value *InstCombinerImpl::foldAndOrOfICmps(ICmpInst *LHS, ICmpInst *RHS,
ICmpInst::Predicate PredL = LHS->getPredicate(), PredR = RHS->getPredicate();
Value *LHS0 = LHS->getOperand(0), *RHS0 = RHS->getOperand(0);
Value *LHS1 = LHS->getOperand(1), *RHS1 = RHS->getOperand(1);
+ if (!IsLogical)
+ if (Value *V =
+ foldAndOrOfICmpsWithPow2AndWithZero(Builder, LHS, RHS, IsAnd, Q))
+ return V;
----------------
goldsteinn wrote:
Moving to the end.
https://github.com/llvm/llvm-project/pull/94648
More information about the llvm-commits
mailing list