[llvm] [CVP]: Fold `icmp eq X, C` to `trunc X to i1` if C=2k+1 and X in [2k, 2k+1] (PR #83829)

Yingwei Zheng via llvm-commits llvm-commits at lists.llvm.org
Mon Mar 4 09:02:22 PST 2024


dtcxzyw wrote:

FYI, `trunc X to i1` will be canonicalized into `(X & 1) == 0`.
godbolt: https://godbolt.org/z/cMv6K8qKd


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


More information about the llvm-commits mailing list