[llvm] [InstCombine] Fold (trunc X to i1) & !iszero(X & Pow2)) -> (X & (1 | Pow2)) == (1 | Pow2) (PR #119196)

via llvm-commits llvm-commits at lists.llvm.org
Wed Dec 11 17:30:54 PST 2024


DianQK wrote:

I know a little about instcombine. Would it be possible to canonicalize `(X & 1) != 0` to `trunc X to i1`, and replace all `(X & 1) != 0` pattern matching with `trunc X to i1`?

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


More information about the llvm-commits mailing list