[llvm] [InstCombine] Extend bitmask mul combine to handle independent operands (PR #142503)
Yingwei Zheng via llvm-commits
llvm-commits at lists.llvm.org
Tue Jun 24 00:20:31 PDT 2025
dtcxzyw wrote:
> Moreover, we still need to do the analysis to check for the conditions of reassociation. Thus, it is somewhat unclear if this change is a net positive.
I don't think it is necessary to check the specific pattern. As these two muls share the same constant factor, it is always profitable to reassociate the tree. `ReassociatePass` performs the reassociate for add, but not for `or disjoint`: https://godbolt.org/z/TMcYTdd5T It may be better to handle this pattern in `ReassociatePass`.
https://github.com/llvm/llvm-project/pull/142503
More information about the llvm-commits
mailing list