blob: 00642b23feee9879cd66cffdad76473d30a3c4b6 [file] [log] [blame]
Chad Rosierb1bbf6f2014-08-15 21:38:16 +00001; RUN: llc < %s -mtriple=armv8-linux-gnueabihf -mattr=+fp-armv8 | FileCheck %s
2
3; CHECK-LABEL: test1
4; CHECK: vrintm.f32
5define float @test1(float %a) {
6entry:
7 %call = call float @floorf(float %a) nounwind readnone
8 ret float %call
9}
10
11; CHECK-LABEL: test2
12; CHECK: vrintm.f64
13define double @test2(double %a) {
14entry:
15 %call = call double @floor(double %a) nounwind readnone
16 ret double %call
17}
18
19; CHECK-LABEL: test3
20; CHECK: vrintp.f32
21define float @test3(float %a) {
22entry:
23 %call = call float @ceilf(float %a) nounwind readnone
24 ret float %call
25}
26
27; CHECK-LABEL: test4
28; CHECK: vrintp.f64
29define double @test4(double %a) {
30entry:
31 %call = call double @ceil(double %a) nounwind readnone
32 ret double %call
33}
34
35; CHECK-LABEL: test5
36; CHECK: vrinta.f32
37define float @test5(float %a) {
38entry:
39 %call = call float @roundf(float %a) nounwind readnone
40 ret float %call
41}
42
43; CHECK-LABEL: test6
44; CHECK: vrinta.f64
45define double @test6(double %a) {
46entry:
47 %call = call double @round(double %a) nounwind readnone
48 ret double %call
49}
50
51; CHECK-LABEL: test7
52; CHECK: vrintz.f32
53define float @test7(float %a) {
54entry:
55 %call = call float @truncf(float %a) nounwind readnone
56 ret float %call
57}
58
59; CHECK-LABEL: test8
60; CHECK: vrintz.f64
61define double @test8(double %a) {
62entry:
63 %call = call double @trunc(double %a) nounwind readnone
64 ret double %call
65}
66
67; CHECK-LABEL: test9
68; CHECK: vrintr.f32
69define float @test9(float %a) {
70entry:
71 %call = call float @nearbyintf(float %a) nounwind readnone
72 ret float %call
73}
74
75; CHECK-LABEL: test10
76; CHECK: vrintr.f64
77define double @test10(double %a) {
78entry:
79 %call = call double @nearbyint(double %a) nounwind readnone
80 ret double %call
81}
82
83; CHECK-LABEL: test11
84; CHECK: vrintx.f32
85define float @test11(float %a) {
86entry:
87 %call = call float @rintf(float %a) nounwind readnone
88 ret float %call
89}
90
91; CHECK-LABEL: test12
92; CHECK: vrintx.f64
93define double @test12(double %a) {
94entry:
95 %call = call double @rint(double %a) nounwind readnone
96 ret double %call
97}
98
99declare float @floorf(float) nounwind readnone
100declare double @floor(double) nounwind readnone
101declare float @ceilf(float) nounwind readnone
102declare double @ceil(double) nounwind readnone
103declare float @roundf(float) nounwind readnone
104declare double @round(double) nounwind readnone
105declare float @truncf(float) nounwind readnone
106declare double @trunc(double) nounwind readnone
107declare float @nearbyintf(float) nounwind readnone
108declare double @nearbyint(double) nounwind readnone
109declare float @rintf(float) nounwind readnone
110declare double @rint(double) nounwind readnone