1 ; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py UTC_ARGS: --version 3
2 ; RUN: llc -mtriple=aarch64-none-eabi -global-isel=0 -verify-machineinstrs %s -o - | FileCheck %s --check-prefixes=CHECK,CHECK-SD
3 ; RUN: llc -mtriple=aarch64-none-eabi -global-isel=1 -verify-machineinstrs %s -o - | FileCheck %s --check-prefixes=CHECK,CHECK-GI
5 define double @fpext_f32_f64(float %a) {
6 ; CHECK-LABEL: fpext_f32_f64:
7 ; CHECK: // %bb.0: // %entry
8 ; CHECK-NEXT: fcvt d0, s0
11 %c = fpext float %a to double
15 define double @fpext_f16_f64(half %a) {
16 ; CHECK-LABEL: fpext_f16_f64:
17 ; CHECK: // %bb.0: // %entry
18 ; CHECK-NEXT: fcvt d0, h0
21 %c = fpext half %a to double
25 define float @fpext_f16_f32(half %a) {
26 ; CHECK-LABEL: fpext_f16_f32:
27 ; CHECK: // %bb.0: // %entry
28 ; CHECK-NEXT: fcvt s0, h0
31 %c = fpext half %a to float
35 define <2 x double> @fpext_v2f32_v2f64(<2 x float> %a) {
36 ; CHECK-LABEL: fpext_v2f32_v2f64:
37 ; CHECK: // %bb.0: // %entry
38 ; CHECK-NEXT: fcvtl v0.2d, v0.2s
41 %c = fpext <2 x float> %a to <2 x double>
45 define <3 x double> @fpext_v3f32_v3f64(<3 x float> %a) {
46 ; CHECK-SD-LABEL: fpext_v3f32_v3f64:
47 ; CHECK-SD: // %bb.0: // %entry
48 ; CHECK-SD-NEXT: fcvtl v3.2d, v0.2s
49 ; CHECK-SD-NEXT: fcvtl2 v2.2d, v0.4s
50 ; CHECK-SD-NEXT: // kill: def $d2 killed $d2 killed $q2
51 ; CHECK-SD-NEXT: fmov d0, d3
52 ; CHECK-SD-NEXT: ext v1.16b, v3.16b, v3.16b, #8
53 ; CHECK-SD-NEXT: // kill: def $d1 killed $d1 killed $q1
56 ; CHECK-GI-LABEL: fpext_v3f32_v3f64:
57 ; CHECK-GI: // %bb.0: // %entry
58 ; CHECK-GI-NEXT: mov s1, v0.s[2]
59 ; CHECK-GI-NEXT: fcvtl v0.2d, v0.2s
60 ; CHECK-GI-NEXT: fcvt d2, s1
61 ; CHECK-GI-NEXT: mov d1, v0.d[1]
62 ; CHECK-GI-NEXT: // kill: def $d0 killed $d0 killed $q0
65 %c = fpext <3 x float> %a to <3 x double>
69 define <4 x double> @fpext_v4f32_v4f64(<4 x float> %a) {
70 ; CHECK-SD-LABEL: fpext_v4f32_v4f64:
71 ; CHECK-SD: // %bb.0: // %entry
72 ; CHECK-SD-NEXT: fcvtl2 v1.2d, v0.4s
73 ; CHECK-SD-NEXT: fcvtl v0.2d, v0.2s
76 ; CHECK-GI-LABEL: fpext_v4f32_v4f64:
77 ; CHECK-GI: // %bb.0: // %entry
78 ; CHECK-GI-NEXT: fcvtl v2.2d, v0.2s
79 ; CHECK-GI-NEXT: fcvtl2 v1.2d, v0.4s
80 ; CHECK-GI-NEXT: mov v0.16b, v2.16b
83 %c = fpext <4 x float> %a to <4 x double>
87 define <2 x double> @fpext_v2f16_v2f64(<2 x half> %a) {
88 ; CHECK-SD-LABEL: fpext_v2f16_v2f64:
89 ; CHECK-SD: // %bb.0: // %entry
90 ; CHECK-SD-NEXT: // kill: def $d0 killed $d0 def $q0
91 ; CHECK-SD-NEXT: mov h1, v0.h[1]
92 ; CHECK-SD-NEXT: fcvt d0, h0
93 ; CHECK-SD-NEXT: fcvt d1, h1
94 ; CHECK-SD-NEXT: mov v0.d[1], v1.d[0]
97 ; CHECK-GI-LABEL: fpext_v2f16_v2f64:
98 ; CHECK-GI: // %bb.0: // %entry
99 ; CHECK-GI-NEXT: fmov x8, d0
100 ; CHECK-GI-NEXT: fmov s0, w8
101 ; CHECK-GI-NEXT: mov h1, v0.h[1]
102 ; CHECK-GI-NEXT: fcvt d0, h0
103 ; CHECK-GI-NEXT: fcvt d1, h1
104 ; CHECK-GI-NEXT: mov v0.d[1], v1.d[0]
107 %c = fpext <2 x half> %a to <2 x double>
111 define <3 x double> @fpext_v3f16_v3f64(<3 x half> %a) {
112 ; CHECK-LABEL: fpext_v3f16_v3f64:
113 ; CHECK: // %bb.0: // %entry
114 ; CHECK-NEXT: // kill: def $d0 killed $d0 def $q0
115 ; CHECK-NEXT: mov h1, v0.h[1]
116 ; CHECK-NEXT: mov h2, v0.h[2]
117 ; CHECK-NEXT: fcvt d0, h0
118 ; CHECK-NEXT: fcvt d1, h1
119 ; CHECK-NEXT: fcvt d2, h2
122 %c = fpext <3 x half> %a to <3 x double>
126 define <4 x double> @fpext_v4f16_v4f64(<4 x half> %a) {
127 ; CHECK-SD-LABEL: fpext_v4f16_v4f64:
128 ; CHECK-SD: // %bb.0: // %entry
129 ; CHECK-SD-NEXT: // kill: def $d0 killed $d0 def $q0
130 ; CHECK-SD-NEXT: mov h1, v0.h[1]
131 ; CHECK-SD-NEXT: mov h2, v0.h[3]
132 ; CHECK-SD-NEXT: mov h3, v0.h[2]
133 ; CHECK-SD-NEXT: fcvt d0, h0
134 ; CHECK-SD-NEXT: fcvt d4, h1
135 ; CHECK-SD-NEXT: fcvt d2, h2
136 ; CHECK-SD-NEXT: fcvt d1, h3
137 ; CHECK-SD-NEXT: mov v0.d[1], v4.d[0]
138 ; CHECK-SD-NEXT: mov v1.d[1], v2.d[0]
141 ; CHECK-GI-LABEL: fpext_v4f16_v4f64:
142 ; CHECK-GI: // %bb.0: // %entry
143 ; CHECK-GI-NEXT: // kill: def $d0 killed $d0 def $q0
144 ; CHECK-GI-NEXT: mov s1, v0.s[1]
145 ; CHECK-GI-NEXT: mov h2, v0.h[1]
146 ; CHECK-GI-NEXT: fcvt d0, h0
147 ; CHECK-GI-NEXT: mov h3, v1.h[1]
148 ; CHECK-GI-NEXT: fcvt d2, h2
149 ; CHECK-GI-NEXT: fcvt d1, h1
150 ; CHECK-GI-NEXT: fcvt d3, h3
151 ; CHECK-GI-NEXT: mov v0.d[1], v2.d[0]
152 ; CHECK-GI-NEXT: mov v1.d[1], v3.d[0]
155 %c = fpext <4 x half> %a to <4 x double>
159 define <2 x float> @fpext_v2f16_v2f32(<2 x half> %a) {
160 ; CHECK-SD-LABEL: fpext_v2f16_v2f32:
161 ; CHECK-SD: // %bb.0: // %entry
162 ; CHECK-SD-NEXT: fcvtl v0.4s, v0.4h
163 ; CHECK-SD-NEXT: // kill: def $d0 killed $d0 killed $q0
166 ; CHECK-GI-LABEL: fpext_v2f16_v2f32:
167 ; CHECK-GI: // %bb.0: // %entry
168 ; CHECK-GI-NEXT: fmov x8, d0
169 ; CHECK-GI-NEXT: fmov s0, w8
170 ; CHECK-GI-NEXT: mov h1, v0.h[1]
171 ; CHECK-GI-NEXT: mov v0.h[1], v1.h[0]
172 ; CHECK-GI-NEXT: mov v0.h[2], v0.h[0]
173 ; CHECK-GI-NEXT: mov v0.h[3], v0.h[0]
174 ; CHECK-GI-NEXT: fcvtl v0.4s, v0.4h
175 ; CHECK-GI-NEXT: // kill: def $d0 killed $d0 killed $q0
178 %c = fpext <2 x half> %a to <2 x float>
182 define <3 x float> @fpext_v3f16_v3f32(<3 x half> %a) {
183 ; CHECK-LABEL: fpext_v3f16_v3f32:
184 ; CHECK: // %bb.0: // %entry
185 ; CHECK-NEXT: fcvtl v0.4s, v0.4h
188 %c = fpext <3 x half> %a to <3 x float>
192 define <4 x float> @fpext_v4f16_v4f32(<4 x half> %a) {
193 ; CHECK-LABEL: fpext_v4f16_v4f32:
194 ; CHECK: // %bb.0: // %entry
195 ; CHECK-NEXT: fcvtl v0.4s, v0.4h
198 %c = fpext <4 x half> %a to <4 x float>
202 define <8 x float> @fpext_v8f16_v8f32(<8 x half> %a) {
203 ; CHECK-SD-LABEL: fpext_v8f16_v8f32:
204 ; CHECK-SD: // %bb.0: // %entry
205 ; CHECK-SD-NEXT: fcvtl2 v1.4s, v0.8h
206 ; CHECK-SD-NEXT: fcvtl v0.4s, v0.4h
209 ; CHECK-GI-LABEL: fpext_v8f16_v8f32:
210 ; CHECK-GI: // %bb.0: // %entry
211 ; CHECK-GI-NEXT: fcvtl v2.4s, v0.4h
212 ; CHECK-GI-NEXT: fcvtl2 v1.4s, v0.8h
213 ; CHECK-GI-NEXT: mov v0.16b, v2.16b
216 %c = fpext <8 x half> %a to <8 x float>