[llvm] [InstCombine] Fold (trunc X to i1) & !iszero(X & Pow2)) -> (X & (1 | Pow2)) == (1 | Pow2) (PR #119196)
Yingwei Zheng via llvm-commits
llvm-commits at lists.llvm.org
Mon Jan 6 21:18:00 PST 2025
dtcxzyw wrote:
> many of the places already have decomposeBitTestICmp so maybe good to make a decomposeBitTest that only have a Value as input that handle trunc and then call decomposeBitTestICmp for icmp.
Thank you for the detailed investigation! I agree that we can continue to migrate to `trunc X to i1`.
https://github.com/llvm/llvm-project/pull/119196
More information about the llvm-commits
mailing list