[llvm] [InstCombine] Fold fcmp of two int-to-fp conversions to an integer compare (PR #210521)
via llvm-commits
llvm-commits at lists.llvm.org
Sat Jul 18 09:42:57 PDT 2026
AZero13 wrote:
> When both integer operands are exactly representable in the float type, comparing their int-to-fp conversions is the same as comparing the integers directly:int->fp never yields NaN and keeps their ordering:
>
> fcmp pred (uitofp X), (uitofp Y) --> icmp upred X, Y fcmp pred (sitofp X), (sitofp Y) --> icmp spred X, Y
>
> Fixes #206329
Alive2?
https://github.com/llvm/llvm-project/pull/210521
More information about the llvm-commits
mailing list