[llvm] [InstCombine] Fold an unsigned icmp of ucmp/scmp with a constant to an icmp of the original arguments (PR #104471)
Nikita Popov via llvm-commits
llvm-commits at lists.llvm.org
Thu Aug 15 11:32:43 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())
----------------
nikic wrote:
```suggestion
if (C.ugt(1))
```
This check doesn't appear to be necessary: https://alive2.llvm.org/ce/z/NyMjpe
https://github.com/llvm/llvm-project/pull/104471
More information about the llvm-commits
mailing list