xref: /llvm-project/llvm/test/CodeGen/AMDGPU/amdgpu-simplify-libcall-powr.ll (revision 38fffa630ee80163dc65e759392ad29798905679)
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
3
4target 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"
5
6declare float @_Z4powrff(float, float)
7declare <2 x float> @_Z4powrDv2_fS_(<2 x float>, <2 x float>)
8declare <3 x float> @_Z4powrDv3_fS_(<3 x float>, <3 x float>)
9declare <4 x float> @_Z4powrDv4_fS_(<4 x float>, <4 x float>)
10declare <8 x float> @_Z4powrDv8_fS_(<8 x float>, <8 x float>)
11declare <16 x float> @_Z4powrDv16_fS_(<16 x float>, <16 x float>)
12declare double @_Z4powrdd(double, double)
13declare <2 x double> @_Z4powrDv2_dS_(<2 x double>, <2 x double>)
14declare <3 x double> @_Z4powrDv3_dS_(<3 x double>, <3 x double>)
15declare <4 x double> @_Z4powrDv4_dS_(<4 x double>, <4 x double>)
16declare <8 x double> @_Z4powrDv8_dS_(<8 x double>, <8 x double>)
17declare <16 x double> @_Z4powrDv16_dS_(<16 x double>, <16 x double>)
18declare half @_Z4powrDhDh(half, half)
19declare <2 x half> @_Z4powrDv2_DhS_(<2 x half>, <2 x half>)
20declare <3 x half> @_Z4powrDv3_DhS_(<3 x half>, <3 x half>)
21declare <4 x half> @_Z4powrDv4_DhS_(<4 x half>, <4 x half>)
22declare <8 x half> @_Z4powrDv8_DhS_(<8 x half>, <8 x half>)
23declare <16 x half> @_Z4powrDv16_DhS_(<16 x half>, <16 x half>)
24
25define 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]]
32;
33  %powr = tail call fast float @_Z4powrff(float %x, float %y)
34  ret float %powr
35}
36
37define <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]]
44;
45  %powr = tail call fast <2 x float> @_Z4powrDv2_fS_(<2 x float> %x, <2 x float> %y)
46  ret <2 x float> %powr
47}
48
49define 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]]
54;
55  %powr = tail call afn float @_Z4powrff(float %x, float %y)
56  ret float %powr
57}
58
59define 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]]
64;
65  %powr = tail call afn nnan float @_Z4powrff(float %x, float %y)
66  ret float %powr
67}
68
69define <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]]
74;
75  %powr = tail call afn <2 x float> @_Z4powrDv2_fS_(<2 x float> %x, <2 x float> %y)
76  ret <2 x float> %powr
77}
78
79define <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]]
84;
85  %powr = tail call afn <3 x float> @_Z4powrDv3_fS_(<3 x float> %x, <3 x float> %y)
86  ret <3 x float> %powr
87}
88
89define <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]]
94;
95  %powr = tail call afn <4 x float> @_Z4powrDv4_fS_(<4 x float> %x, <4 x float> %y)
96  ret <4 x float> %powr
97}
98
99define <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]]
104;
105  %powr = tail call afn <8 x float> @_Z4powrDv8_fS_(<8 x float> %x, <8 x float> %y)
106  ret <8 x float> %powr
107}
108
109define <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]]
114;
115  %powr = tail call afn <16 x float> @_Z4powrDv16_fS_(<16 x float> %x, <16 x float> %y)
116  ret <16 x float> %powr
117}
118
119define 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]]
124;
125  %powr = tail call afn double @_Z4powrdd(double %x, double %y)
126  ret double %powr
127}
128
129define <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]]
134;
135  %powr = tail call afn <2 x double> @_Z4powrDv2_dS_(<2 x double> %x, <2 x double> %y)
136  ret <2 x double> %powr
137}
138
139define <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]]
144;
145  %powr = tail call afn <3 x double> @_Z4powrDv3_dS_(<3 x double> %x, <3 x double> %y)
146  ret <3 x double> %powr
147}
148
149define <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]]
154;
155  %powr = tail call afn <4 x double> @_Z4powrDv4_dS_(<4 x double> %x, <4 x double> %y)
156  ret <4 x double> %powr
157}
158
159define <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]]
164;
165  %powr = tail call afn <8 x double> @_Z4powrDv8_dS_(<8 x double> %x, <8 x double> %y)
166  ret <8 x double> %powr
167}
168
169define <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]]
174;
175  %powr = tail call afn <16 x double> @_Z4powrDv16_dS_(<16 x double> %x, <16 x double> %y)
176  ret <16 x double> %powr
177}
178
179define 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]]
184;
185  %powr = tail call afn half @_Z4powrDhDh(half %x, half %y)
186  ret half %powr
187}
188
189define <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]]
194;
195  %powr = tail call afn <2 x half> @_Z4powrDv2_DhS_(<2 x half> %x, <2 x half> %y)
196  ret <2 x half> %powr
197}
198
199define <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]]
204;
205  %powr = tail call afn <3 x half> @_Z4powrDv3_DhS_(<3 x half> %x, <3 x half> %y)
206  ret <3 x half> %powr
207}
208
209define <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]]
214;
215  %powr = tail call afn <4 x half> @_Z4powrDv4_DhS_(<4 x half> %x, <4 x half> %y)
216  ret <4 x half> %powr
217}
218
219define <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]]
224;
225  %powr = tail call afn <8 x half> @_Z4powrDv8_DhS_(<8 x half> %x, <8 x half> %y)
226  ret <8 x half> %powr
227}
228
229define <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]]
234;
235  %powr = tail call afn <16 x half> @_Z4powrDv16_DhS_(<16 x half> %x, <16 x half> %y)
236  ret <16 x half> %powr
237}
238
239define 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]]
244;
245  %powr = tail call float @_Z4powrff(float %x, float %y)
246  ret float %powr
247}
248
249define 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]]
254;
255  %powr = tail call nnan float @_Z4powrff(float %x, float %y)
256  ret float %powr
257}
258
259define <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]]
264;
265  %powr = tail call <2 x float> @_Z4powrDv2_fS_(<2 x float> %x, <2 x float> %y)
266  ret <2 x float> %powr
267}
268
269define <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]]
274;
275  %powr = tail call <3 x float> @_Z4powrDv3_fS_(<3 x float> %x, <3 x float> %y)
276  ret <3 x float> %powr
277}
278
279define <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]]
284;
285  %powr = tail call <4 x float> @_Z4powrDv4_fS_(<4 x float> %x, <4 x float> %y)
286  ret <4 x float> %powr
287}
288
289define <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]]
294;
295  %powr = tail call <8 x float> @_Z4powrDv8_fS_(<8 x float> %x, <8 x float> %y)
296  ret <8 x float> %powr
297}
298
299define <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]]
304;
305  %powr = tail call <16 x float> @_Z4powrDv16_fS_(<16 x float> %x, <16 x float> %y)
306  ret <16 x float> %powr
307}
308
309define 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]]
314;
315  %powr = tail call double @_Z4powrdd(double %x, double %y)
316  ret double %powr
317}
318
319define <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]]
324;
325  %powr = tail call <2 x double> @_Z4powrDv2_dS_(<2 x double> %x, <2 x double> %y)
326  ret <2 x double> %powr
327}
328
329define <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]]
334;
335  %powr = tail call <3 x double> @_Z4powrDv3_dS_(<3 x double> %x, <3 x double> %y)
336  ret <3 x double> %powr
337}
338
339define <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]]
344;
345  %powr = tail call <4 x double> @_Z4powrDv4_dS_(<4 x double> %x, <4 x double> %y)
346  ret <4 x double> %powr
347}
348
349define <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]]
354;
355  %powr = tail call <8 x double> @_Z4powrDv8_dS_(<8 x double> %x, <8 x double> %y)
356  ret <8 x double> %powr
357}
358
359define <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]]
364;
365  %powr = tail call <16 x double> @_Z4powrDv16_dS_(<16 x double> %x, <16 x double> %y)
366  ret <16 x double> %powr
367}
368
369define 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]]
374;
375  %powr = tail call half @_Z4powrDhDh(half %x, half %y)
376  ret half %powr
377}
378
379define <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]]
384;
385  %powr = tail call <2 x half> @_Z4powrDv2_DhS_(<2 x half> %x, <2 x half> %y)
386  ret <2 x half> %powr
387}
388
389define <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]]
394;
395  %powr = tail call <3 x half> @_Z4powrDv3_DhS_(<3 x half> %x, <3 x half> %y)
396  ret <3 x half> %powr
397}
398
399define <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]]
404;
405  %powr = tail call <4 x half> @_Z4powrDv4_DhS_(<4 x half> %x, <4 x half> %y)
406  ret <4 x half> %powr
407}
408
409define <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]]
414;
415  %powr = tail call <8 x half> @_Z4powrDv8_DhS_(<8 x half> %x, <8 x half> %y)
416  ret <8 x half> %powr
417}
418
419define <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]]
424;
425  %powr = tail call <16 x half> @_Z4powrDv16_DhS_(<16 x half> %x, <16 x half> %y)
426  ret <16 x half> %powr
427}
428
429define 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]]
434;
435  %powr = tail call afn float @_Z4powrff(float %x, float %y)
436  ret float %powr
437}
438
439define 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]]
444;
445  %powr = tail call afn nnan float @_Z4powrff(float %x, float %y)
446  ret float %powr
447}
448
449define 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]]
454;
455  %powr = tail call afn float @_Z4powrff(float %x, float %y) #1
456  ret float %powr
457}
458
459define 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]]
464;
465  %powr = tail call afn nnan float @_Z4powrff(float %x, float %y) #1
466  ret float %powr
467}
468
469define 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]]
474;
475  %powr = tail call afn nsz nnan float @_Z4powrff(float %x, float %y) #2
476  ret float %powr
477}
478
479define 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]]
484;
485  %powr = tail call fast float @_Z4powrff(float %x, float %y) #3
486  ret float %powr
487}
488
489define 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]]
494;
495  %powr = tail call afn float @_Z4powrff(float %x, float poison)
496  ret float %powr
497}
498
499define 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
503;
504  %powr = tail call afn float @_Z4powrff(float %x, float 0.0)
505  ret float %powr
506}
507
508define 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
512;
513  %powr = tail call afn float @_Z4powrff(float %x, float -0.0)
514  ret float %powr
515}
516
517define <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)
521;
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
524}
525
526define <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)
530;
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
533}
534
535define <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]]
540;
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
543}
544
545define <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)
549;
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
552}
553
554define <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)
558;
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
561}
562
563define 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]]
568;
569  %powr = tail call afn float @_Z4powrff(float %x, float 0.5)
570  ret float %powr
571}
572
573define 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]]
578;
579  %powr = tail call afn float @_Z4powrff(float %x, float -0.5)
580  ret float %powr
581}
582
583define <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]]
588;
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
591}
592
593define <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]]
598;
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
601}
602
603define <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]]
608;
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
611}
612
613define <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]]
618;
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
621}
622
623define <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]]
628;
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
631}
632
633define 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]]
637;
638  %powr = tail call afn float @_Z4powrff(float %x, float 1.0)
639  ret float %powr
640}
641
642define 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]]
647;
648  %powr = tail call afn float @_Z4powrff(float %x, float -1.0)
649  ret float %powr
650}
651
652define <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]]
656;
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
659}
660
661define <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]]
666;
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
669}
670
671define <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]]
676;
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
679}
680
681define <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]]
685;
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
688}
689
690define <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]]
695;
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
698}
699
700define 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]]
705;
706  %powr = tail call afn float @_Z4powrff(float %x, float 2.0)
707  ret float %powr
708}
709
710define 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]]
715;
716  %powr = tail call afn float @_Z4powrff(float %x, float -2.0)
717  ret float %powr
718}
719
720define <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]]
725;
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
728}
729
730define <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]]
735;
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
738}
739
740define <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]]
745;
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
748}
749
750define 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]]
755;
756  %powr = tail call afn float @_Z4powrff(float %x, float 3.0)
757  ret float %powr
758}
759
760define 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]]
765;
766  %powr = tail call afn float @_Z4powrff(float %x, float -3.0)
767  ret float %powr
768}
769
770define <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]]
775;
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
778}
779
780define <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]]
785;
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
788}
789
790define <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]]
795;
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
798}
799
800define 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]]
805;
806  %powr = tail call afn float @_Z4powrff(float %x, float 0x400FEB8520000000)
807  ret float %powr
808}
809
810define 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]]
815;
816  %powr = tail call afn float @_Z4powrff(float %x, float 0xC00FEB8520000000)
817  ret float %powr
818}
819
820define <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]]
825;
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
828}
829
830define <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]]
835;
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
838}
839
840define <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]]
845;
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
848}
849
850define 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]]
855;
856  %powr = tail call afn float @_Z4powrff(float %x, float 8.0)
857  ret float %powr
858}
859
860define 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]]
865;
866  %powr = tail call afn float @_Z4powrff(float %x, float -8.0)
867  ret float %powr
868}
869
870define <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]]
875;
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
878}
879
880define <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]]
885;
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
888}
889
890define <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]]
895;
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
898}
899
900define 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]]
905;
906  %powr = tail call afn float @_Z4powrff(float %x, float 12.0)
907  ret float %powr
908}
909
910define 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]]
915;
916  %powr = tail call afn float @_Z4powrff(float %x, float -12.0)
917  ret float %powr
918}
919
920define <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]]
925;
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
928}
929
930define <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]]
935;
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
938}
939
940define <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]]
945;
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
948}
949
950define 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]]
955;
956  %powr = tail call afn float @_Z4powrff(float %x, float 13.0)
957  ret float %powr
958}
959
960define 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]]
965;
966  %powr = tail call afn float @_Z4powrff(float %x, float -13.0)
967  ret float %powr
968}
969
970define <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]]
975;
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
978}
979
980define <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]]
985;
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
988}
989
990define <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]]
995;
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
998}
999
1000define 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]]
1005;
1006  %powr = tail call afn nnan float @_Z4powrff(float %x, float %y)
1007  ret float %powr
1008}
1009
1010define 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]]
1017;
1018  %powr = tail call afn nnan ninf float @_Z4powrff(float %x, float %y)
1019  ret float %powr
1020}
1021
1022define <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]]
1027;
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
1030}
1031
1032define <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]]
1039;
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
1042}
1043
1044define 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]]
1049;
1050  %powr = tail call float @_Z4powrff(float %x, float %y)
1051  ret float %powr
1052}
1053
1054define 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]]
1059;
1060  %powr = tail call afn float @_Z4powrff(float %x, float %y)
1061  ret float %powr
1062}
1063
1064define <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]]
1069;
1070  %powr = tail call <2 x float> @_Z4powrDv2_fS_(<2 x float> %x, <2 x float> %y)
1071  ret <2 x float> %powr
1072}
1073
1074define <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]]
1079;
1080  %powr = tail call afn <2 x float> @_Z4powrDv2_fS_(<2 x float> %x, <2 x float> %y)
1081  ret <2 x float> %powr
1082}
1083
1084define 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]]
1090;
1091  %y.cast = sitofp i32 %y to float
1092  %powr = tail call float @_Z4powrff(float %x, float %y.cast)
1093  ret float %powr
1094}
1095
1096define 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]]
1102;
1103  %y.cast = sitofp i32 %y to float
1104  %powr = tail call afn float @_Z4powrff(float %x, float %y.cast)
1105  ret float %powr
1106}
1107
1108define 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]]
1116;
1117  %y.cast = sitofp i32 %y to float
1118  %powr = tail call afn nnan ninf float @_Z4powrff(float %x, float %y.cast)
1119  ret float %powr
1120}
1121
1122define 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]]
1128;
1129  %y.cast = uitofp i32 %y to float
1130  %powr = tail call float @_Z4powrff(float %x, float %y.cast)
1131  ret float %powr
1132}
1133
1134define 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]]
1140;
1141  %y.cast = uitofp i32 %y to float
1142  %powr = tail call afn float @_Z4powrff(float %x, float %y.cast)
1143  ret float %powr
1144}
1145
1146define 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]]
1154;
1155  %y.cast = uitofp i32 %y to float
1156  %powr = tail call afn nnan ninf float @_Z4powrff(float %x, float %y.cast)
1157  ret float %powr
1158}
1159
1160define <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]]
1168;
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
1172}
1173
1174define <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]]
1180;
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
1184}
1185
1186define <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]]
1192;
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
1196}
1197
1198define <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]]
1206;
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
1210}
1211
1212attributes #0 = { minsize }
1213attributes #1 = { noinline }
1214attributes #2 = { strictfp }
1215attributes #3 = { nobuiltin }
1216