[llvm] [CmpInstAnalysis] Decompose icmp eq (and x, C) C2 (PR #136367)

Yingwei Zheng via llvm-commits llvm-commits at lists.llvm.org
Wed Apr 23 00:54:16 PDT 2025


================
@@ -159,23 +175,25 @@ llvm::decomposeBitTestICmp(Value *LHS, Value *RHS, CmpInst::Predicate Pred,
     Result.X = X;
     Result.Mask = Result.Mask.zext(X->getType()->getScalarSizeInBits());
     Result.C = Result.C.zext(X->getType()->getScalarSizeInBits());
-  } else {
+  } else if (!Result.X) {
----------------
dtcxzyw wrote:

```suggestion
  } else
```

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


More information about the llvm-commits mailing list