[llvm] [InstCombine] Fold an unsigned icmp of ucmp/scmp with a constant to an icmp of the original arguments (PR #104471)

Volodymyr Vasylkun via llvm-commits llvm-commits at lists.llvm.org
Thu Aug 15 16:03:05 PDT 2024


================
@@ -4018,6 +4018,16 @@ foldICmpOfCmpIntrinsicWithConstant(ICmpInst::Predicate Pred, IntrinsicInst *I,
       NewPredicate = ICmpInst::ICMP_ULE;
     break;
 
+  case ICmpInst::ICMP_ULT:
+    if (C.ugt(1) && !C.isAllOnes())
----------------
Poseydon42 wrote:

Yep, fixed.

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


More information about the llvm-commits mailing list