[llvm] [InstCombine] Add combines for unsigned comparison of absolute value to constant (PR #176148)

Nathan Corbyn via llvm-commits llvm-commits at lists.llvm.org
Tue Jan 27 02:27:41 PST 2026


================
@@ -4301,6 +4301,32 @@ Instruction *InstCombinerImpl::foldICmpIntrinsicWithConstant(ICmpInst &Cmp,
                             II->getArgOperand(1));
     }
     break;
+  case Intrinsic::abs: {
+    if (!II->hasOneUse())
----------------
cofibrant wrote:

I thought I'd updated the tests to reflect this 😅 Could you give a suggestion of the sort of thing I'm missing?

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


More information about the llvm-commits mailing list