[llvm] [BDCE] Handle multi-use `select` of `and`s on demanded bits (PR #79688)

Antonio Frighetto via llvm-commits llvm-commits at lists.llvm.org
Sat Jan 27 05:55:41 PST 2024


antoniofrighetto wrote:

Could you kindly provide an example showing how not restricting this to the `select` may be beneficial? We don't need to specialize it for the `select`, but restricting the input space looked reasonable to me.

> You should only be looking at the demanded bits of the and.

You mean we should only be looking at the demanded bits of the instruction itself when the operand analyzed is the `and`? I don't see how the optimization can take place if the instruction examined is not the multi-use instruction.

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


More information about the llvm-commits mailing list