[llvm] [InstCombine] Extend bitmask mul combine to handle independent operands (PR #142503)
Yingwei Zheng via llvm-commits
llvm-commits at lists.llvm.org
Thu Jun 19 06:48:10 PDT 2025
dtcxzyw wrote:
> op1 = or-disjoint mul(and (X, C1), D) , reg1
op2 = or-disjoint mul(and (X, C2), D) , reg2
out = or-disjoint op1, op2
->
temp1 = or-disjoint reg1, reg2
out = or-disjoint mul(and (X, (C1 + C2)), D), temp1
Can we perform the reassociation first in `ReassociatePass` or `InstCombinePass` to get
```
or-disjoint (mul(and (X, C1), D), mul(and (X, C2), D))
```
Then this pattern should be handled by https://github.com/llvm/llvm-project/pull/136013.
https://github.com/llvm/llvm-project/pull/142503
More information about the llvm-commits
mailing list