[llvm] [InstCombine] Fold `(icmp pred (trunc nuw/nsw X), C)` -> `(icmp pred X, (zext/sext C))` (PR #87935)

Vitaly Buka via llvm-commits llvm-commits at lists.llvm.org
Mon May 27 07:22:15 PDT 2024


vitalybuka wrote:

trivial reproducer https://godbolt.org/z/TaxWPPrdq

before the patch bit field was completely isolated before comparison, now it just compares with different constants:
https://godbolt.org/z/Y54hr7oer
 
Irrelevant bits of comparison arg not uninitialized.  However Msan can't handle it for signed, but unsigned version is OK: https://godbolt.org/z/dMGeqaGEj 


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


More information about the llvm-commits mailing list