xref: /llvm-project/llvm/test/CodeGen/ARM/fpconv.ll (revision a5007faaa68de9487fe63b690bea6e16c3c5f770)
1; RUN: llvm-upgrade < %s | llvm-as | llc -march=arm -mattr=+vfp2 &&
2; RUN: llvm-upgrade < %s | llvm-as | llc -march=arm -mattr=+vfp2 | grep fcvtsd &&
3; RUN: llvm-upgrade < %s | llvm-as | llc -march=arm -mattr=+vfp2 | grep fcvtds &&
4; RUN: llvm-upgrade < %s | llvm-as | llc -march=arm -mattr=+vfp2 | grep ftosizs &&
5; RUN: llvm-upgrade < %s | llvm-as | llc -march=arm -mattr=+vfp2 | grep ftouizs &&
6; RUN: llvm-upgrade < %s | llvm-as | llc -march=arm -mattr=+vfp2 | grep ftosizd &&
7; RUN: llvm-upgrade < %s | llvm-as | llc -march=arm -mattr=+vfp2 | grep ftouizd &&
8; RUN: llvm-upgrade < %s | llvm-as | llc -march=arm -mattr=+vfp2 | grep fsitos &&
9; RUN: llvm-upgrade < %s | llvm-as | llc -march=arm -mattr=+vfp2 | grep fsitod &&
10; RUN: llvm-upgrade < %s | llvm-as | llc -march=arm -mattr=+vfp2 | grep fuitos &&
11; RUN: llvm-upgrade < %s | llvm-as | llc -march=arm -mattr=+vfp2 | grep fuitod
12
13float %f1(double %x) {
14entry:
15	%tmp1 = cast double %x to float
16	ret float %tmp1
17}
18
19double %f2(float %x) {
20entry:
21	%tmp1 = cast float %x to double
22	ret double %tmp1
23}
24
25int %f3(float %x) {
26entry:
27        %tmp = cast float %x to int
28        ret int %tmp
29}
30
31uint %f4(float %x) {
32entry:
33        %tmp = cast float %x to uint
34        ret uint %tmp
35}
36
37int %f5(double %x) {
38entry:
39        %tmp = cast double %x to int
40        ret int %tmp
41}
42
43uint %f6(double %x) {
44entry:
45        %tmp = cast double %x to uint
46        ret uint %tmp
47}
48
49float %f7(int %a) {
50entry:
51	%tmp = cast int %a to float
52	ret float %tmp
53}
54
55double %f8(int %a) {
56entry:
57        %tmp = cast int %a to double
58        ret double %tmp
59}
60
61float %f9(uint %a) {
62entry:
63	%tmp = cast uint %a to float
64	ret float %tmp
65}
66
67double %f10(uint %a) {
68entry:
69	%tmp = cast uint %a to double
70	ret double %tmp
71}
72