1 ; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py
2 ; RUN: llc -mtriple=riscv64 -global-isel -target-abi=lp64 -verify-machineinstrs < %s \
3 ; RUN: | FileCheck %s -check-prefixes=CHECK,RV64I
4 ; RUN: llc -mtriple=riscv64 -global-isel -mattr=+f -target-abi=lp64f -verify-machineinstrs < %s \
5 ; RUN: | FileCheck %s -check-prefixes=CHECK,RV64IF
7 define i128 @fptosi_f32_to_i128(float %a) nounwind {
8 ; CHECK-LABEL: fptosi_f32_to_i128:
10 ; CHECK-NEXT: addi sp, sp, -16
11 ; CHECK-NEXT: sd ra, 8(sp) # 8-byte Folded Spill
12 ; CHECK-NEXT: call __fixsfti
13 ; CHECK-NEXT: ld ra, 8(sp) # 8-byte Folded Reload
14 ; CHECK-NEXT: addi sp, sp, 16
16 %1 = fptosi float %a to i128
20 define i128 @fptoui_f32_to_i128(float %a) nounwind {
21 ; CHECK-LABEL: fptoui_f32_to_i128:
23 ; CHECK-NEXT: addi sp, sp, -16
24 ; CHECK-NEXT: sd ra, 8(sp) # 8-byte Folded Spill
25 ; CHECK-NEXT: call __fixunssfti
26 ; CHECK-NEXT: ld ra, 8(sp) # 8-byte Folded Reload
27 ; CHECK-NEXT: addi sp, sp, 16
29 %1 = fptoui float %a to i128
33 define float @sitofp_i128_to_f32(i128 %a) nounwind {
34 ; CHECK-LABEL: sitofp_i128_to_f32:
36 ; CHECK-NEXT: addi sp, sp, -16
37 ; CHECK-NEXT: sd ra, 8(sp) # 8-byte Folded Spill
38 ; CHECK-NEXT: call __floattisf
39 ; CHECK-NEXT: ld ra, 8(sp) # 8-byte Folded Reload
40 ; CHECK-NEXT: addi sp, sp, 16
42 %1 = sitofp i128 %a to float
46 define float @uitofp_i128_to_f32(i128 %a) nounwind {
47 ; CHECK-LABEL: uitofp_i128_to_f32:
49 ; CHECK-NEXT: addi sp, sp, -16
50 ; CHECK-NEXT: sd ra, 8(sp) # 8-byte Folded Spill
51 ; CHECK-NEXT: call __floatuntisf
52 ; CHECK-NEXT: ld ra, 8(sp) # 8-byte Folded Reload
53 ; CHECK-NEXT: addi sp, sp, 16
55 %1 = uitofp i128 %a to float
58 ;; NOTE: These prefixes are unused and the list is autogenerated. Do not add tests below this line: