1 ; NOTE: Assertions have been autogenerated by utils/update_test_checks.py UTC_ARGS: --version 2
2 ; RUN: opt -S -mtriple=amdgcn-amd-amdhsa -passes=amdgpu-simplifylib,instcombine -amdgpu-prelink %s | FileCheck %s
4 target datalayout = "e-p:64:64-p1:64:64-p2:32:32-p3:32:32-p4:64:64-p5:32:32-p6:32:32-p7:160:256:256:32-p8:128:128-i64:64-v16:16-v24:32-v32:32-v48:64-v96:128-v192:256-v256:256-v512:512-v1024:1024-v2048:2048-n32:64-S32-A5-G1-ni:7:8:9"
6 declare float @_Z4powrff(float, float)
7 declare <2 x float> @_Z4powrDv2_fS_(<2 x float>, <2 x float>)
8 declare <3 x float> @_Z4powrDv3_fS_(<3 x float>, <3 x float>)
9 declare <4 x float> @_Z4powrDv4_fS_(<4 x float>, <4 x float>)
10 declare <8 x float> @_Z4powrDv8_fS_(<8 x float>, <8 x float>)
11 declare <16 x float> @_Z4powrDv16_fS_(<16 x float>, <16 x float>)
12 declare double @_Z4powrdd(double, double)
13 declare <2 x double> @_Z4powrDv2_dS_(<2 x double>, <2 x double>)
14 declare <3 x double> @_Z4powrDv3_dS_(<3 x double>, <3 x double>)
15 declare <4 x double> @_Z4powrDv4_dS_(<4 x double>, <4 x double>)
16 declare <8 x double> @_Z4powrDv8_dS_(<8 x double>, <8 x double>)
17 declare <16 x double> @_Z4powrDv16_dS_(<16 x double>, <16 x double>)
18 declare half @_Z4powrDhDh(half, half)
19 declare <2 x half> @_Z4powrDv2_DhS_(<2 x half>, <2 x half>)
20 declare <3 x half> @_Z4powrDv3_DhS_(<3 x half>, <3 x half>)
21 declare <4 x half> @_Z4powrDv4_DhS_(<4 x half>, <4 x half>)
22 declare <8 x half> @_Z4powrDv8_DhS_(<8 x half>, <8 x half>)
23 declare <16 x half> @_Z4powrDv16_DhS_(<16 x half>, <16 x half>)
25 define float @test_powr_fast_f32(float %x, float %y) {
26 ; CHECK-LABEL: define float @test_powr_fast_f32
27 ; CHECK-SAME: (float [[X:%.*]], float [[Y:%.*]]) {
28 ; CHECK-NEXT: [[__LOG2:%.*]] = call fast float @llvm.log2.f32(float [[X]])
29 ; CHECK-NEXT: [[__YLOGX:%.*]] = fmul fast float [[Y]], [[__LOG2]]
30 ; CHECK-NEXT: [[__EXP2:%.*]] = call fast float @llvm.exp2.f32(float [[__YLOGX]])
31 ; CHECK-NEXT: ret float [[__EXP2]]
33 %powr = tail call fast float @_Z4powrff(float %x, float %y)
37 define <2 x float> @test_powr_fast_v2f32(<2 x float> %x, <2 x float> %y) {
38 ; CHECK-LABEL: define <2 x float> @test_powr_fast_v2f32
39 ; CHECK-SAME: (<2 x float> [[X:%.*]], <2 x float> [[Y:%.*]]) {
40 ; CHECK-NEXT: [[__LOG2:%.*]] = call fast <2 x float> @llvm.log2.v2f32(<2 x float> [[X]])
41 ; CHECK-NEXT: [[__YLOGX:%.*]] = fmul fast <2 x float> [[Y]], [[__LOG2]]
42 ; CHECK-NEXT: [[__EXP2:%.*]] = call fast <2 x float> @llvm.exp2.v2f32(<2 x float> [[__YLOGX]])
43 ; CHECK-NEXT: ret <2 x float> [[__EXP2]]
45 %powr = tail call fast <2 x float> @_Z4powrDv2_fS_(<2 x float> %x, <2 x float> %y)
49 define float @test_powr_afn_f32(float %x, float %y) {
50 ; CHECK-LABEL: define float @test_powr_afn_f32
51 ; CHECK-SAME: (float [[X:%.*]], float [[Y:%.*]]) {
52 ; CHECK-NEXT: [[POWR:%.*]] = tail call afn float @_Z4powrff(float [[X]], float [[Y]])
53 ; CHECK-NEXT: ret float [[POWR]]
55 %powr = tail call afn float @_Z4powrff(float %x, float %y)
59 define float @test_powr_afn_f32_nnan(float %x, float %y) {
60 ; CHECK-LABEL: define float @test_powr_afn_f32_nnan
61 ; CHECK-SAME: (float [[X:%.*]], float [[Y:%.*]]) {
62 ; CHECK-NEXT: [[POWR:%.*]] = tail call nnan afn float @_Z4powrff(float [[X]], float [[Y]])
63 ; CHECK-NEXT: ret float [[POWR]]
65 %powr = tail call afn nnan float @_Z4powrff(float %x, float %y)
69 define <2 x float> @test_powr_afn_v2f32(<2 x float> %x, <2 x float> %y) {
70 ; CHECK-LABEL: define <2 x float> @test_powr_afn_v2f32
71 ; CHECK-SAME: (<2 x float> [[X:%.*]], <2 x float> [[Y:%.*]]) {
72 ; CHECK-NEXT: [[POWR:%.*]] = tail call afn <2 x float> @_Z4powrDv2_fS_(<2 x float> [[X]], <2 x float> [[Y]])
73 ; CHECK-NEXT: ret <2 x float> [[POWR]]
75 %powr = tail call afn <2 x float> @_Z4powrDv2_fS_(<2 x float> %x, <2 x float> %y)
79 define <3 x float> @test_powr_afn_v3f32(<3 x float> %x, <3 x float> %y) {
80 ; CHECK-LABEL: define <3 x float> @test_powr_afn_v3f32
81 ; CHECK-SAME: (<3 x float> [[X:%.*]], <3 x float> [[Y:%.*]]) {
82 ; CHECK-NEXT: [[POWR:%.*]] = tail call afn <3 x float> @_Z4powrDv3_fS_(<3 x float> [[X]], <3 x float> [[Y]])
83 ; CHECK-NEXT: ret <3 x float> [[POWR]]
85 %powr = tail call afn <3 x float> @_Z4powrDv3_fS_(<3 x float> %x, <3 x float> %y)
89 define <4 x float> @test_powr_afn_v4f32(<4 x float> %x, <4 x float> %y) {
90 ; CHECK-LABEL: define <4 x float> @test_powr_afn_v4f32
91 ; CHECK-SAME: (<4 x float> [[X:%.*]], <4 x float> [[Y:%.*]]) {
92 ; CHECK-NEXT: [[POWR:%.*]] = tail call afn <4 x float> @_Z4powrDv4_fS_(<4 x float> [[X]], <4 x float> [[Y]])
93 ; CHECK-NEXT: ret <4 x float> [[POWR]]
95 %powr = tail call afn <4 x float> @_Z4powrDv4_fS_(<4 x float> %x, <4 x float> %y)
99 define <8 x float> @test_powr_afn_v8f32(<8 x float> %x, <8 x float> %y) {
100 ; CHECK-LABEL: define <8 x float> @test_powr_afn_v8f32
101 ; CHECK-SAME: (<8 x float> [[X:%.*]], <8 x float> [[Y:%.*]]) {
102 ; CHECK-NEXT: [[POWR:%.*]] = tail call afn <8 x float> @_Z4powrDv8_fS_(<8 x float> [[X]], <8 x float> [[Y]])
103 ; CHECK-NEXT: ret <8 x float> [[POWR]]
105 %powr = tail call afn <8 x float> @_Z4powrDv8_fS_(<8 x float> %x, <8 x float> %y)
106 ret <8 x float> %powr
109 define <16 x float> @test_powr_afn_v16f32(<16 x float> %x, <16 x float> %y) {
110 ; CHECK-LABEL: define <16 x float> @test_powr_afn_v16f32
111 ; CHECK-SAME: (<16 x float> [[X:%.*]], <16 x float> [[Y:%.*]]) {
112 ; CHECK-NEXT: [[POWR:%.*]] = tail call afn <16 x float> @_Z4powrDv16_fS_(<16 x float> [[X]], <16 x float> [[Y]])
113 ; CHECK-NEXT: ret <16 x float> [[POWR]]
115 %powr = tail call afn <16 x float> @_Z4powrDv16_fS_(<16 x float> %x, <16 x float> %y)
116 ret <16 x float> %powr
119 define double @test_powr_afn_f64(double %x, double %y) {
120 ; CHECK-LABEL: define double @test_powr_afn_f64
121 ; CHECK-SAME: (double [[X:%.*]], double [[Y:%.*]]) {
122 ; CHECK-NEXT: [[POWR:%.*]] = tail call afn double @_Z4powrdd(double [[X]], double [[Y]])
123 ; CHECK-NEXT: ret double [[POWR]]
125 %powr = tail call afn double @_Z4powrdd(double %x, double %y)
129 define <2 x double> @test_powr_afn_v2f64(<2 x double> %x, <2 x double> %y) {
130 ; CHECK-LABEL: define <2 x double> @test_powr_afn_v2f64
131 ; CHECK-SAME: (<2 x double> [[X:%.*]], <2 x double> [[Y:%.*]]) {
132 ; CHECK-NEXT: [[POWR:%.*]] = tail call afn <2 x double> @_Z4powrDv2_dS_(<2 x double> [[X]], <2 x double> [[Y]])
133 ; CHECK-NEXT: ret <2 x double> [[POWR]]
135 %powr = tail call afn <2 x double> @_Z4powrDv2_dS_(<2 x double> %x, <2 x double> %y)
136 ret <2 x double> %powr
139 define <3 x double> @test_powr_afn_v3f64(<3 x double> %x, <3 x double> %y) {
140 ; CHECK-LABEL: define <3 x double> @test_powr_afn_v3f64
141 ; CHECK-SAME: (<3 x double> [[X:%.*]], <3 x double> [[Y:%.*]]) {
142 ; CHECK-NEXT: [[POWR:%.*]] = tail call afn <3 x double> @_Z4powrDv3_dS_(<3 x double> [[X]], <3 x double> [[Y]])
143 ; CHECK-NEXT: ret <3 x double> [[POWR]]
145 %powr = tail call afn <3 x double> @_Z4powrDv3_dS_(<3 x double> %x, <3 x double> %y)
146 ret <3 x double> %powr
149 define <4 x double> @test_powr_afn_v4f64(<4 x double> %x, <4 x double> %y) {
150 ; CHECK-LABEL: define <4 x double> @test_powr_afn_v4f64
151 ; CHECK-SAME: (<4 x double> [[X:%.*]], <4 x double> [[Y:%.*]]) {
152 ; CHECK-NEXT: [[POWR:%.*]] = tail call afn <4 x double> @_Z4powrDv4_dS_(<4 x double> [[X]], <4 x double> [[Y]])
153 ; CHECK-NEXT: ret <4 x double> [[POWR]]
155 %powr = tail call afn <4 x double> @_Z4powrDv4_dS_(<4 x double> %x, <4 x double> %y)
156 ret <4 x double> %powr
159 define <8 x double> @test_powr_afn_v8f64(<8 x double> %x, <8 x double> %y) {
160 ; CHECK-LABEL: define <8 x double> @test_powr_afn_v8f64
161 ; CHECK-SAME: (<8 x double> [[X:%.*]], <8 x double> [[Y:%.*]]) {
162 ; CHECK-NEXT: [[POWR:%.*]] = tail call afn <8 x double> @_Z4powrDv8_dS_(<8 x double> [[X]], <8 x double> [[Y]])
163 ; CHECK-NEXT: ret <8 x double> [[POWR]]
165 %powr = tail call afn <8 x double> @_Z4powrDv8_dS_(<8 x double> %x, <8 x double> %y)
166 ret <8 x double> %powr
169 define <16 x double> @test_powr_afn_v16f64(<16 x double> %x, <16 x double> %y) {
170 ; CHECK-LABEL: define <16 x double> @test_powr_afn_v16f64
171 ; CHECK-SAME: (<16 x double> [[X:%.*]], <16 x double> [[Y:%.*]]) {
172 ; CHECK-NEXT: [[POWR:%.*]] = tail call afn <16 x double> @_Z4powrDv16_dS_(<16 x double> [[X]], <16 x double> [[Y]])
173 ; CHECK-NEXT: ret <16 x double> [[POWR]]
175 %powr = tail call afn <16 x double> @_Z4powrDv16_dS_(<16 x double> %x, <16 x double> %y)
176 ret <16 x double> %powr
179 define half @test_powr_afn_f16(half %x, half %y) {
180 ; CHECK-LABEL: define half @test_powr_afn_f16
181 ; CHECK-SAME: (half [[X:%.*]], half [[Y:%.*]]) {
182 ; CHECK-NEXT: [[POWR:%.*]] = tail call afn half @_Z4powrDhDh(half [[X]], half [[Y]])
183 ; CHECK-NEXT: ret half [[POWR]]
185 %powr = tail call afn half @_Z4powrDhDh(half %x, half %y)
189 define <2 x half> @test_powr_afn_v2f16(<2 x half> %x, <2 x half> %y) {
190 ; CHECK-LABEL: define <2 x half> @test_powr_afn_v2f16
191 ; CHECK-SAME: (<2 x half> [[X:%.*]], <2 x half> [[Y:%.*]]) {
192 ; CHECK-NEXT: [[POWR:%.*]] = tail call afn <2 x half> @_Z4powrDv2_DhS_(<2 x half> [[X]], <2 x half> [[Y]])
193 ; CHECK-NEXT: ret <2 x half> [[POWR]]
195 %powr = tail call afn <2 x half> @_Z4powrDv2_DhS_(<2 x half> %x, <2 x half> %y)
199 define <3 x half> @test_powr_afn_v3f16(<3 x half> %x, <3 x half> %y) {
200 ; CHECK-LABEL: define <3 x half> @test_powr_afn_v3f16
201 ; CHECK-SAME: (<3 x half> [[X:%.*]], <3 x half> [[Y:%.*]]) {
202 ; CHECK-NEXT: [[POWR:%.*]] = tail call afn <3 x half> @_Z4powrDv3_DhS_(<3 x half> [[X]], <3 x half> [[Y]])
203 ; CHECK-NEXT: ret <3 x half> [[POWR]]
205 %powr = tail call afn <3 x half> @_Z4powrDv3_DhS_(<3 x half> %x, <3 x half> %y)
209 define <4 x half> @test_powr_afn_v4f16(<4 x half> %x, <4 x half> %y) {
210 ; CHECK-LABEL: define <4 x half> @test_powr_afn_v4f16
211 ; CHECK-SAME: (<4 x half> [[X:%.*]], <4 x half> [[Y:%.*]]) {
212 ; CHECK-NEXT: [[POWR:%.*]] = tail call afn <4 x half> @_Z4powrDv4_DhS_(<4 x half> [[X]], <4 x half> [[Y]])
213 ; CHECK-NEXT: ret <4 x half> [[POWR]]
215 %powr = tail call afn <4 x half> @_Z4powrDv4_DhS_(<4 x half> %x, <4 x half> %y)
219 define <8 x half> @test_powr_afn_v8f16(<8 x half> %x, <8 x half> %y) {
220 ; CHECK-LABEL: define <8 x half> @test_powr_afn_v8f16
221 ; CHECK-SAME: (<8 x half> [[X:%.*]], <8 x half> [[Y:%.*]]) {
222 ; CHECK-NEXT: [[POWR:%.*]] = tail call afn <8 x half> @_Z4powrDv8_DhS_(<8 x half> [[X]], <8 x half> [[Y]])
223 ; CHECK-NEXT: ret <8 x half> [[POWR]]
225 %powr = tail call afn <8 x half> @_Z4powrDv8_DhS_(<8 x half> %x, <8 x half> %y)
229 define <16 x half> @test_powr_afn_v16f16(<16 x half> %x, <16 x half> %y) {
230 ; CHECK-LABEL: define <16 x half> @test_powr_afn_v16f16
231 ; CHECK-SAME: (<16 x half> [[X:%.*]], <16 x half> [[Y:%.*]]) {
232 ; CHECK-NEXT: [[POWR:%.*]] = tail call afn <16 x half> @_Z4powrDv16_DhS_(<16 x half> [[X]], <16 x half> [[Y]])
233 ; CHECK-NEXT: ret <16 x half> [[POWR]]
235 %powr = tail call afn <16 x half> @_Z4powrDv16_DhS_(<16 x half> %x, <16 x half> %y)
236 ret <16 x half> %powr
239 define float @test_powr_f32(float %x, float %y) {
240 ; CHECK-LABEL: define float @test_powr_f32
241 ; CHECK-SAME: (float [[X:%.*]], float [[Y:%.*]]) {
242 ; CHECK-NEXT: [[POWR:%.*]] = tail call float @_Z4powrff(float [[X]], float [[Y]])
243 ; CHECK-NEXT: ret float [[POWR]]
245 %powr = tail call float @_Z4powrff(float %x, float %y)
249 define float @test_powr_f32_nnan(float %x, float %y) {
250 ; CHECK-LABEL: define float @test_powr_f32_nnan
251 ; CHECK-SAME: (float [[X:%.*]], float [[Y:%.*]]) {
252 ; CHECK-NEXT: [[POWR:%.*]] = tail call nnan float @_Z4powrff(float [[X]], float [[Y]])
253 ; CHECK-NEXT: ret float [[POWR]]
255 %powr = tail call nnan float @_Z4powrff(float %x, float %y)
259 define <2 x float> @test_powr_v2f32(<2 x float> %x, <2 x float> %y) {
260 ; CHECK-LABEL: define <2 x float> @test_powr_v2f32
261 ; CHECK-SAME: (<2 x float> [[X:%.*]], <2 x float> [[Y:%.*]]) {
262 ; CHECK-NEXT: [[POWR:%.*]] = tail call <2 x float> @_Z4powrDv2_fS_(<2 x float> [[X]], <2 x float> [[Y]])
263 ; CHECK-NEXT: ret <2 x float> [[POWR]]
265 %powr = tail call <2 x float> @_Z4powrDv2_fS_(<2 x float> %x, <2 x float> %y)
266 ret <2 x float> %powr
269 define <3 x float> @test_powr_v3f32(<3 x float> %x, <3 x float> %y) {
270 ; CHECK-LABEL: define <3 x float> @test_powr_v3f32
271 ; CHECK-SAME: (<3 x float> [[X:%.*]], <3 x float> [[Y:%.*]]) {
272 ; CHECK-NEXT: [[POWR:%.*]] = tail call <3 x float> @_Z4powrDv3_fS_(<3 x float> [[X]], <3 x float> [[Y]])
273 ; CHECK-NEXT: ret <3 x float> [[POWR]]
275 %powr = tail call <3 x float> @_Z4powrDv3_fS_(<3 x float> %x, <3 x float> %y)
276 ret <3 x float> %powr
279 define <4 x float> @test_powr_v4f32(<4 x float> %x, <4 x float> %y) {
280 ; CHECK-LABEL: define <4 x float> @test_powr_v4f32
281 ; CHECK-SAME: (<4 x float> [[X:%.*]], <4 x float> [[Y:%.*]]) {
282 ; CHECK-NEXT: [[POWR:%.*]] = tail call <4 x float> @_Z4powrDv4_fS_(<4 x float> [[X]], <4 x float> [[Y]])
283 ; CHECK-NEXT: ret <4 x float> [[POWR]]
285 %powr = tail call <4 x float> @_Z4powrDv4_fS_(<4 x float> %x, <4 x float> %y)
286 ret <4 x float> %powr
289 define <8 x float> @test_powr_v8f32(<8 x float> %x, <8 x float> %y) {
290 ; CHECK-LABEL: define <8 x float> @test_powr_v8f32
291 ; CHECK-SAME: (<8 x float> [[X:%.*]], <8 x float> [[Y:%.*]]) {
292 ; CHECK-NEXT: [[POWR:%.*]] = tail call <8 x float> @_Z4powrDv8_fS_(<8 x float> [[X]], <8 x float> [[Y]])
293 ; CHECK-NEXT: ret <8 x float> [[POWR]]
295 %powr = tail call <8 x float> @_Z4powrDv8_fS_(<8 x float> %x, <8 x float> %y)
296 ret <8 x float> %powr
299 define <16 x float> @test_powr_v16f32(<16 x float> %x, <16 x float> %y) {
300 ; CHECK-LABEL: define <16 x float> @test_powr_v16f32
301 ; CHECK-SAME: (<16 x float> [[X:%.*]], <16 x float> [[Y:%.*]]) {
302 ; CHECK-NEXT: [[POWR:%.*]] = tail call <16 x float> @_Z4powrDv16_fS_(<16 x float> [[X]], <16 x float> [[Y]])
303 ; CHECK-NEXT: ret <16 x float> [[POWR]]
305 %powr = tail call <16 x float> @_Z4powrDv16_fS_(<16 x float> %x, <16 x float> %y)
306 ret <16 x float> %powr
309 define double @test_powr_f64(double %x, double %y) {
310 ; CHECK-LABEL: define double @test_powr_f64
311 ; CHECK-SAME: (double [[X:%.*]], double [[Y:%.*]]) {
312 ; CHECK-NEXT: [[POWR:%.*]] = tail call double @_Z4powrdd(double [[X]], double [[Y]])
313 ; CHECK-NEXT: ret double [[POWR]]
315 %powr = tail call double @_Z4powrdd(double %x, double %y)
319 define <2 x double> @test_powr_v2f64(<2 x double> %x, <2 x double> %y) {
320 ; CHECK-LABEL: define <2 x double> @test_powr_v2f64
321 ; CHECK-SAME: (<2 x double> [[X:%.*]], <2 x double> [[Y:%.*]]) {
322 ; CHECK-NEXT: [[POWR:%.*]] = tail call <2 x double> @_Z4powrDv2_dS_(<2 x double> [[X]], <2 x double> [[Y]])
323 ; CHECK-NEXT: ret <2 x double> [[POWR]]
325 %powr = tail call <2 x double> @_Z4powrDv2_dS_(<2 x double> %x, <2 x double> %y)
326 ret <2 x double> %powr
329 define <3 x double> @test_powr_v3f64(<3 x double> %x, <3 x double> %y) {
330 ; CHECK-LABEL: define <3 x double> @test_powr_v3f64
331 ; CHECK-SAME: (<3 x double> [[X:%.*]], <3 x double> [[Y:%.*]]) {
332 ; CHECK-NEXT: [[POWR:%.*]] = tail call <3 x double> @_Z4powrDv3_dS_(<3 x double> [[X]], <3 x double> [[Y]])
333 ; CHECK-NEXT: ret <3 x double> [[POWR]]
335 %powr = tail call <3 x double> @_Z4powrDv3_dS_(<3 x double> %x, <3 x double> %y)
336 ret <3 x double> %powr
339 define <4 x double> @test_powr_v4f64(<4 x double> %x, <4 x double> %y) {
340 ; CHECK-LABEL: define <4 x double> @test_powr_v4f64
341 ; CHECK-SAME: (<4 x double> [[X:%.*]], <4 x double> [[Y:%.*]]) {
342 ; CHECK-NEXT: [[POWR:%.*]] = tail call <4 x double> @_Z4powrDv4_dS_(<4 x double> [[X]], <4 x double> [[Y]])
343 ; CHECK-NEXT: ret <4 x double> [[POWR]]
345 %powr = tail call <4 x double> @_Z4powrDv4_dS_(<4 x double> %x, <4 x double> %y)
346 ret <4 x double> %powr
349 define <8 x double> @test_powr_v8f64(<8 x double> %x, <8 x double> %y) {
350 ; CHECK-LABEL: define <8 x double> @test_powr_v8f64
351 ; CHECK-SAME: (<8 x double> [[X:%.*]], <8 x double> [[Y:%.*]]) {
352 ; CHECK-NEXT: [[POWR:%.*]] = tail call <8 x double> @_Z4powrDv8_dS_(<8 x double> [[X]], <8 x double> [[Y]])
353 ; CHECK-NEXT: ret <8 x double> [[POWR]]
355 %powr = tail call <8 x double> @_Z4powrDv8_dS_(<8 x double> %x, <8 x double> %y)
356 ret <8 x double> %powr
359 define <16 x double> @test_powr_v16f64(<16 x double> %x, <16 x double> %y) {
360 ; CHECK-LABEL: define <16 x double> @test_powr_v16f64
361 ; CHECK-SAME: (<16 x double> [[X:%.*]], <16 x double> [[Y:%.*]]) {
362 ; CHECK-NEXT: [[POWR:%.*]] = tail call <16 x double> @_Z4powrDv16_dS_(<16 x double> [[X]], <16 x double> [[Y]])
363 ; CHECK-NEXT: ret <16 x double> [[POWR]]
365 %powr = tail call <16 x double> @_Z4powrDv16_dS_(<16 x double> %x, <16 x double> %y)
366 ret <16 x double> %powr
369 define half @test_powr_f16(half %x, half %y) {
370 ; CHECK-LABEL: define half @test_powr_f16
371 ; CHECK-SAME: (half [[X:%.*]], half [[Y:%.*]]) {
372 ; CHECK-NEXT: [[POWR:%.*]] = tail call half @_Z4powrDhDh(half [[X]], half [[Y]])
373 ; CHECK-NEXT: ret half [[POWR]]
375 %powr = tail call half @_Z4powrDhDh(half %x, half %y)
379 define <2 x half> @test_powr_v2f16(<2 x half> %x, <2 x half> %y) {
380 ; CHECK-LABEL: define <2 x half> @test_powr_v2f16
381 ; CHECK-SAME: (<2 x half> [[X:%.*]], <2 x half> [[Y:%.*]]) {
382 ; CHECK-NEXT: [[POWR:%.*]] = tail call <2 x half> @_Z4powrDv2_DhS_(<2 x half> [[X]], <2 x half> [[Y]])
383 ; CHECK-NEXT: ret <2 x half> [[POWR]]
385 %powr = tail call <2 x half> @_Z4powrDv2_DhS_(<2 x half> %x, <2 x half> %y)
389 define <3 x half> @test_powr_v3f16(<3 x half> %x, <3 x half> %y) {
390 ; CHECK-LABEL: define <3 x half> @test_powr_v3f16
391 ; CHECK-SAME: (<3 x half> [[X:%.*]], <3 x half> [[Y:%.*]]) {
392 ; CHECK-NEXT: [[POWR:%.*]] = tail call <3 x half> @_Z4powrDv3_DhS_(<3 x half> [[X]], <3 x half> [[Y]])
393 ; CHECK-NEXT: ret <3 x half> [[POWR]]
395 %powr = tail call <3 x half> @_Z4powrDv3_DhS_(<3 x half> %x, <3 x half> %y)
399 define <4 x half> @test_powr_v4f16(<4 x half> %x, <4 x half> %y) {
400 ; CHECK-LABEL: define <4 x half> @test_powr_v4f16
401 ; CHECK-SAME: (<4 x half> [[X:%.*]], <4 x half> [[Y:%.*]]) {
402 ; CHECK-NEXT: [[POWR:%.*]] = tail call <4 x half> @_Z4powrDv4_DhS_(<4 x half> [[X]], <4 x half> [[Y]])
403 ; CHECK-NEXT: ret <4 x half> [[POWR]]
405 %powr = tail call <4 x half> @_Z4powrDv4_DhS_(<4 x half> %x, <4 x half> %y)
409 define <8 x half> @test_powr_v8f16(<8 x half> %x, <8 x half> %y) {
410 ; CHECK-LABEL: define <8 x half> @test_powr_v8f16
411 ; CHECK-SAME: (<8 x half> [[X:%.*]], <8 x half> [[Y:%.*]]) {
412 ; CHECK-NEXT: [[POWR:%.*]] = tail call <8 x half> @_Z4powrDv8_DhS_(<8 x half> [[X]], <8 x half> [[Y]])
413 ; CHECK-NEXT: ret <8 x half> [[POWR]]
415 %powr = tail call <8 x half> @_Z4powrDv8_DhS_(<8 x half> %x, <8 x half> %y)
419 define <16 x half> @test_powr_v16f16(<16 x half> %x, <16 x half> %y) {
420 ; CHECK-LABEL: define <16 x half> @test_powr_v16f16
421 ; CHECK-SAME: (<16 x half> [[X:%.*]], <16 x half> [[Y:%.*]]) {
422 ; CHECK-NEXT: [[POWR:%.*]] = tail call <16 x half> @_Z4powrDv16_DhS_(<16 x half> [[X]], <16 x half> [[Y]])
423 ; CHECK-NEXT: ret <16 x half> [[POWR]]
425 %powr = tail call <16 x half> @_Z4powrDv16_DhS_(<16 x half> %x, <16 x half> %y)
426 ret <16 x half> %powr
429 define float @test_powr_afn_f32_minsize(float %x, float %y) #0 {
430 ; CHECK-LABEL: define float @test_powr_afn_f32_minsize
431 ; CHECK-SAME: (float [[X:%.*]], float [[Y:%.*]]) #[[ATTR0:[0-9]+]] {
432 ; CHECK-NEXT: [[POWR:%.*]] = tail call afn float @_Z4powrff(float [[X]], float [[Y]])
433 ; CHECK-NEXT: ret float [[POWR]]
435 %powr = tail call afn float @_Z4powrff(float %x, float %y)
439 define float @test_powr_afn_f32_nnan_minsize(float %x, float %y) #0 {
440 ; CHECK-LABEL: define float @test_powr_afn_f32_nnan_minsize
441 ; CHECK-SAME: (float [[X:%.*]], float [[Y:%.*]]) #[[ATTR0]] {
442 ; CHECK-NEXT: [[POWR:%.*]] = tail call nnan afn float @_Z4powrff(float [[X]], float [[Y]])
443 ; CHECK-NEXT: ret float [[POWR]]
445 %powr = tail call afn nnan float @_Z4powrff(float %x, float %y)
449 define float @test_powr_afn_f32_noinline(float %x, float %y) {
450 ; CHECK-LABEL: define float @test_powr_afn_f32_noinline
451 ; CHECK-SAME: (float [[X:%.*]], float [[Y:%.*]]) {
452 ; CHECK-NEXT: [[POWR:%.*]] = tail call afn float @_Z4powrff(float [[X]], float [[Y]]) #[[ATTR4:[0-9]+]]
453 ; CHECK-NEXT: ret float [[POWR]]
455 %powr = tail call afn float @_Z4powrff(float %x, float %y) #1
459 define float @test_powr_afn_f32_nnan_noinline(float %x, float %y) {
460 ; CHECK-LABEL: define float @test_powr_afn_f32_nnan_noinline
461 ; CHECK-SAME: (float [[X:%.*]], float [[Y:%.*]]) {
462 ; CHECK-NEXT: [[POWR:%.*]] = tail call nnan afn float @_Z4powrff(float [[X]], float [[Y]]) #[[ATTR4]]
463 ; CHECK-NEXT: ret float [[POWR]]
465 %powr = tail call afn nnan float @_Z4powrff(float %x, float %y) #1
469 define float @test_powr_afn_f32_strictfp(float %x, float %y) #2 {
470 ; CHECK-LABEL: define float @test_powr_afn_f32_strictfp
471 ; CHECK-SAME: (float [[X:%.*]], float [[Y:%.*]]) #[[ATTR1:[0-9]+]] {
472 ; CHECK-NEXT: [[POWR:%.*]] = tail call nnan nsz afn float @_Z4powrff(float [[X]], float [[Y]]) #[[ATTR1]]
473 ; CHECK-NEXT: ret float [[POWR]]
475 %powr = tail call afn nsz nnan float @_Z4powrff(float %x, float %y) #2
479 define float @test_powr_fast_f32_nobuiltin(float %x, float %y) {
480 ; CHECK-LABEL: define float @test_powr_fast_f32_nobuiltin
481 ; CHECK-SAME: (float [[X:%.*]], float [[Y:%.*]]) {
482 ; CHECK-NEXT: [[POWR:%.*]] = tail call fast float @_Z4powrff(float [[X]], float [[Y]]) #[[ATTR5:[0-9]+]]
483 ; CHECK-NEXT: ret float [[POWR]]
485 %powr = tail call fast float @_Z4powrff(float %x, float %y) #3
489 define float @test_powr_afn_f32_poison(float %x) {
490 ; CHECK-LABEL: define float @test_powr_afn_f32_poison
491 ; CHECK-SAME: (float [[X:%.*]]) {
492 ; CHECK-NEXT: [[POWR:%.*]] = tail call afn float @_Z4powrff(float [[X]], float poison)
493 ; CHECK-NEXT: ret float [[POWR]]
495 %powr = tail call afn float @_Z4powrff(float %x, float poison)
499 define float @test_powr_afn_f32_0.0(float %x) {
500 ; CHECK-LABEL: define float @test_powr_afn_f32_0.0
501 ; CHECK-SAME: (float [[X:%.*]]) {
502 ; CHECK-NEXT: ret float 1.000000e+00
504 %powr = tail call afn float @_Z4powrff(float %x, float 0.0)
508 define float @test_powr_afn_f32_neg0.0(float %x) {
509 ; CHECK-LABEL: define float @test_powr_afn_f32_neg0.0
510 ; CHECK-SAME: (float [[X:%.*]]) {
511 ; CHECK-NEXT: ret float 1.000000e+00
513 %powr = tail call afn float @_Z4powrff(float %x, float -0.0)
517 define <2 x float> @test_powr_afn_v2f32_0.0(<2 x float> %x) {
518 ; CHECK-LABEL: define <2 x float> @test_powr_afn_v2f32_0.0
519 ; CHECK-SAME: (<2 x float> [[X:%.*]]) {
520 ; CHECK-NEXT: ret <2 x float> splat (float 1.000000e+00)
522 %powr = tail call afn <2 x float> @_Z4powrDv2_fS_(<2 x float> %x, <2 x float> <float 0.0, float 0.0>)
523 ret <2 x float> %powr
526 define <2 x float> @test_powr_afn_v2f32_neg0.0(<2 x float> %x) {
527 ; CHECK-LABEL: define <2 x float> @test_powr_afn_v2f32_neg0.0
528 ; CHECK-SAME: (<2 x float> [[X:%.*]]) {
529 ; CHECK-NEXT: ret <2 x float> splat (float 1.000000e+00)
531 %powr = tail call afn <2 x float> @_Z4powrDv2_fS_(<2 x float> %x, <2 x float> <float -0.0, float -0.0>)
532 ret <2 x float> %powr
535 define <2 x float> @test_powr_afn_v2f32_plus_minus_0.0(<2 x float> %x) {
536 ; CHECK-LABEL: define <2 x float> @test_powr_afn_v2f32_plus_minus_0.0
537 ; CHECK-SAME: (<2 x float> [[X:%.*]]) {
538 ; CHECK-NEXT: [[POWR:%.*]] = tail call afn <2 x float> @_Z4powrDv2_fS_(<2 x float> [[X]], <2 x float> <float 0.000000e+00, float -0.000000e+00>)
539 ; CHECK-NEXT: ret <2 x float> [[POWR]]
541 %powr = tail call afn <2 x float> @_Z4powrDv2_fS_(<2 x float> %x, <2 x float> <float 0.0, float -0.0>)
542 ret <2 x float> %powr
545 define <3 x float> @test_powr_afn_v3f32_0.0_splat_undef(<3 x float> %x, <3 x float> %y) {
546 ; CHECK-LABEL: define <3 x float> @test_powr_afn_v3f32_0.0_splat_undef
547 ; CHECK-SAME: (<3 x float> [[X:%.*]], <3 x float> [[Y:%.*]]) {
548 ; CHECK-NEXT: ret <3 x float> splat (float 1.000000e+00)
550 %powr = tail call afn <3 x float> @_Z4powrDv3_fS_(<3 x float> %x, <3 x float> <float 0.0, float poison, float 0.0>)
551 ret <3 x float> %powr
554 define <3 x float> @test_powr_afn_v3f32_neg0.0_splat_undef(<3 x float> %x, <3 x float> %y) {
555 ; CHECK-LABEL: define <3 x float> @test_powr_afn_v3f32_neg0.0_splat_undef
556 ; CHECK-SAME: (<3 x float> [[X:%.*]], <3 x float> [[Y:%.*]]) {
557 ; CHECK-NEXT: ret <3 x float> splat (float 1.000000e+00)
559 %powr = tail call afn <3 x float> @_Z4powrDv3_fS_(<3 x float> %x, <3 x float> <float -0.0, float poison, float -0.0>)
560 ret <3 x float> %powr
563 define float @test_powr_afn_f32_0.5(float %x) {
564 ; CHECK-LABEL: define float @test_powr_afn_f32_0.5
565 ; CHECK-SAME: (float [[X:%.*]]) {
566 ; CHECK-NEXT: [[__POW2SQRT:%.*]] = call afn float @_Z4sqrtf(float [[X]])
567 ; CHECK-NEXT: ret float [[__POW2SQRT]]
569 %powr = tail call afn float @_Z4powrff(float %x, float 0.5)
573 define float @test_powr_afn_f32_neg0.5(float %x) {
574 ; CHECK-LABEL: define float @test_powr_afn_f32_neg0.5
575 ; CHECK-SAME: (float [[X:%.*]]) {
576 ; CHECK-NEXT: [[__POW2RSQRT:%.*]] = call afn float @_Z5rsqrtf(float [[X]])
577 ; CHECK-NEXT: ret float [[__POW2RSQRT]]
579 %powr = tail call afn float @_Z4powrff(float %x, float -0.5)
583 define <2 x float> @test_powr_afn_v2f32_0.5(<2 x float> %x) {
584 ; CHECK-LABEL: define <2 x float> @test_powr_afn_v2f32_0.5
585 ; CHECK-SAME: (<2 x float> [[X:%.*]]) {
586 ; CHECK-NEXT: [[__POW2SQRT:%.*]] = call afn <2 x float> @_Z4sqrtDv2_f(<2 x float> [[X]])
587 ; CHECK-NEXT: ret <2 x float> [[__POW2SQRT]]
589 %powr = tail call afn <2 x float> @_Z4powrDv2_fS_(<2 x float> %x, <2 x float> <float 0.5, float 0.5>)
590 ret <2 x float> %powr
593 define <2 x float> @test_powr_afn_v2f32_neg0.5(<2 x float> %x) {
594 ; CHECK-LABEL: define <2 x float> @test_powr_afn_v2f32_neg0.5
595 ; CHECK-SAME: (<2 x float> [[X:%.*]]) {
596 ; CHECK-NEXT: [[__POW2RSQRT:%.*]] = call afn <2 x float> @_Z5rsqrtDv2_f(<2 x float> [[X]])
597 ; CHECK-NEXT: ret <2 x float> [[__POW2RSQRT]]
599 %powr = tail call afn <2 x float> @_Z4powrDv2_fS_(<2 x float> %x, <2 x float> <float -0.5, float -0.5>)
600 ret <2 x float> %powr
603 define <2 x float> @test_powr_afn_v2f32_plus_minus_0.5(<2 x float> %x) {
604 ; CHECK-LABEL: define <2 x float> @test_powr_afn_v2f32_plus_minus_0.5
605 ; CHECK-SAME: (<2 x float> [[X:%.*]]) {
606 ; CHECK-NEXT: [[POWR:%.*]] = tail call afn <2 x float> @_Z4powrDv2_fS_(<2 x float> [[X]], <2 x float> <float 5.000000e-01, float -5.000000e-01>)
607 ; CHECK-NEXT: ret <2 x float> [[POWR]]
609 %powr = tail call afn <2 x float> @_Z4powrDv2_fS_(<2 x float> %x, <2 x float> <float 0.5, float -0.5>)
610 ret <2 x float> %powr
613 define <3 x float> @test_powr_afn_v3f32_0.5_splat_undef(<3 x float> %x, <3 x float> %y) {
614 ; CHECK-LABEL: define <3 x float> @test_powr_afn_v3f32_0.5_splat_undef
615 ; CHECK-SAME: (<3 x float> [[X:%.*]], <3 x float> [[Y:%.*]]) {
616 ; CHECK-NEXT: [[__POW2SQRT:%.*]] = call afn <3 x float> @_Z4sqrtDv3_f(<3 x float> [[X]])
617 ; CHECK-NEXT: ret <3 x float> [[__POW2SQRT]]
619 %powr = tail call afn <3 x float> @_Z4powrDv3_fS_(<3 x float> %x, <3 x float> <float 0.5, float poison, float 0.5>)
620 ret <3 x float> %powr
623 define <3 x float> @test_powr_afn_v3f32_neg0.5_splat_undef(<3 x float> %x, <3 x float> %y) {
624 ; CHECK-LABEL: define <3 x float> @test_powr_afn_v3f32_neg0.5_splat_undef
625 ; CHECK-SAME: (<3 x float> [[X:%.*]], <3 x float> [[Y:%.*]]) {
626 ; CHECK-NEXT: [[__POW2RSQRT:%.*]] = call afn <3 x float> @_Z5rsqrtDv3_f(<3 x float> [[X]])
627 ; CHECK-NEXT: ret <3 x float> [[__POW2RSQRT]]
629 %powr = tail call afn <3 x float> @_Z4powrDv3_fS_(<3 x float> %x, <3 x float> <float -0.5, float poison, float -0.5>)
630 ret <3 x float> %powr
633 define float @test_powr_afn_f32_1.0(float %x) {
634 ; CHECK-LABEL: define float @test_powr_afn_f32_1.0
635 ; CHECK-SAME: (float [[X:%.*]]) {
636 ; CHECK-NEXT: ret float [[X]]
638 %powr = tail call afn float @_Z4powrff(float %x, float 1.0)
642 define float @test_powr_afn_f32_neg1.0(float %x) {
643 ; CHECK-LABEL: define float @test_powr_afn_f32_neg1.0
644 ; CHECK-SAME: (float [[X:%.*]]) {
645 ; CHECK-NEXT: [[__POWRECIP:%.*]] = fdiv afn float 1.000000e+00, [[X]]
646 ; CHECK-NEXT: ret float [[__POWRECIP]]
648 %powr = tail call afn float @_Z4powrff(float %x, float -1.0)
652 define <2 x float> @test_powr_afn_v2f32_1.0(<2 x float> %x) {
653 ; CHECK-LABEL: define <2 x float> @test_powr_afn_v2f32_1.0
654 ; CHECK-SAME: (<2 x float> [[X:%.*]]) {
655 ; CHECK-NEXT: ret <2 x float> [[X]]
657 %powr = tail call afn <2 x float> @_Z4powrDv2_fS_(<2 x float> %x, <2 x float> <float 1.0, float 1.0>)
658 ret <2 x float> %powr
661 define <2 x float> @test_powr_afn_v2f32_neg1.0(<2 x float> %x) {
662 ; CHECK-LABEL: define <2 x float> @test_powr_afn_v2f32_neg1.0
663 ; CHECK-SAME: (<2 x float> [[X:%.*]]) {
664 ; CHECK-NEXT: [[__POWRECIP:%.*]] = fdiv afn <2 x float> splat (float 1.000000e+00), [[X]]
665 ; CHECK-NEXT: ret <2 x float> [[__POWRECIP]]
667 %powr = tail call afn <2 x float> @_Z4powrDv2_fS_(<2 x float> %x, <2 x float> <float -1.0, float -1.0>)
668 ret <2 x float> %powr
671 define <2 x float> @test_powr_afn_v2f32_plus_minus_1.0(<2 x float> %x) {
672 ; CHECK-LABEL: define <2 x float> @test_powr_afn_v2f32_plus_minus_1.0
673 ; CHECK-SAME: (<2 x float> [[X:%.*]]) {
674 ; CHECK-NEXT: [[POWR:%.*]] = tail call afn <2 x float> @_Z4powrDv2_fS_(<2 x float> [[X]], <2 x float> <float 1.000000e+00, float -1.000000e+00>)
675 ; CHECK-NEXT: ret <2 x float> [[POWR]]
677 %powr = tail call afn <2 x float> @_Z4powrDv2_fS_(<2 x float> %x, <2 x float> <float 1.0, float -1.0>)
678 ret <2 x float> %powr
681 define <3 x float> @test_powr_afn_v3f32_1.0_splat_undef(<3 x float> %x, <3 x float> %y) {
682 ; CHECK-LABEL: define <3 x float> @test_powr_afn_v3f32_1.0_splat_undef
683 ; CHECK-SAME: (<3 x float> [[X:%.*]], <3 x float> [[Y:%.*]]) {
684 ; CHECK-NEXT: ret <3 x float> [[X]]
686 %powr = tail call afn <3 x float> @_Z4powrDv3_fS_(<3 x float> %x, <3 x float> <float 1.0, float poison, float 1.0>)
687 ret <3 x float> %powr
690 define <3 x float> @test_powr_afn_v3f32_neg1.0_splat_undef(<3 x float> %x, <3 x float> %y) {
691 ; CHECK-LABEL: define <3 x float> @test_powr_afn_v3f32_neg1.0_splat_undef
692 ; CHECK-SAME: (<3 x float> [[X:%.*]], <3 x float> [[Y:%.*]]) {
693 ; CHECK-NEXT: [[__POWRECIP:%.*]] = fdiv afn <3 x float> splat (float 1.000000e+00), [[X]]
694 ; CHECK-NEXT: ret <3 x float> [[__POWRECIP]]
696 %powr = tail call afn <3 x float> @_Z4powrDv3_fS_(<3 x float> %x, <3 x float> <float -1.0, float poison, float -1.0>)
697 ret <3 x float> %powr
700 define float @test_powr_afn_f32_2.0(float %x) {
701 ; CHECK-LABEL: define float @test_powr_afn_f32_2.0
702 ; CHECK-SAME: (float [[X:%.*]]) {
703 ; CHECK-NEXT: [[__POW2:%.*]] = fmul afn float [[X]], [[X]]
704 ; CHECK-NEXT: ret float [[__POW2]]
706 %powr = tail call afn float @_Z4powrff(float %x, float 2.0)
710 define float @test_powr_afn_f32_neg2.0(float %x) {
711 ; CHECK-LABEL: define float @test_powr_afn_f32_neg2.0
712 ; CHECK-SAME: (float [[X:%.*]]) {
713 ; CHECK-NEXT: [[POWR:%.*]] = tail call afn float @_Z4powrff(float [[X]], float -2.000000e+00)
714 ; CHECK-NEXT: ret float [[POWR]]
716 %powr = tail call afn float @_Z4powrff(float %x, float -2.0)
720 define <2 x float> @test_powr_afn_v2f32_2.0(<2 x float> %x) {
721 ; CHECK-LABEL: define <2 x float> @test_powr_afn_v2f32_2.0
722 ; CHECK-SAME: (<2 x float> [[X:%.*]]) {
723 ; CHECK-NEXT: [[__POW2:%.*]] = fmul afn <2 x float> [[X]], [[X]]
724 ; CHECK-NEXT: ret <2 x float> [[__POW2]]
726 %powr = tail call afn <2 x float> @_Z4powrDv2_fS_(<2 x float> %x, <2 x float> <float 2.0, float 2.0>)
727 ret <2 x float> %powr
730 define <2 x float> @test_powr_afn_v2f32_neg2.0(<2 x float> %x) {
731 ; CHECK-LABEL: define <2 x float> @test_powr_afn_v2f32_neg2.0
732 ; CHECK-SAME: (<2 x float> [[X:%.*]]) {
733 ; CHECK-NEXT: [[POWR:%.*]] = tail call afn <2 x float> @_Z4powrDv2_fS_(<2 x float> [[X]], <2 x float> splat (float -2.000000e+00))
734 ; CHECK-NEXT: ret <2 x float> [[POWR]]
736 %powr = tail call afn <2 x float> @_Z4powrDv2_fS_(<2 x float> %x, <2 x float> <float -2.0, float -2.0>)
737 ret <2 x float> %powr
740 define <2 x float> @test_powr_afn_v2f32_plus_minus_2.0(<2 x float> %x) {
741 ; CHECK-LABEL: define <2 x float> @test_powr_afn_v2f32_plus_minus_2.0
742 ; CHECK-SAME: (<2 x float> [[X:%.*]]) {
743 ; CHECK-NEXT: [[POWR:%.*]] = tail call afn <2 x float> @_Z4powrDv2_fS_(<2 x float> [[X]], <2 x float> <float 2.000000e+00, float -2.000000e+00>)
744 ; CHECK-NEXT: ret <2 x float> [[POWR]]
746 %powr = tail call afn <2 x float> @_Z4powrDv2_fS_(<2 x float> %x, <2 x float> <float 2.0, float -2.0>)
747 ret <2 x float> %powr
750 define float @test_powr_afn_f32_3.0(float %x) {
751 ; CHECK-LABEL: define float @test_powr_afn_f32_3.0
752 ; CHECK-SAME: (float [[X:%.*]]) {
753 ; CHECK-NEXT: [[POWR:%.*]] = tail call afn float @_Z4powrff(float [[X]], float 3.000000e+00)
754 ; CHECK-NEXT: ret float [[POWR]]
756 %powr = tail call afn float @_Z4powrff(float %x, float 3.0)
760 define float @test_powr_afn_f32_neg3.0(float %x) {
761 ; CHECK-LABEL: define float @test_powr_afn_f32_neg3.0
762 ; CHECK-SAME: (float [[X:%.*]]) {
763 ; CHECK-NEXT: [[POWR:%.*]] = tail call afn float @_Z4powrff(float [[X]], float -3.000000e+00)
764 ; CHECK-NEXT: ret float [[POWR]]
766 %powr = tail call afn float @_Z4powrff(float %x, float -3.0)
770 define <2 x float> @test_powr_afn_v2f32_3.0(<2 x float> %x) {
771 ; CHECK-LABEL: define <2 x float> @test_powr_afn_v2f32_3.0
772 ; CHECK-SAME: (<2 x float> [[X:%.*]]) {
773 ; CHECK-NEXT: [[POWR:%.*]] = tail call afn <2 x float> @_Z4powrDv2_fS_(<2 x float> [[X]], <2 x float> splat (float 3.000000e+00))
774 ; CHECK-NEXT: ret <2 x float> [[POWR]]
776 %powr = tail call afn <2 x float> @_Z4powrDv2_fS_(<2 x float> %x, <2 x float> <float 3.0, float 3.0>)
777 ret <2 x float> %powr
780 define <2 x float> @test_powr_afn_v2f32_neg3.0(<2 x float> %x) {
781 ; CHECK-LABEL: define <2 x float> @test_powr_afn_v2f32_neg3.0
782 ; CHECK-SAME: (<2 x float> [[X:%.*]]) {
783 ; CHECK-NEXT: [[POWR:%.*]] = tail call afn <2 x float> @_Z4powrDv2_fS_(<2 x float> [[X]], <2 x float> splat (float -3.000000e+00))
784 ; CHECK-NEXT: ret <2 x float> [[POWR]]
786 %powr = tail call afn <2 x float> @_Z4powrDv2_fS_(<2 x float> %x, <2 x float> <float -3.0, float -3.0>)
787 ret <2 x float> %powr
790 define <2 x float> @test_powr_afn_v2f32_plus_minus_3.0(<2 x float> %x) {
791 ; CHECK-LABEL: define <2 x float> @test_powr_afn_v2f32_plus_minus_3.0
792 ; CHECK-SAME: (<2 x float> [[X:%.*]]) {
793 ; CHECK-NEXT: [[POWR:%.*]] = tail call afn <2 x float> @_Z4powrDv2_fS_(<2 x float> [[X]], <2 x float> <float 3.000000e+00, float -3.000000e+00>)
794 ; CHECK-NEXT: ret <2 x float> [[POWR]]
796 %powr = tail call afn <2 x float> @_Z4powrDv2_fS_(<2 x float> %x, <2 x float> <float 3.0, float -3.0>)
797 ret <2 x float> %powr
800 define float @test_powr_afn_f32_3.99(float %x) {
801 ; CHECK-LABEL: define float @test_powr_afn_f32_3.99
802 ; CHECK-SAME: (float [[X:%.*]]) {
803 ; CHECK-NEXT: [[POWR:%.*]] = tail call afn float @_Z4powrff(float [[X]], float 0x400FEB8520000000)
804 ; CHECK-NEXT: ret float [[POWR]]
806 %powr = tail call afn float @_Z4powrff(float %x, float 0x400FEB8520000000)
810 define float @test_powr_afn_f32_neg3.99(float %x) {
811 ; CHECK-LABEL: define float @test_powr_afn_f32_neg3.99
812 ; CHECK-SAME: (float [[X:%.*]]) {
813 ; CHECK-NEXT: [[POWR:%.*]] = tail call afn float @_Z4powrff(float [[X]], float 0xC00FEB8520000000)
814 ; CHECK-NEXT: ret float [[POWR]]
816 %powr = tail call afn float @_Z4powrff(float %x, float 0xC00FEB8520000000)
820 define <2 x float> @test_powr_afn_v2f32_3.99(<2 x float> %x) {
821 ; CHECK-LABEL: define <2 x float> @test_powr_afn_v2f32_3.99
822 ; CHECK-SAME: (<2 x float> [[X:%.*]]) {
823 ; CHECK-NEXT: [[POWR:%.*]] = tail call afn <2 x float> @_Z4powrDv2_fS_(<2 x float> [[X]], <2 x float> splat (float 0x400FEB8520000000))
824 ; CHECK-NEXT: ret <2 x float> [[POWR]]
826 %powr = tail call afn <2 x float> @_Z4powrDv2_fS_(<2 x float> %x, <2 x float> <float 0x400FEB8520000000, float 0x400FEB8520000000>)
827 ret <2 x float> %powr
830 define <2 x float> @test_powr_afn_v2f32_neg3.99(<2 x float> %x) {
831 ; CHECK-LABEL: define <2 x float> @test_powr_afn_v2f32_neg3.99
832 ; CHECK-SAME: (<2 x float> [[X:%.*]]) {
833 ; CHECK-NEXT: [[POWR:%.*]] = tail call afn <2 x float> @_Z4powrDv2_fS_(<2 x float> [[X]], <2 x float> splat (float 0xC00FEB8520000000))
834 ; CHECK-NEXT: ret <2 x float> [[POWR]]
836 %powr = tail call afn <2 x float> @_Z4powrDv2_fS_(<2 x float> %x, <2 x float> <float 0xC00FEB8520000000, float 0xC00FEB8520000000>)
837 ret <2 x float> %powr
840 define <2 x float> @test_powr_afn_v2f32_plus_minus_3.99(<2 x float> %x) {
841 ; CHECK-LABEL: define <2 x float> @test_powr_afn_v2f32_plus_minus_3.99
842 ; CHECK-SAME: (<2 x float> [[X:%.*]]) {
843 ; CHECK-NEXT: [[POWR:%.*]] = tail call afn <2 x float> @_Z4powrDv2_fS_(<2 x float> [[X]], <2 x float> <float 0x400FEB8520000000, float 0xC00FEB8520000000>)
844 ; CHECK-NEXT: ret <2 x float> [[POWR]]
846 %powr = tail call afn <2 x float> @_Z4powrDv2_fS_(<2 x float> %x, <2 x float> <float 0x400FEB8520000000, float 0xC00FEB8520000000>)
847 ret <2 x float> %powr
850 define float @test_powr_afn_f32_8.0(float %x) {
851 ; CHECK-LABEL: define float @test_powr_afn_f32_8.0
852 ; CHECK-SAME: (float [[X:%.*]]) {
853 ; CHECK-NEXT: [[POWR:%.*]] = tail call afn float @_Z4powrff(float [[X]], float 8.000000e+00)
854 ; CHECK-NEXT: ret float [[POWR]]
856 %powr = tail call afn float @_Z4powrff(float %x, float 8.0)
860 define float @test_powr_afn_f32_neg8.0(float %x) {
861 ; CHECK-LABEL: define float @test_powr_afn_f32_neg8.0
862 ; CHECK-SAME: (float [[X:%.*]]) {
863 ; CHECK-NEXT: [[POWR:%.*]] = tail call afn float @_Z4powrff(float [[X]], float -8.000000e+00)
864 ; CHECK-NEXT: ret float [[POWR]]
866 %powr = tail call afn float @_Z4powrff(float %x, float -8.0)
870 define <2 x float> @test_powr_afn_v2f32_8.0(<2 x float> %x) {
871 ; CHECK-LABEL: define <2 x float> @test_powr_afn_v2f32_8.0
872 ; CHECK-SAME: (<2 x float> [[X:%.*]]) {
873 ; CHECK-NEXT: [[POWR:%.*]] = tail call afn <2 x float> @_Z4powrDv2_fS_(<2 x float> [[X]], <2 x float> splat (float 8.000000e+00))
874 ; CHECK-NEXT: ret <2 x float> [[POWR]]
876 %powr = tail call afn <2 x float> @_Z4powrDv2_fS_(<2 x float> %x, <2 x float> <float 8.0, float 8.0>)
877 ret <2 x float> %powr
880 define <2 x float> @test_powr_afn_v2f32_neg8.0(<2 x float> %x) {
881 ; CHECK-LABEL: define <2 x float> @test_powr_afn_v2f32_neg8.0
882 ; CHECK-SAME: (<2 x float> [[X:%.*]]) {
883 ; CHECK-NEXT: [[POWR:%.*]] = tail call afn <2 x float> @_Z4powrDv2_fS_(<2 x float> [[X]], <2 x float> splat (float -8.000000e+00))
884 ; CHECK-NEXT: ret <2 x float> [[POWR]]
886 %powr = tail call afn <2 x float> @_Z4powrDv2_fS_(<2 x float> %x, <2 x float> <float -8.0, float -8.0>)
887 ret <2 x float> %powr
890 define <2 x float> @test_powr_afn_v2f32_plus_minus_8.0(<2 x float> %x) {
891 ; CHECK-LABEL: define <2 x float> @test_powr_afn_v2f32_plus_minus_8.0
892 ; CHECK-SAME: (<2 x float> [[X:%.*]]) {
893 ; CHECK-NEXT: [[POWR:%.*]] = tail call afn <2 x float> @_Z4powrDv2_fS_(<2 x float> [[X]], <2 x float> <float 8.000000e+00, float -8.000000e+00>)
894 ; CHECK-NEXT: ret <2 x float> [[POWR]]
896 %powr = tail call afn <2 x float> @_Z4powrDv2_fS_(<2 x float> %x, <2 x float> <float 8.0, float -8.0>)
897 ret <2 x float> %powr
900 define float @test_powr_afn_f32_12.0(float %x) {
901 ; CHECK-LABEL: define float @test_powr_afn_f32_12.0
902 ; CHECK-SAME: (float [[X:%.*]]) {
903 ; CHECK-NEXT: [[POWR:%.*]] = tail call afn float @_Z4powrff(float [[X]], float 1.200000e+01)
904 ; CHECK-NEXT: ret float [[POWR]]
906 %powr = tail call afn float @_Z4powrff(float %x, float 12.0)
910 define float @test_powr_afn_f32_neg12.0(float %x) {
911 ; CHECK-LABEL: define float @test_powr_afn_f32_neg12.0
912 ; CHECK-SAME: (float [[X:%.*]]) {
913 ; CHECK-NEXT: [[POWR:%.*]] = tail call afn float @_Z4powrff(float [[X]], float -1.200000e+01)
914 ; CHECK-NEXT: ret float [[POWR]]
916 %powr = tail call afn float @_Z4powrff(float %x, float -12.0)
920 define <2 x float> @test_powr_afn_v2f32_12.0(<2 x float> %x) {
921 ; CHECK-LABEL: define <2 x float> @test_powr_afn_v2f32_12.0
922 ; CHECK-SAME: (<2 x float> [[X:%.*]]) {
923 ; CHECK-NEXT: [[POWR:%.*]] = tail call afn <2 x float> @_Z4powrDv2_fS_(<2 x float> [[X]], <2 x float> splat (float 1.200000e+01))
924 ; CHECK-NEXT: ret <2 x float> [[POWR]]
926 %powr = tail call afn <2 x float> @_Z4powrDv2_fS_(<2 x float> %x, <2 x float> <float 12.0, float 12.0>)
927 ret <2 x float> %powr
930 define <2 x float> @test_powr_afn_v2f32_neg12.0(<2 x float> %x) {
931 ; CHECK-LABEL: define <2 x float> @test_powr_afn_v2f32_neg12.0
932 ; CHECK-SAME: (<2 x float> [[X:%.*]]) {
933 ; CHECK-NEXT: [[POWR:%.*]] = tail call afn <2 x float> @_Z4powrDv2_fS_(<2 x float> [[X]], <2 x float> splat (float -1.200000e+01))
934 ; CHECK-NEXT: ret <2 x float> [[POWR]]
936 %powr = tail call afn <2 x float> @_Z4powrDv2_fS_(<2 x float> %x, <2 x float> <float -12.0, float -12.0>)
937 ret <2 x float> %powr
940 define <2 x float> @test_powr_afn_v2f32_plus_minus_12.0(<2 x float> %x) {
941 ; CHECK-LABEL: define <2 x float> @test_powr_afn_v2f32_plus_minus_12.0
942 ; CHECK-SAME: (<2 x float> [[X:%.*]]) {
943 ; CHECK-NEXT: [[POWR:%.*]] = tail call afn <2 x float> @_Z4powrDv2_fS_(<2 x float> [[X]], <2 x float> <float 1.200000e+01, float -1.200000e+01>)
944 ; CHECK-NEXT: ret <2 x float> [[POWR]]
946 %powr = tail call afn <2 x float> @_Z4powrDv2_fS_(<2 x float> %x, <2 x float> <float 12.0, float -12.0>)
947 ret <2 x float> %powr
950 define float @test_powr_afn_f32_13.0(float %x) {
951 ; CHECK-LABEL: define float @test_powr_afn_f32_13.0
952 ; CHECK-SAME: (float [[X:%.*]]) {
953 ; CHECK-NEXT: [[POWR:%.*]] = tail call afn float @_Z4powrff(float [[X]], float 1.300000e+01)
954 ; CHECK-NEXT: ret float [[POWR]]
956 %powr = tail call afn float @_Z4powrff(float %x, float 13.0)
960 define float @test_powr_afn_f32_neg13.0(float %x) {
961 ; CHECK-LABEL: define float @test_powr_afn_f32_neg13.0
962 ; CHECK-SAME: (float [[X:%.*]]) {
963 ; CHECK-NEXT: [[POWR:%.*]] = tail call afn float @_Z4powrff(float [[X]], float -1.300000e+01)
964 ; CHECK-NEXT: ret float [[POWR]]
966 %powr = tail call afn float @_Z4powrff(float %x, float -13.0)
970 define <2 x float> @test_powr_afn_v2f32_13.0(<2 x float> %x) {
971 ; CHECK-LABEL: define <2 x float> @test_powr_afn_v2f32_13.0
972 ; CHECK-SAME: (<2 x float> [[X:%.*]]) {
973 ; CHECK-NEXT: [[POWR:%.*]] = tail call afn <2 x float> @_Z4powrDv2_fS_(<2 x float> [[X]], <2 x float> splat (float 1.300000e+01))
974 ; CHECK-NEXT: ret <2 x float> [[POWR]]
976 %powr = tail call afn <2 x float> @_Z4powrDv2_fS_(<2 x float> %x, <2 x float> <float 13.0, float 13.0>)
977 ret <2 x float> %powr
980 define <2 x float> @test_powr_afn_v2f32_neg13.0(<2 x float> %x) {
981 ; CHECK-LABEL: define <2 x float> @test_powr_afn_v2f32_neg13.0
982 ; CHECK-SAME: (<2 x float> [[X:%.*]]) {
983 ; CHECK-NEXT: [[POWR:%.*]] = tail call afn <2 x float> @_Z4powrDv2_fS_(<2 x float> [[X]], <2 x float> splat (float -1.300000e+01))
984 ; CHECK-NEXT: ret <2 x float> [[POWR]]
986 %powr = tail call afn <2 x float> @_Z4powrDv2_fS_(<2 x float> %x, <2 x float> <float -13.0, float -13.0>)
987 ret <2 x float> %powr
990 define <2 x float> @test_powr_afn_v2f32_plus_minus_13.0(<2 x float> %x) {
991 ; CHECK-LABEL: define <2 x float> @test_powr_afn_v2f32_plus_minus_13.0
992 ; CHECK-SAME: (<2 x float> [[X:%.*]]) {
993 ; CHECK-NEXT: [[POWR:%.*]] = tail call afn <2 x float> @_Z4powrDv2_fS_(<2 x float> [[X]], <2 x float> <float 1.300000e+01, float -1.300000e+01>)
994 ; CHECK-NEXT: ret <2 x float> [[POWR]]
996 %powr = tail call afn <2 x float> @_Z4powrDv2_fS_(<2 x float> %x, <2 x float> <float 13.0, float -13.0>)
997 ret <2 x float> %powr
1000 define float @test_powr_afn_f32_nnan_x_known_positive(float nofpclass(ninf nnorm nsub) %x, float %y) {
1001 ; CHECK-LABEL: define float @test_powr_afn_f32_nnan_x_known_positive
1002 ; CHECK-SAME: (float nofpclass(ninf nsub nnorm) [[X:%.*]], float [[Y:%.*]]) {
1003 ; CHECK-NEXT: [[POWR:%.*]] = tail call nnan afn float @_Z4powrff(float [[X]], float [[Y]])
1004 ; CHECK-NEXT: ret float [[POWR]]
1006 %powr = tail call afn nnan float @_Z4powrff(float %x, float %y)
1010 define float @test_powr_afn_f32_nnan_ninf_x_known_positive(float nofpclass(ninf nnorm nsub) %x, float %y) {
1011 ; CHECK-LABEL: define float @test_powr_afn_f32_nnan_ninf_x_known_positive
1012 ; CHECK-SAME: (float nofpclass(ninf nsub nnorm) [[X:%.*]], float [[Y:%.*]]) {
1013 ; CHECK-NEXT: [[__LOG2:%.*]] = call nnan ninf afn float @llvm.log2.f32(float [[X]])
1014 ; CHECK-NEXT: [[__YLOGX:%.*]] = fmul nnan ninf afn float [[Y]], [[__LOG2]]
1015 ; CHECK-NEXT: [[__EXP2:%.*]] = call nnan ninf afn float @llvm.exp2.f32(float [[__YLOGX]])
1016 ; CHECK-NEXT: ret float [[__EXP2]]
1018 %powr = tail call afn nnan ninf float @_Z4powrff(float %x, float %y)
1022 define <2 x float> @test_powr_afn_v2f32_nnan_x_known_positive(<2 x float> nofpclass(ninf nnorm nsub) %x, <2 x float> %y) {
1023 ; CHECK-LABEL: define <2 x float> @test_powr_afn_v2f32_nnan_x_known_positive
1024 ; CHECK-SAME: (<2 x float> nofpclass(ninf nsub nnorm) [[X:%.*]], <2 x float> [[Y:%.*]]) {
1025 ; CHECK-NEXT: [[POWR:%.*]] = tail call nnan afn <2 x float> @_Z4powrDv2_fS_(<2 x float> [[X]], <2 x float> [[Y]])
1026 ; CHECK-NEXT: ret <2 x float> [[POWR]]
1028 %powr = tail call afn nnan <2 x float> @_Z4powrDv2_fS_(<2 x float> %x, <2 x float> %y)
1029 ret <2 x float> %powr
1032 define <2 x float> @test_powr_afn_v2f32_nnan_ninf_x_known_positive(<2 x float> nofpclass(ninf nnorm nsub) %x, <2 x float> %y) {
1033 ; CHECK-LABEL: define <2 x float> @test_powr_afn_v2f32_nnan_ninf_x_known_positive
1034 ; CHECK-SAME: (<2 x float> nofpclass(ninf nsub nnorm) [[X:%.*]], <2 x float> [[Y:%.*]]) {
1035 ; CHECK-NEXT: [[__LOG2:%.*]] = call nnan ninf afn <2 x float> @llvm.log2.v2f32(<2 x float> [[X]])
1036 ; CHECK-NEXT: [[__YLOGX:%.*]] = fmul nnan ninf afn <2 x float> [[Y]], [[__LOG2]]
1037 ; CHECK-NEXT: [[__EXP2:%.*]] = call nnan ninf afn <2 x float> @llvm.exp2.v2f32(<2 x float> [[__YLOGX]])
1038 ; CHECK-NEXT: ret <2 x float> [[__EXP2]]
1040 %powr = tail call afn nnan ninf <2 x float> @_Z4powrDv2_fS_(<2 x float> %x, <2 x float> %y)
1041 ret <2 x float> %powr
1044 define float @test_powr_f32_x_known_positive(float nofpclass(ninf nnorm nsub) %x, float %y) {
1045 ; CHECK-LABEL: define float @test_powr_f32_x_known_positive
1046 ; CHECK-SAME: (float nofpclass(ninf nsub nnorm) [[X:%.*]], float [[Y:%.*]]) {
1047 ; CHECK-NEXT: [[POWR:%.*]] = tail call float @_Z4powrff(float [[X]], float [[Y]])
1048 ; CHECK-NEXT: ret float [[POWR]]
1050 %powr = tail call float @_Z4powrff(float %x, float %y)
1054 define float @test_powr_afn_f32_x_known_positive(float nofpclass(ninf nnorm nsub) %x, float %y) {
1055 ; CHECK-LABEL: define float @test_powr_afn_f32_x_known_positive
1056 ; CHECK-SAME: (float nofpclass(ninf nsub nnorm) [[X:%.*]], float [[Y:%.*]]) {
1057 ; CHECK-NEXT: [[POWR:%.*]] = tail call afn float @_Z4powrff(float [[X]], float [[Y]])
1058 ; CHECK-NEXT: ret float [[POWR]]
1060 %powr = tail call afn float @_Z4powrff(float %x, float %y)
1064 define <2 x float> @test_powr_v2f32_x_known_positive(<2 x float> nofpclass(ninf nnorm nsub) %x, <2 x float> %y) {
1065 ; CHECK-LABEL: define <2 x float> @test_powr_v2f32_x_known_positive
1066 ; CHECK-SAME: (<2 x float> nofpclass(ninf nsub nnorm) [[X:%.*]], <2 x float> [[Y:%.*]]) {
1067 ; CHECK-NEXT: [[POWR:%.*]] = tail call <2 x float> @_Z4powrDv2_fS_(<2 x float> [[X]], <2 x float> [[Y]])
1068 ; CHECK-NEXT: ret <2 x float> [[POWR]]
1070 %powr = tail call <2 x float> @_Z4powrDv2_fS_(<2 x float> %x, <2 x float> %y)
1071 ret <2 x float> %powr
1074 define <2 x float> @test_powr_afn_v2f32_x_known_positive(<2 x float> nofpclass(ninf nnorm nsub) %x, <2 x float> %y) {
1075 ; CHECK-LABEL: define <2 x float> @test_powr_afn_v2f32_x_known_positive
1076 ; CHECK-SAME: (<2 x float> nofpclass(ninf nsub nnorm) [[X:%.*]], <2 x float> [[Y:%.*]]) {
1077 ; CHECK-NEXT: [[POWR:%.*]] = tail call afn <2 x float> @_Z4powrDv2_fS_(<2 x float> [[X]], <2 x float> [[Y]])
1078 ; CHECK-NEXT: ret <2 x float> [[POWR]]
1080 %powr = tail call afn <2 x float> @_Z4powrDv2_fS_(<2 x float> %x, <2 x float> %y)
1081 ret <2 x float> %powr
1084 define float @test_powr_f32_known_integral_sitofp(float %x, i32 %y) {
1085 ; CHECK-LABEL: define float @test_powr_f32_known_integral_sitofp
1086 ; CHECK-SAME: (float [[X:%.*]], i32 [[Y:%.*]]) {
1087 ; CHECK-NEXT: [[Y_CAST:%.*]] = sitofp i32 [[Y]] to float
1088 ; CHECK-NEXT: [[POWR:%.*]] = tail call float @_Z4powrff(float [[X]], float [[Y_CAST]])
1089 ; CHECK-NEXT: ret float [[POWR]]
1091 %y.cast = sitofp i32 %y to float
1092 %powr = tail call float @_Z4powrff(float %x, float %y.cast)
1096 define float @test_powr_afn_f32_known_integral_sitofp(float %x, i32 %y) {
1097 ; CHECK-LABEL: define float @test_powr_afn_f32_known_integral_sitofp
1098 ; CHECK-SAME: (float [[X:%.*]], i32 [[Y:%.*]]) {
1099 ; CHECK-NEXT: [[Y_CAST:%.*]] = sitofp i32 [[Y]] to float
1100 ; CHECK-NEXT: [[POWR:%.*]] = tail call afn float @_Z4powrff(float [[X]], float [[Y_CAST]])
1101 ; CHECK-NEXT: ret float [[POWR]]
1103 %y.cast = sitofp i32 %y to float
1104 %powr = tail call afn float @_Z4powrff(float %x, float %y.cast)
1108 define float @test_powr_afn_nnan_ninf_f32_known_integral_sitofp(float %x, i32 %y) {
1109 ; CHECK-LABEL: define float @test_powr_afn_nnan_ninf_f32_known_integral_sitofp
1110 ; CHECK-SAME: (float [[X:%.*]], i32 [[Y:%.*]]) {
1111 ; CHECK-NEXT: [[Y_CAST:%.*]] = sitofp i32 [[Y]] to float
1112 ; CHECK-NEXT: [[__LOG2:%.*]] = call nnan ninf afn float @llvm.log2.f32(float [[X]])
1113 ; CHECK-NEXT: [[__YLOGX:%.*]] = fmul nnan ninf afn float [[__LOG2]], [[Y_CAST]]
1114 ; CHECK-NEXT: [[__EXP2:%.*]] = call nnan ninf afn float @llvm.exp2.f32(float [[__YLOGX]])
1115 ; CHECK-NEXT: ret float [[__EXP2]]
1117 %y.cast = sitofp i32 %y to float
1118 %powr = tail call afn nnan ninf float @_Z4powrff(float %x, float %y.cast)
1122 define float @test_powr_f32_known_integral_uitofp(float %x, i32 %y) {
1123 ; CHECK-LABEL: define float @test_powr_f32_known_integral_uitofp
1124 ; CHECK-SAME: (float [[X:%.*]], i32 [[Y:%.*]]) {
1125 ; CHECK-NEXT: [[Y_CAST:%.*]] = uitofp i32 [[Y]] to float
1126 ; CHECK-NEXT: [[POWR:%.*]] = tail call float @_Z4powrff(float [[X]], float [[Y_CAST]])
1127 ; CHECK-NEXT: ret float [[POWR]]
1129 %y.cast = uitofp i32 %y to float
1130 %powr = tail call float @_Z4powrff(float %x, float %y.cast)
1134 define float @test_powr_afn_f32_known_integral_uitofp(float %x, i32 %y) {
1135 ; CHECK-LABEL: define float @test_powr_afn_f32_known_integral_uitofp
1136 ; CHECK-SAME: (float [[X:%.*]], i32 [[Y:%.*]]) {
1137 ; CHECK-NEXT: [[Y_CAST:%.*]] = uitofp i32 [[Y]] to float
1138 ; CHECK-NEXT: [[POWR:%.*]] = tail call afn float @_Z4powrff(float [[X]], float [[Y_CAST]])
1139 ; CHECK-NEXT: ret float [[POWR]]
1141 %y.cast = uitofp i32 %y to float
1142 %powr = tail call afn float @_Z4powrff(float %x, float %y.cast)
1146 define float @test_powr_afn_nnan_ninf_f32_known_integral_uitofp(float %x, i32 %y) {
1147 ; CHECK-LABEL: define float @test_powr_afn_nnan_ninf_f32_known_integral_uitofp
1148 ; CHECK-SAME: (float [[X:%.*]], i32 [[Y:%.*]]) {
1149 ; CHECK-NEXT: [[Y_CAST:%.*]] = uitofp i32 [[Y]] to float
1150 ; CHECK-NEXT: [[__LOG2:%.*]] = call nnan ninf afn float @llvm.log2.f32(float [[X]])
1151 ; CHECK-NEXT: [[__YLOGX:%.*]] = fmul nnan ninf afn float [[__LOG2]], [[Y_CAST]]
1152 ; CHECK-NEXT: [[__EXP2:%.*]] = call nnan ninf afn float @llvm.exp2.f32(float [[__YLOGX]])
1153 ; CHECK-NEXT: ret float [[__EXP2]]
1155 %y.cast = uitofp i32 %y to float
1156 %powr = tail call afn nnan ninf float @_Z4powrff(float %x, float %y.cast)
1160 define <2 x float> @test_powr_afn_nnan_ninf_v2f32_known_integral_sitofp(<2 x float> %x, <2 x i32> %y) {
1161 ; CHECK-LABEL: define <2 x float> @test_powr_afn_nnan_ninf_v2f32_known_integral_sitofp
1162 ; CHECK-SAME: (<2 x float> [[X:%.*]], <2 x i32> [[Y:%.*]]) {
1163 ; CHECK-NEXT: [[Y_CAST:%.*]] = sitofp <2 x i32> [[Y]] to <2 x float>
1164 ; CHECK-NEXT: [[__LOG2:%.*]] = call nnan ninf afn <2 x float> @llvm.log2.v2f32(<2 x float> [[X]])
1165 ; CHECK-NEXT: [[__YLOGX:%.*]] = fmul nnan ninf afn <2 x float> [[__LOG2]], [[Y_CAST]]
1166 ; CHECK-NEXT: [[__EXP2:%.*]] = call nnan ninf afn <2 x float> @llvm.exp2.v2f32(<2 x float> [[__YLOGX]])
1167 ; CHECK-NEXT: ret <2 x float> [[__EXP2]]
1169 %y.cast = sitofp <2 x i32> %y to <2 x float>
1170 %powr = tail call afn nnan ninf <2 x float> @_Z4powrDv2_fS_(<2 x float> %x, <2 x float> %y.cast)
1171 ret <2 x float> %powr
1174 define <2 x float> @test_powr_v2f32_known_integral_uitofp(<2 x float> %x, <2 x i32> %y) {
1175 ; CHECK-LABEL: define <2 x float> @test_powr_v2f32_known_integral_uitofp
1176 ; CHECK-SAME: (<2 x float> [[X:%.*]], <2 x i32> [[Y:%.*]]) {
1177 ; CHECK-NEXT: [[Y_CAST:%.*]] = uitofp <2 x i32> [[Y]] to <2 x float>
1178 ; CHECK-NEXT: [[POWR:%.*]] = tail call <2 x float> @_Z4powrDv2_fS_(<2 x float> [[X]], <2 x float> [[Y_CAST]])
1179 ; CHECK-NEXT: ret <2 x float> [[POWR]]
1181 %y.cast = uitofp <2 x i32> %y to <2 x float>
1182 %powr = tail call <2 x float> @_Z4powrDv2_fS_(<2 x float> %x, <2 x float> %y.cast)
1183 ret <2 x float> %powr
1186 define <2 x float> @test_powr_afn_v2f32_known_integral_uitofp(<2 x float> %x, <2 x i32> %y) {
1187 ; CHECK-LABEL: define <2 x float> @test_powr_afn_v2f32_known_integral_uitofp
1188 ; CHECK-SAME: (<2 x float> [[X:%.*]], <2 x i32> [[Y:%.*]]) {
1189 ; CHECK-NEXT: [[Y_CAST:%.*]] = uitofp <2 x i32> [[Y]] to <2 x float>
1190 ; CHECK-NEXT: [[POWR:%.*]] = tail call afn <2 x float> @_Z4powrDv2_fS_(<2 x float> [[X]], <2 x float> [[Y_CAST]])
1191 ; CHECK-NEXT: ret <2 x float> [[POWR]]
1193 %y.cast = uitofp <2 x i32> %y to <2 x float>
1194 %powr = tail call afn <2 x float> @_Z4powrDv2_fS_(<2 x float> %x, <2 x float> %y.cast)
1195 ret <2 x float> %powr
1198 define <2 x float> @test_powr_afn_nnan_ninf_v2f32_known_integral_uitofp(<2 x float> %x, <2 x i32> %y) {
1199 ; CHECK-LABEL: define <2 x float> @test_powr_afn_nnan_ninf_v2f32_known_integral_uitofp
1200 ; CHECK-SAME: (<2 x float> [[X:%.*]], <2 x i32> [[Y:%.*]]) {
1201 ; CHECK-NEXT: [[Y_CAST:%.*]] = uitofp <2 x i32> [[Y]] to <2 x float>
1202 ; CHECK-NEXT: [[__LOG2:%.*]] = call nnan ninf afn <2 x float> @llvm.log2.v2f32(<2 x float> [[X]])
1203 ; CHECK-NEXT: [[__YLOGX:%.*]] = fmul nnan ninf afn <2 x float> [[__LOG2]], [[Y_CAST]]
1204 ; CHECK-NEXT: [[__EXP2:%.*]] = call nnan ninf afn <2 x float> @llvm.exp2.v2f32(<2 x float> [[__YLOGX]])
1205 ; CHECK-NEXT: ret <2 x float> [[__EXP2]]
1207 %y.cast = uitofp <2 x i32> %y to <2 x float>
1208 %powr = tail call afn nnan ninf <2 x float> @_Z4powrDv2_fS_(<2 x float> %x, <2 x float> %y.cast)
1209 ret <2 x float> %powr
1212 attributes #0 = { minsize }
1213 attributes #1 = { noinline }
1214 attributes #2 = { strictfp }
1215 attributes #3 = { nobuiltin }