[llvm] IR: introduce struct with CmpInst::Predicate and samesign (PR #116867)

Ramkumar Ramachandra via llvm-commits llvm-commits at lists.llvm.org
Fri Nov 29 06:03:19 PST 2024


================
@@ -59,7 +59,7 @@ Value *InstCombinerImpl::insertRangeTest(Value *V, const APInt &Lo,
 
   // V >= Min && V <  Hi --> V <  Hi
   // V <  Min || V >= Hi --> V >= Hi
-  ICmpInst::Predicate Pred = Inside ? ICmpInst::ICMP_ULT : ICmpInst::ICMP_UGE;
+  CmpPredicate Pred = Inside ? ICmpInst::ICMP_ULT : ICmpInst::ICMP_UGE;
----------------
artagnon wrote:

It is required for typing of the ternary operator a few lines below:

```
    Pred = isSigned ? ICmpInst::getSignedPredicate(Pred) : Pred;
```

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


More information about the llvm-commits mailing list