1 ; NOTE: Assertions have been autogenerated by utils/update_test_checks.py
2 ; RUN: opt -early-cse -S -o - %s | FileCheck %s
4 declare double @acos(double)
5 define double @f_acos() {
6 ; CHECK-LABEL: @f_acos(
7 ; CHECK-NEXT: ret double 0.000000e+00
9 %res = tail call fast double @acos(double 1.0)
13 declare float @asinf(float)
14 define float @f_asinf() {
15 ; CHECK-LABEL: @f_asinf(
16 ; CHECK-NEXT: ret float 0x3FF921FB{{.+}}
18 %res = tail call fast float @asinf(float 1.0)
22 declare double @atan(double)
23 define double @f_atan() {
24 ; CHECK-LABEL: @f_atan(
25 ; CHECK-NEXT: [[RES:%.*]] = tail call fast double @atan(double 1.000000e+00)
26 ; CHECK-NEXT: ret double 0x3FE921FB
28 %res = tail call fast double @atan(double 1.0)
32 declare float @cosf(float)
33 define float @f_cosf() {
34 ; CHECK-LABEL: @f_cosf(
35 ; CHECK-NEXT: ret float 0x3FE14A2{{.+}}
37 %res = tail call fast float @cosf(float 1.0)
41 declare float @llvm.cos.f32(float)
42 define float @i_cosf() {
43 ; CHECK-LABEL: @i_cosf(
44 ; CHECK-NEXT: ret float 0x3FE14A2
46 %res = tail call fast float @llvm.cos.f32(float 1.0)
50 declare double @cosh(double)
51 define double @f_cosh() {
52 ; CHECK-LABEL: @f_cosh(
53 ; CHECK-NEXT: ret double 0x3FF8B075{{.+}}
55 %res = tail call fast double @cosh(double 1.0)
59 declare float @expf(float)
60 define float @f_expf() {
61 ; CHECK-LABEL: @f_expf(
62 ; CHECK-NEXT: ret float 0x4005BF0A{{.+}}
64 %res = tail call fast float @expf(float 1.0)
68 declare float @llvm.exp.f32(float)
69 define float @i_expf() {
70 ; CHECK-LABEL: @i_expf(
71 ; CHECK-NEXT: ret float 0x4005BF0A{{.+}}
73 %res = tail call fast float @llvm.exp.f32(float 1.0)
77 declare double @exp2(double)
78 define double @f_exp2() {
79 ; CHECK-LABEL: @f_exp2(
80 ; CHECK-NEXT: ret double 2.000000e+00
82 %res = tail call fast double @exp2(double 1.0)
86 declare double @llvm.exp2.f64(double)
87 define double @i_exp2() {
88 ; CHECK-LABEL: @i_exp2(
89 ; CHECK-NEXT: ret double 2.000000e+00
91 %res = tail call fast double @llvm.exp2.f64(double 1.0)
96 declare float @exp10f(float)
97 define float @f_exp10f() {
98 ; CHECK-LABEL: @f_exp10f(
99 ; CHECK-NEXT: [[RES:%.*]] = tail call fast float @exp10f(float 1.000000e+00)
100 ; CHECK-NEXT: ret float [[RES]]
102 %res = tail call fast float @exp10f(float 1.0)
106 declare double @log(double)
107 define double @f_log() {
108 ; CHECK-LABEL: @f_log(
109 ; CHECK-NEXT: ret double 0.000000e+00
111 %res = tail call fast double @log(double 1.0)
115 declare double @llvm.log.f64(double)
116 define double @i_log() {
117 ; CHECK-LABEL: @i_log(
118 ; CHECK-NEXT: ret double 0.000000e+00
120 %res = tail call fast double @llvm.log.f64(double 1.0)
125 declare float @log2f(float)
126 define float @f_log2f() {
127 ; CHECK-LABEL: @f_log2f(
128 ; CHECK-NEXT: [[RES:%.*]] = tail call fast float @log2f(float 1.000000e+00)
129 ; CHECK-NEXT: ret float [[RES]]
131 %res = tail call fast float @log2f(float 1.0)
135 declare float @llvm.log2.f32(float)
136 define float @i_log2f() {
137 ; CHECK-LABEL: @i_log2f(
138 ; CHECK-NEXT: ret float 0.000000e+00
140 %res = tail call fast float @llvm.log2.f32(float 1.0)
144 declare double @log10(double)
145 define double @f_log10() {
146 ; CHECK-LABEL: @f_log10(
147 ; CHECK-NEXT: ret double 0.000000e+00
149 %res = tail call fast double @log10(double 1.0)
153 declare float @sinf(float)
154 define float @f_sinf() {
155 ; CHECK-LABEL: @f_sinf(
156 ; CHECK-NEXT: ret float 0x3FEAED54{{.+}}
158 %res = tail call fast float @sinf(float 1.0)
162 declare double @sinh(double)
163 define double @f_sinh() {
164 ; CHECK-LABEL: @f_sinh(
165 ; CHECK-NEXT: ret double 0x3FF2CD9F{{.+}}
167 %res = tail call fast double @sinh(double 1.0)
171 declare float @sqrtf(float)
172 define float @f_sqrtf() {
173 ; CHECK-LABEL: @f_sqrtf(
174 ; CHECK-NEXT: ret float 1.000000e+00
176 %res = tail call fast float @sqrtf(float 1.0)
180 declare double @tan(double)
181 define double @f_tan() {
182 ; CHECK-LABEL: @f_tan(
183 ; CHECK-NEXT: ret double 0x3FF8EB24{{.+}}
185 %res = tail call fast double @tan(double 1.0)
189 declare float @tanhf(float)
190 define float @f_tanhf() {
191 ; CHECK-LABEL: @f_tanhf(
192 ; CHECK-NEXT: [[RES:%.*]] = tail call fast float @tanhf(float 1.000000e+00)
193 ; CHECK-NEXT: ret float 0x3FE85EFA{{.+}}
195 %res = tail call fast float @tanhf(float 1.0)