[llvm] [InstCombine] Missed optimization: Fold (sext(a) & c1) == c2 to (a & c3) == trunc(c2) (PR #112646)
via llvm-commits
llvm-commits at lists.llvm.org
Fri Oct 25 04:35:53 PDT 2024
================
@@ -7687,6 +7687,30 @@ Instruction *InstCombinerImpl::visitICmpInst(ICmpInst &I) {
if (Instruction *Res = foldReductionIdiom(I, Builder, DL))
return Res;
+ {
+ Value *A;
+ const APInt *C1, *C2;
+ ICmpInst::Predicate PredEq = ICmpInst::ICMP_EQ;
----------------
XChy wrote:
What about `icmp ne` cases? See https://alive2.llvm.org/ce/z/MUHREP
https://github.com/llvm/llvm-project/pull/112646
More information about the llvm-commits
mailing list