1 ; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py
2 ; RUN: llc -verify-machineinstrs -o - %s -mtriple=arm64-apple-ios7.0 | FileCheck %s
4 declare float @fabsf(float) readonly
5 declare double @fabs(double) readonly
7 declare float @llvm.sqrt.f32(float %Val)
8 declare double @llvm.sqrt.f64(double %Val)
10 declare float @ceilf(float) readonly
11 declare double @ceil(double) readonly
13 declare float @floorf(float) readonly
14 declare double @floor(double) readonly
16 declare float @truncf(float) readonly
17 declare double @trunc(double) readonly
19 declare float @rintf(float) readonly
20 declare double @rint(double) readonly
22 declare float @nearbyintf(float) readonly
23 declare double @nearbyint(double) readonly
25 define float @fabs_f(float %v) {
26 ; CHECK-LABEL: fabs_f:
28 ; CHECK-NEXT: fabs s0, s0
30 %r = call float @fabsf(float %v)
34 define float @fsub_f(float %v) {
35 ; CHECK-LABEL: fsub_f:
37 ; CHECK-NEXT: fneg s0, s0
39 %r = fsub float -0.0, %v
43 define float @sqrt_f(float %v) {
44 ; CHECK-LABEL: sqrt_f:
46 ; CHECK-NEXT: fsqrt s0, s0
48 %r = call float @llvm.sqrt.f32(float %v)
52 define float @ceil_f(float %v) {
53 ; CHECK-LABEL: ceil_f:
55 ; CHECK-NEXT: frintp s0, s0
57 %r = call float @ceilf(float %v)
61 define float @floor_f(float %v) {
62 ; CHECK-LABEL: floor_f:
64 ; CHECK-NEXT: frintm s0, s0
66 %r = call float @floorf(float %v)
70 define float @trunc_f(float %v) {
71 ; CHECK-LABEL: trunc_f:
73 ; CHECK-NEXT: frintz s0, s0
75 %r = call float @truncf(float %v)
79 define float @rint_f(float %v) {
80 ; CHECK-LABEL: rint_f:
82 ; CHECK-NEXT: frintx s0, s0
84 %r = call float @rintf(float %v)
88 define float @nearbyint_f(float %v) {
89 ; CHECK-LABEL: nearbyint_f:
91 ; CHECK-NEXT: frinti s0, s0
93 %r = call float @nearbyintf(float %v)
97 define double @fabs_d(double %v) {
98 ; CHECK-LABEL: fabs_d:
100 ; CHECK-NEXT: fabs d0, d0
102 %r = call double @fabs(double %v)
106 define double @fsub_d(double %v) {
107 ; CHECK-LABEL: fsub_d:
109 ; CHECK-NEXT: fneg d0, d0
111 %r = fsub double -0.0, %v
115 define double @sqrt_d(double %v) {
116 ; CHECK-LABEL: sqrt_d:
118 ; CHECK-NEXT: fsqrt d0, d0
120 %r = call double @llvm.sqrt.f64(double %v)
124 define double @ceil_d(double %v) {
125 ; CHECK-LABEL: ceil_d:
127 ; CHECK-NEXT: frintp d0, d0
129 %r = call double @ceil(double %v)
133 define double @floor_d(double %v) {
134 ; CHECK-LABEL: floor_d:
136 ; CHECK-NEXT: frintm d0, d0
138 %r = call double @floor(double %v)
142 define double @trunc_d(double %v) {
143 ; CHECK-LABEL: trunc_d:
145 ; CHECK-NEXT: frintz d0, d0
147 %r = call double @trunc(double %v)
151 define double @rint_d(double %v) {
152 ; CHECK-LABEL: rint_d:
154 ; CHECK-NEXT: frintx d0, d0
156 %r = call double @rint(double %v)
160 define double @nearbyint_d(double %v) {
161 ; CHECK-LABEL: nearbyint_d:
163 ; CHECK-NEXT: frinti d0, d0
165 %r = call double @nearbyint(double %v)
169 define float @conv_h_f(half %v) {
170 ; CHECK-LABEL: conv_h_f:
172 ; CHECK-NEXT: fcvt s0, h0
174 %r = fpext half %v to float
178 define double @conv_h_d(half %v) {
179 ; CHECK-LABEL: conv_h_d:
181 ; CHECK-NEXT: fcvt d0, h0
183 %r = fpext half %v to double
187 define half @conv_f_h(float %v) {
188 ; CHECK-LABEL: conv_f_h:
190 ; CHECK-NEXT: fcvt h0, s0
192 %r = fptrunc float %v to half
196 define double @conv_f_d(float %v) {
197 ; CHECK-LABEL: conv_f_d:
199 ; CHECK-NEXT: fcvt d0, s0
201 %r = fpext float %v to double
205 define half @conv_d_h(double %v) {
206 ; CHECK-LABEL: conv_d_h:
208 ; CHECK-NEXT: fcvt h0, d0
210 %r = fptrunc double %v to half
214 define float @conv_d_f(double %v) {
215 ; CHECK-LABEL: conv_d_f:
217 ; CHECK-NEXT: fcvt s0, d0
219 %r = fptrunc double %v to float