[llvm] Missed optimization: fold icmp eq f(a), f(b) to icmp eq a, b where f(x) = xor(x, lshr(ashr(x, 31), 1)) #143630 (PR #198481)

via llvm-commits llvm-commits at lists.llvm.org
Thu Jul 9 02:34:56 PDT 2026


================
@@ -2944,6 +2944,7 @@ Instruction *InstCombinerImpl::foldICmpDivConstant(ICmpInst &Cmp,
       return replaceInstUsesWith(Cmp, Builder.getTrue());
     if (LoOverflow == -1) // Low bound is less than input range.
       return replaceInstUsesWith(Cmp, Builder.getFalse());
+
----------------
Disservin wrote:

probably best to remove this code line change?

https://github.com/llvm/llvm-project/pull/198481


More information about the llvm-commits mailing list