[llvm] [InstCombine] Optimize unneeded float to int cast when icmp (PR #155501)

Yingwei Zheng via llvm-commits llvm-commits at lists.llvm.org
Sun Sep 7 00:13:08 PDT 2025


================
@@ -6054,3 +6054,273 @@ define i1 @icmp_samesign_logical_or(i32 %In) {
   %V = select i1 %c1, i1 true, i1 %c2
   ret i1 %V
 }
+
+; https://alive2.llvm.org/ce/z/XtQS6H
----------------
dtcxzyw wrote:

Please add a case where the integer value cannot be represented with the fp type(e.g., `icmp sgt i32 (fptosi half %x), -65535`).

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


More information about the llvm-commits mailing list