[llvm] [InstCombine] Fold `(icmp pred (trunc nuw/nsw X), C)` -> `(icmp pred X, (zext/sext C))` (PR #87935)
Nikita Popov via llvm-commits
llvm-commits at lists.llvm.org
Thu May 2 19:11:45 PDT 2024
https://github.com/nikic commented:
This looks basically good to me, the only question I have is whether this should be behind a shouldChangeType check, similar to the other trunc+icmp combine?
If we have a trunc i128 to i8 or so, it's not clear that converting from an icmp i8 to icmp i128 is a good transform. (Similar for the i48 example in the tests.)
https://github.com/llvm/llvm-project/pull/87935
More information about the llvm-commits
mailing list