ARM: make Darwin libcall registration table driven (NFC)
[oota-llvm.git] / test / CodeGen / ARM / Windows / integer-floating-point-conversion.ll
1 ; RUN: llc -mtriple thumbv7-windows -filetype asm -o - %s | FileCheck %s
2
3 define arm_aapcs_vfpcc i64 @stoi64(float %f) {
4 entry:
5   %conv = fptosi float %f to i64
6   ret i64 %conv
7 }
8
9 ; CHECK-LABEL: stoi64
10 ; CHECK: bl __stoi64
11
12 define arm_aapcs_vfpcc i64 @stou64(float %f) {
13 entry:
14   %conv = fptoui float %f to i64
15   ret i64 %conv
16 }
17
18 ; CHECK-LABEL: stou64
19 ; CHECK: bl __stou64
20
21 define arm_aapcs_vfpcc float @i64tos(i64 %i64) {
22 entry:
23   %conv = sitofp i64 %i64 to float
24   ret float %conv
25 }
26
27 ; CHECK-LABEL: i64tos
28 ; CHECK: bl __i64tos
29
30 define arm_aapcs_vfpcc float @u64tos(i64 %u64) {
31 entry:
32   %conv = uitofp i64 %u64 to float
33   ret float %conv
34 }
35
36 ; CHECK-LABEL: u64tos
37 ; CHECK: bl __u64tos
38
39 define arm_aapcs_vfpcc i64 @dtoi64(double %d) {
40 entry:
41   %conv = fptosi double %d to i64
42   ret i64 %conv
43 }
44
45 ; CHECK-LABEL: dtoi64
46 ; CHECK: bl __dtoi64
47
48 define arm_aapcs_vfpcc i64 @dtou64(double %d) {
49 entry:
50   %conv = fptoui double %d to i64
51   ret i64 %conv
52 }
53
54 ; CHECK-LABEL: dtou64
55 ; CHECK: bl __dtou64
56
57 define arm_aapcs_vfpcc double @i64tod(i64 %i64) {
58 entry:
59   %conv = sitofp i64 %i64 to double
60   ret double %conv
61 }
62
63 ; CHECK-LABEL: i64tod
64 ; CHECK: bl __i64tod
65
66 define arm_aapcs_vfpcc double @u64tod(i64 %i64) {
67 entry:
68   %conv = uitofp i64 %i64 to double
69   ret double %conv
70 }
71
72 ; CHECK-LABEL: u64tod
73 ; CHECK: bl __u64tod
74