1 ; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py UTC_ARGS: --version 3
2 ; RUN: llc -mtriple=aarch64-pc-windows-msvc19 -verify-machineinstrs %s -o - | FileCheck %s
3 ; RUN: llc -mtriple=aarch64-pc-windows-msvc19 -global-isel -global-isel-abort=2 -verify-machineinstrs %s -o - | FileCheck %s
5 define double @powi_f64(double %a, i32 %b) {
6 ; CHECK-LABEL: powi_f64:
7 ; CHECK: // %bb.0: // %entry
8 ; CHECK-NEXT: scvtf d1, w0
11 %c = call double @llvm.powi.f64.i32(double %a, i32 %b)
15 define float @powi_f32(float %a, i32 %b) {
16 ; CHECK-LABEL: powi_f32:
17 ; CHECK: // %bb.0: // %entry
18 ; CHECK-NEXT: scvtf s1, w0
21 %c = call float @llvm.powi.f32.i32(float %a, i32 %b)
25 define half @powi_f16(half %a, i32 %b) {
26 ; CHECK-LABEL: powi_f16:
27 ; CHECK: .seh_proc powi_f16
28 ; CHECK-NEXT: // %bb.0: // %entry
29 ; CHECK-NEXT: str x30, [sp, #-16]! // 8-byte Folded Spill
30 ; CHECK-NEXT: .seh_save_reg_x x30, 16
31 ; CHECK-NEXT: .seh_endprologue
32 ; CHECK-NEXT: fcvt s0, h0
33 ; CHECK-NEXT: scvtf s1, w0
35 ; CHECK-NEXT: fcvt h0, s0
36 ; CHECK-NEXT: .seh_startepilogue
37 ; CHECK-NEXT: ldr x30, [sp], #16 // 8-byte Folded Reload
38 ; CHECK-NEXT: .seh_save_reg_x x30, 16
39 ; CHECK-NEXT: .seh_endepilogue
41 ; CHECK-NEXT: .seh_endfunclet
42 ; CHECK-NEXT: .seh_endproc
44 %c = call half @llvm.powi.f16.i32(half %a, i32 %b)
48 define <2 x double> @powi_v2f64(<2 x double> %a, i32 %b) {
49 ; CHECK-LABEL: powi_v2f64:
50 ; CHECK: .seh_proc powi_v2f64
51 ; CHECK-NEXT: // %bb.0: // %entry
52 ; CHECK-NEXT: sub sp, sp, #48
53 ; CHECK-NEXT: .seh_stackalloc 48
54 ; CHECK-NEXT: str x30, [sp, #32] // 8-byte Folded Spill
55 ; CHECK-NEXT: .seh_save_reg x30, 32
56 ; CHECK-NEXT: str d8, [sp, #40] // 8-byte Folded Spill
57 ; CHECK-NEXT: .seh_save_freg d8, 40
58 ; CHECK-NEXT: .seh_endprologue
59 ; CHECK-NEXT: scvtf d8, w0
60 ; CHECK-NEXT: str q0, [sp] // 16-byte Folded Spill
61 ; CHECK-NEXT: mov d0, v0.d[1]
62 ; CHECK-NEXT: fmov d1, d8
64 ; CHECK-NEXT: fmov d1, d8
65 ; CHECK-NEXT: // kill: def $d0 killed $d0 def $q0
66 ; CHECK-NEXT: str q0, [sp, #16] // 16-byte Folded Spill
67 ; CHECK-NEXT: ldr q0, [sp] // 16-byte Folded Reload
68 ; CHECK-NEXT: // kill: def $d0 killed $d0 killed $q0
70 ; CHECK-NEXT: ldr q1, [sp, #16] // 16-byte Folded Reload
71 ; CHECK-NEXT: // kill: def $d0 killed $d0 def $q0
72 ; CHECK-NEXT: mov v0.d[1], v1.d[0]
73 ; CHECK-NEXT: .seh_startepilogue
74 ; CHECK-NEXT: ldr d8, [sp, #40] // 8-byte Folded Reload
75 ; CHECK-NEXT: .seh_save_freg d8, 40
76 ; CHECK-NEXT: ldr x30, [sp, #32] // 8-byte Folded Reload
77 ; CHECK-NEXT: .seh_save_reg x30, 32
78 ; CHECK-NEXT: add sp, sp, #48
79 ; CHECK-NEXT: .seh_stackalloc 48
80 ; CHECK-NEXT: .seh_endepilogue
82 ; CHECK-NEXT: .seh_endfunclet
83 ; CHECK-NEXT: .seh_endproc
85 %c = call <2 x double> @llvm.powi.v2f64.i32(<2 x double> %a, i32 %b)
89 define <2 x float> @powi_v2f32(<2 x float> %a, i32 %b) {
90 ; CHECK-LABEL: powi_v2f32:
91 ; CHECK: .seh_proc powi_v2f32
92 ; CHECK-NEXT: // %bb.0: // %entry
93 ; CHECK-NEXT: sub sp, sp, #48
94 ; CHECK-NEXT: .seh_stackalloc 48
95 ; CHECK-NEXT: str x30, [sp, #32] // 8-byte Folded Spill
96 ; CHECK-NEXT: .seh_save_reg x30, 32
97 ; CHECK-NEXT: str d8, [sp, #40] // 8-byte Folded Spill
98 ; CHECK-NEXT: .seh_save_freg d8, 40
99 ; CHECK-NEXT: .seh_endprologue
100 ; CHECK-NEXT: scvtf s8, w0
101 ; CHECK-NEXT: // kill: def $d0 killed $d0 def $q0
102 ; CHECK-NEXT: str q0, [sp] // 16-byte Folded Spill
103 ; CHECK-NEXT: mov s0, v0.s[1]
104 ; CHECK-NEXT: fmov s1, s8
105 ; CHECK-NEXT: bl powf
106 ; CHECK-NEXT: fmov s1, s8
107 ; CHECK-NEXT: // kill: def $s0 killed $s0 def $q0
108 ; CHECK-NEXT: str q0, [sp, #16] // 16-byte Folded Spill
109 ; CHECK-NEXT: ldr q0, [sp] // 16-byte Folded Reload
110 ; CHECK-NEXT: // kill: def $s0 killed $s0 killed $q0
111 ; CHECK-NEXT: bl powf
112 ; CHECK-NEXT: ldr q1, [sp, #16] // 16-byte Folded Reload
113 ; CHECK-NEXT: // kill: def $s0 killed $s0 def $q0
114 ; CHECK-NEXT: mov v0.s[1], v1.s[0]
115 ; CHECK-NEXT: // kill: def $d0 killed $d0 killed $q0
116 ; CHECK-NEXT: .seh_startepilogue
117 ; CHECK-NEXT: ldr d8, [sp, #40] // 8-byte Folded Reload
118 ; CHECK-NEXT: .seh_save_freg d8, 40
119 ; CHECK-NEXT: ldr x30, [sp, #32] // 8-byte Folded Reload
120 ; CHECK-NEXT: .seh_save_reg x30, 32
121 ; CHECK-NEXT: add sp, sp, #48
122 ; CHECK-NEXT: .seh_stackalloc 48
123 ; CHECK-NEXT: .seh_endepilogue
125 ; CHECK-NEXT: .seh_endfunclet
126 ; CHECK-NEXT: .seh_endproc
128 %c = call <2 x float> @llvm.powi.v2f32.i32(<2 x float> %a, i32 %b)
132 declare <2 x double> @llvm.powi.v2f64.i32(<2 x double>, i32)
133 declare <2 x float> @llvm.powi.v2f32.i32(<2 x float>, i32)
134 declare double @llvm.powi.f64.i32(double, i32)
135 declare float @llvm.powi.f32.i32(float, i32)
136 declare half @llvm.powi.f16.i32(half, i32)