[llvm] [InstCombine] simplify `icmp pred x, ~x` (PR #73990)

Nikita Popov via llvm-commits llvm-commits at lists.llvm.org
Sun Oct 6 08:32:20 PDT 2024


================
@@ -4605,6 +4605,27 @@ static Instruction *foldICmpXorXX(ICmpInst &I, const SimplifyQuery &Q,
       isKnownNonZero(A, Q.DL, /*Depth=*/0, Q.AC, Q.CxtI, Q.DT))
     return new ICmpInst(PredOut, Op0, Op1);
 
+  // These transform works when C is negative.
----------------
nikic wrote:

```suggestion
  // These transform work when C is negative.
```

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


More information about the llvm-commits mailing list