[llvm] [RISCV][GISel] Do libcall for G_FPTOSI, G_FPTOUI when no D or F support (PR #94613)

Craig Topper via llvm-commits llvm-commits at lists.llvm.org
Thu Jun 6 14:52:44 PDT 2024


================
@@ -166,13 +265,27 @@ body:             |
   bb.1:
     liveins: $f10_d
 
-    ; CHECK-LABEL: name: fptosi_s1_s64
-    ; CHECK: liveins: $f10_d
-    ; CHECK-NEXT: {{  $}}
-    ; CHECK-NEXT: [[COPY:%[0-9]+]]:_(s64) = COPY $f10_d
-    ; CHECK-NEXT: [[FPTOSI:%[0-9]+]]:_(s32) = G_FPTOSI [[COPY]](s64)
-    ; CHECK-NEXT: $x10 = COPY [[FPTOSI]](s32)
-    ; CHECK-NEXT: PseudoRET implicit $x10
+    ; CHECK-FLOAT-LABEL: name: fptosi_s1_s64
+    ; CHECK-FLOAT: liveins: $f10_d
+    ; CHECK-FLOAT-NEXT: {{  $}}
+    ; CHECK-FLOAT-NEXT: [[COPY:%[0-9]+]]:_(s64) = COPY $f10_d
+    ; CHECK-FLOAT-NEXT: [[FPTOSI:%[0-9]+]]:_(s32) = G_FPTOSI [[COPY]](s64)
+    ; CHECK-FLOAT-NEXT: $x10 = COPY [[FPTOSI]](s32)
+    ; CHECK-FLOAT-NEXT: PseudoRET implicit $x10
+    ;
+    ; CHECK-NOFLOAT-LABEL: name: fptosi_s1_s64
+    ; CHECK-NOFLOAT: liveins: $f10_d
+    ; CHECK-NOFLOAT-NEXT: {{  $}}
+    ; CHECK-NOFLOAT-NEXT: [[COPY:%[0-9]+]]:_(s64) = COPY $f10_d
----------------
topperc wrote:

Something is broken here. We're passing f10_d, but we don't have floating point?

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


More information about the llvm-commits mailing list