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