[llvm] [InstCombine] Use known bits to simplify mask in foldSelectICmpAnd (PR #128741)

Yingwei Zheng via llvm-commits llvm-commits at lists.llvm.org
Tue Feb 25 21:09:43 PST 2025


================
@@ -120,7 +120,8 @@ static Instruction *foldSelectBinOpIdentity(SelectInst &Sel,
 /// With some variations depending if FC is larger than TC, or the shift
 /// isn't needed, or the bit widths don't match.
 static Value *foldSelectICmpAnd(SelectInst &Sel, ICmpInst *Cmp,
-                                InstCombiner::BuilderTy &Builder) {
+                                InstCombiner::BuilderTy &Builder,
+                                SimplifyQuery &SQ) {
----------------
dtcxzyw wrote:

```suggestion
                                const SimplifyQuery &SQ) {
```

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


More information about the llvm-commits mailing list