[llvm] [CVP]: Fold `icmp eq X, C` to `trunc X to i1` if C=2k+1 and X in [2k, 2k+1] (PR #83829)
via llvm-commits
llvm-commits at lists.llvm.org
Fri May 24 09:58:56 PDT 2024
YanWQ-monad wrote:
ping?
How about only fold those that can be folded to `trunc nuw`? That is, only fold `icmp eq X, 1` to `trunc nuw X to i1` if X is in [0, 1]. It's less general, but probably less likely to interfere with other optimizations while still fitting the original motivation.
https://github.com/llvm/llvm-project/pull/83829
More information about the llvm-commits
mailing list