llvm-project
8d207833 - [InstCombine] Shrink added constant using LHS known zeros (#174380)

Commit
74 days ago
[InstCombine] Shrink added constant using LHS known zeros (#174380) Previously, `SimplifyDemandedUseBits` for `add` instructions only used known zeros from the RHS to simplify the LHS. It failed to handle the symmetric case where the LHS has known zeros and the result does not demand the low bits. This patch implements this missing optimization, allowing the RHS constant to be shrunk when the LHS low bits are known zero and unused. Proof: https://alive2.llvm.org/ce/z/6v9iFY Fixed: https://github.com/llvm/llvm-project/issues/135411
Author
Parents
Loading