llvm-project
05670b42 - [InstCombine] Remove root special case in demanded bits simplification

Commit
1 year ago
[InstCombine] Remove root special case in demanded bits simplification When calling SimplifyDemandedBits (as opposed to SimplifyDemandedInstructionBits), and there are multiple uses, always use SimplifyMultipleUseDemandedBits and drop the special case for root values. This fixes the ephemeral value detection, as seen by the restored assumes in tests. It may result in more or less simplification, depending on whether we get more out of having demanded bits or the ability to perform non-multi-use transforms. The change in the phi-known-bits.ll test is because the icmp operand now gets simplified based on demanded bits, which then prevents a different known bits simplification later. This also makes the code safe against future changes like https://github.com/llvm/llvm-project/pull/97289, which add more context that would have to be discarded for the multi-use case.
Author
Committer
Parents
Loading