1 ; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py
2 ; RUN: llc < %s -mtriple=aarch64 -mattr=+bf16 | FileCheck %s
4 define <4 x i16> @v4bf16_to_v4i16(float, <4 x bfloat> %a) nounwind {
5 ; CHECK-LABEL: v4bf16_to_v4i16:
6 ; CHECK: // %bb.0: // %entry
7 ; CHECK-NEXT: fmov d0, d1
10 %1 = bitcast <4 x bfloat> %a to <4 x i16>
14 define <2 x i32> @v4bf16_to_v2i32(float, <4 x bfloat> %a) nounwind {
15 ; CHECK-LABEL: v4bf16_to_v2i32:
16 ; CHECK: // %bb.0: // %entry
17 ; CHECK-NEXT: fmov d0, d1
20 %1 = bitcast <4 x bfloat> %a to <2 x i32>
24 define <1 x i64> @v4bf16_to_v1i64(float, <4 x bfloat> %a) nounwind {
25 ; CHECK-LABEL: v4bf16_to_v1i64:
26 ; CHECK: // %bb.0: // %entry
27 ; CHECK-NEXT: fmov d0, d1
30 %1 = bitcast <4 x bfloat> %a to <1 x i64>
34 define i64 @v4bf16_to_i64(float, <4 x bfloat> %a) nounwind {
35 ; CHECK-LABEL: v4bf16_to_i64:
36 ; CHECK: // %bb.0: // %entry
37 ; CHECK-NEXT: fmov x0, d1
40 %1 = bitcast <4 x bfloat> %a to i64
44 define <2 x float> @v4bf16_to_v2float(float, <4 x bfloat> %a) nounwind {
45 ; CHECK-LABEL: v4bf16_to_v2float:
46 ; CHECK: // %bb.0: // %entry
47 ; CHECK-NEXT: fmov d0, d1
50 %1 = bitcast <4 x bfloat> %a to <2 x float>
54 define <1 x double> @v4bf16_to_v1double(float, <4 x bfloat> %a) nounwind {
55 ; CHECK-LABEL: v4bf16_to_v1double:
56 ; CHECK: // %bb.0: // %entry
57 ; CHECK-NEXT: fmov d0, d1
60 %1 = bitcast <4 x bfloat> %a to <1 x double>
64 define double @v4bf16_to_double(float, <4 x bfloat> %a) nounwind {
65 ; CHECK-LABEL: v4bf16_to_double:
66 ; CHECK: // %bb.0: // %entry
67 ; CHECK-NEXT: fmov d0, d1
70 %1 = bitcast <4 x bfloat> %a to double
75 define <4 x bfloat> @v4i16_to_v4bf16(float, <4 x i16> %a) nounwind {
76 ; CHECK-LABEL: v4i16_to_v4bf16:
77 ; CHECK: // %bb.0: // %entry
78 ; CHECK-NEXT: fmov d0, d1
81 %1 = bitcast <4 x i16> %a to <4 x bfloat>
85 define <4 x bfloat> @v2i32_to_v4bf16(float, <2 x i32> %a) nounwind {
86 ; CHECK-LABEL: v2i32_to_v4bf16:
87 ; CHECK: // %bb.0: // %entry
88 ; CHECK-NEXT: fmov d0, d1
91 %1 = bitcast <2 x i32> %a to <4 x bfloat>
95 define <4 x bfloat> @v1i64_to_v4bf16(float, <1 x i64> %a) nounwind {
96 ; CHECK-LABEL: v1i64_to_v4bf16:
97 ; CHECK: // %bb.0: // %entry
98 ; CHECK-NEXT: fmov d0, d1
101 %1 = bitcast <1 x i64> %a to <4 x bfloat>
105 define <4 x bfloat> @i64_to_v4bf16(float, i64 %a) nounwind {
106 ; CHECK-LABEL: i64_to_v4bf16:
107 ; CHECK: // %bb.0: // %entry
108 ; CHECK-NEXT: fmov d0, x0
111 %1 = bitcast i64 %a to <4 x bfloat>
115 define <4 x bfloat> @v2float_to_v4bf16(float, <2 x float> %a) nounwind {
116 ; CHECK-LABEL: v2float_to_v4bf16:
117 ; CHECK: // %bb.0: // %entry
118 ; CHECK-NEXT: fmov d0, d1
121 %1 = bitcast <2 x float> %a to <4 x bfloat>
125 define <4 x bfloat> @v1double_to_v4bf16(float, <1 x double> %a) nounwind {
126 ; CHECK-LABEL: v1double_to_v4bf16:
127 ; CHECK: // %bb.0: // %entry
128 ; CHECK-NEXT: fmov d0, d1
131 %1 = bitcast <1 x double> %a to <4 x bfloat>
135 define <4 x bfloat> @double_to_v4bf16(float, double %a) nounwind {
136 ; CHECK-LABEL: double_to_v4bf16:
137 ; CHECK: // %bb.0: // %entry
138 ; CHECK-NEXT: fmov d0, d1
141 %1 = bitcast double %a to <4 x bfloat>
145 define <8 x i16> @v8bf16_to_v8i16(float, <8 x bfloat> %a) nounwind {
146 ; CHECK-LABEL: v8bf16_to_v8i16:
147 ; CHECK: // %bb.0: // %entry
148 ; CHECK-NEXT: mov v0.16b, v1.16b
151 %1 = bitcast <8 x bfloat> %a to <8 x i16>
155 define <4 x i32> @v8bf16_to_v4i32(float, <8 x bfloat> %a) nounwind {
156 ; CHECK-LABEL: v8bf16_to_v4i32:
157 ; CHECK: // %bb.0: // %entry
158 ; CHECK-NEXT: mov v0.16b, v1.16b
161 %1 = bitcast <8 x bfloat> %a to <4 x i32>
165 define <2 x i64> @v8bf16_to_v2i64(float, <8 x bfloat> %a) nounwind {
166 ; CHECK-LABEL: v8bf16_to_v2i64:
167 ; CHECK: // %bb.0: // %entry
168 ; CHECK-NEXT: mov v0.16b, v1.16b
171 %1 = bitcast <8 x bfloat> %a to <2 x i64>
175 define <4 x float> @v8bf16_to_v4float(float, <8 x bfloat> %a) nounwind {
176 ; CHECK-LABEL: v8bf16_to_v4float:
177 ; CHECK: // %bb.0: // %entry
178 ; CHECK-NEXT: mov v0.16b, v1.16b
181 %1 = bitcast <8 x bfloat> %a to <4 x float>
185 define <2 x double> @v8bf16_to_v2double(float, <8 x bfloat> %a) nounwind {
186 ; CHECK-LABEL: v8bf16_to_v2double:
187 ; CHECK: // %bb.0: // %entry
188 ; CHECK-NEXT: mov v0.16b, v1.16b
191 %1 = bitcast <8 x bfloat> %a to <2 x double>
195 define <8 x bfloat> @v8i16_to_v8bf16(float, <8 x i16> %a) nounwind {
196 ; CHECK-LABEL: v8i16_to_v8bf16:
197 ; CHECK: // %bb.0: // %entry
198 ; CHECK-NEXT: mov v0.16b, v1.16b
201 %1 = bitcast <8 x i16> %a to <8 x bfloat>
205 define <8 x bfloat> @v4i32_to_v8bf16(float, <4 x i32> %a) nounwind {
206 ; CHECK-LABEL: v4i32_to_v8bf16:
207 ; CHECK: // %bb.0: // %entry
208 ; CHECK-NEXT: mov v0.16b, v1.16b
211 %1 = bitcast <4 x i32> %a to <8 x bfloat>
215 define <8 x bfloat> @v2i64_to_v8bf16(float, <2 x i64> %a) nounwind {
216 ; CHECK-LABEL: v2i64_to_v8bf16:
217 ; CHECK: // %bb.0: // %entry
218 ; CHECK-NEXT: mov v0.16b, v1.16b
221 %1 = bitcast <2 x i64> %a to <8 x bfloat>
225 define <8 x bfloat> @v4float_to_v8bf16(float, <4 x float> %a) nounwind {
226 ; CHECK-LABEL: v4float_to_v8bf16:
227 ; CHECK: // %bb.0: // %entry
228 ; CHECK-NEXT: mov v0.16b, v1.16b
231 %1 = bitcast <4 x float> %a to <8 x bfloat>
235 define <8 x bfloat> @v2double_to_v8bf16(float, <2 x double> %a) nounwind {
236 ; CHECK-LABEL: v2double_to_v8bf16:
237 ; CHECK: // %bb.0: // %entry
238 ; CHECK-NEXT: mov v0.16b, v1.16b
241 %1 = bitcast <2 x double> %a to <8 x bfloat>