[llvm] [InstCombine] Fold xored one-complemented operand comparisons (PR #69882)
Yingwei Zheng via llvm-commits
llvm-commits at lists.llvm.org
Tue Oct 24 08:26:56 PDT 2023
================
@@ -7127,6 +7127,21 @@ Instruction *InstCombinerImpl::visitICmpInst(ICmpInst &I) {
return new ICmpInst(I.getInversePredicate(), Builder.CreateAnd(A, B),
Op1);
+ // Transform (~A ^ B) s< ~A --> (A ^ B) s> A,
----------------
dtcxzyw wrote:
```suggestion
// Transform (~A ^ B) s< ~C --> (A ^ B) s> C,
```
https://github.com/llvm/llvm-project/pull/69882
More information about the llvm-commits
mailing list