1 ; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py
2 ; RUN: llc < %s -mtriple=aarch64-linux-gnu | FileCheck %s
4 define {<2 x half>, <2 x half>} @vector_deinterleave_v2f16_v4f16(<4 x half> %vec) {
5 ; CHECK-LABEL: vector_deinterleave_v2f16_v4f16:
7 ; CHECK-NEXT: // kill: def $d0 killed $d0 def $q0
8 ; CHECK-NEXT: dup v2.2s, v0.s[1]
9 ; CHECK-NEXT: mov v1.16b, v2.16b
10 ; CHECK-NEXT: mov v1.h[0], v0.h[1]
11 ; CHECK-NEXT: mov v0.h[1], v2.h[0]
12 ; CHECK-NEXT: // kill: def $d0 killed $d0 killed $q0
13 ; CHECK-NEXT: // kill: def $d1 killed $d1 killed $q1
15 %retval = call {<2 x half>, <2 x half>} @llvm.experimental.vector.deinterleave2.v4f16(<4 x half> %vec)
16 ret {<2 x half>, <2 x half>} %retval
19 define {<4 x half>, <4 x half>} @vector_deinterleave_v4f16_v8f16(<8 x half> %vec) {
20 ; CHECK-LABEL: vector_deinterleave_v4f16_v8f16:
22 ; CHECK-NEXT: ext v1.16b, v0.16b, v0.16b, #8
23 ; CHECK-NEXT: uzp1 v2.4h, v0.4h, v1.4h
24 ; CHECK-NEXT: uzp2 v1.4h, v0.4h, v1.4h
25 ; CHECK-NEXT: fmov d0, d2
27 %retval = call {<4 x half>, <4 x half>} @llvm.experimental.vector.deinterleave2.v8f16(<8 x half> %vec)
28 ret {<4 x half>, <4 x half>} %retval
31 define {<8 x half>, <8 x half>} @vector_deinterleave_v8f16_v16f16(<16 x half> %vec) {
32 ; CHECK-LABEL: vector_deinterleave_v8f16_v16f16:
34 ; CHECK-NEXT: uzp1 v2.8h, v0.8h, v1.8h
35 ; CHECK-NEXT: uzp2 v1.8h, v0.8h, v1.8h
36 ; CHECK-NEXT: mov v0.16b, v2.16b
38 %retval = call {<8 x half>, <8 x half>} @llvm.experimental.vector.deinterleave2.v16f16(<16 x half> %vec)
39 ret {<8 x half>, <8 x half>} %retval
42 define {<2 x float>, <2 x float>} @vector_deinterleave_v2f32_v4f32(<4 x float> %vec) {
43 ; CHECK-LABEL: vector_deinterleave_v2f32_v4f32:
45 ; CHECK-NEXT: ext v1.16b, v0.16b, v0.16b, #8
46 ; CHECK-NEXT: zip1 v2.2s, v0.2s, v1.2s
47 ; CHECK-NEXT: zip2 v1.2s, v0.2s, v1.2s
48 ; CHECK-NEXT: fmov d0, d2
50 %retval = call {<2 x float>, <2 x float>} @llvm.experimental.vector.deinterleave2.v4f32(<4 x float> %vec)
51 ret {<2 x float>, <2 x float>} %retval
54 define {<4 x float>, <4 x float>} @vector_deinterleave_v4f32_v8f32(<8 x float> %vec) {
55 ; CHECK-LABEL: vector_deinterleave_v4f32_v8f32:
57 ; CHECK-NEXT: uzp1 v2.4s, v0.4s, v1.4s
58 ; CHECK-NEXT: uzp2 v1.4s, v0.4s, v1.4s
59 ; CHECK-NEXT: mov v0.16b, v2.16b
61 %retval = call {<4 x float>, <4 x float>} @llvm.experimental.vector.deinterleave2.v8f32(<8 x float> %vec)
62 ret {<4 x float>, <4 x float>} %retval
65 define {<2 x double>, <2 x double>} @vector_deinterleave_v2f64_v4f64(<4 x double> %vec) {
66 ; CHECK-LABEL: vector_deinterleave_v2f64_v4f64:
68 ; CHECK-NEXT: zip1 v2.2d, v0.2d, v1.2d
69 ; CHECK-NEXT: zip2 v1.2d, v0.2d, v1.2d
70 ; CHECK-NEXT: mov v0.16b, v2.16b
72 %retval = call {<2 x double>, <2 x double>} @llvm.experimental.vector.deinterleave2.v4f64(<4 x double> %vec)
73 ret {<2 x double>, <2 x double>} %retval
78 define {<16 x i8>, <16 x i8>} @vector_deinterleave_v16i8_v32i8(<32 x i8> %vec) {
79 ; CHECK-LABEL: vector_deinterleave_v16i8_v32i8:
81 ; CHECK-NEXT: uzp1 v2.16b, v0.16b, v1.16b
82 ; CHECK-NEXT: uzp2 v1.16b, v0.16b, v1.16b
83 ; CHECK-NEXT: mov v0.16b, v2.16b
85 %retval = call {<16 x i8>, <16 x i8>} @llvm.experimental.vector.deinterleave2.v32i8(<32 x i8> %vec)
86 ret {<16 x i8>, <16 x i8>} %retval
89 define {<8 x i16>, <8 x i16>} @vector_deinterleave_v8i16_v16i16(<16 x i16> %vec) {
90 ; CHECK-LABEL: vector_deinterleave_v8i16_v16i16:
92 ; CHECK-NEXT: uzp1 v2.8h, v0.8h, v1.8h
93 ; CHECK-NEXT: uzp2 v1.8h, v0.8h, v1.8h
94 ; CHECK-NEXT: mov v0.16b, v2.16b
96 %retval = call {<8 x i16>, <8 x i16>} @llvm.experimental.vector.deinterleave2.v16i16(<16 x i16> %vec)
97 ret {<8 x i16>, <8 x i16>} %retval
100 define {<4 x i32>, <4 x i32>} @vector_deinterleave_v4i32_v8i32(<8 x i32> %vec) {
101 ; CHECK-LABEL: vector_deinterleave_v4i32_v8i32:
103 ; CHECK-NEXT: uzp1 v2.4s, v0.4s, v1.4s
104 ; CHECK-NEXT: uzp2 v1.4s, v0.4s, v1.4s
105 ; CHECK-NEXT: mov v0.16b, v2.16b
107 %retval = call {<4 x i32>, <4 x i32>} @llvm.experimental.vector.deinterleave2.v8i32(<8 x i32> %vec)
108 ret {<4 x i32>, <4 x i32>} %retval
111 define {<2 x i64>, <2 x i64>} @vector_deinterleave_v2i64_v4i64(<4 x i64> %vec) {
112 ; CHECK-LABEL: vector_deinterleave_v2i64_v4i64:
114 ; CHECK-NEXT: zip1 v2.2d, v0.2d, v1.2d
115 ; CHECK-NEXT: zip2 v1.2d, v0.2d, v1.2d
116 ; CHECK-NEXT: mov v0.16b, v2.16b
118 %retval = call {<2 x i64>, <2 x i64>} @llvm.experimental.vector.deinterleave2.v4i64(<4 x i64> %vec)
119 ret {<2 x i64>, <2 x i64>} %retval
123 ; Floating declarations
124 declare {<2 x half>,<2 x half>} @llvm.experimental.vector.deinterleave2.v4f16(<4 x half>)
125 declare {<4 x half>, <4 x half>} @llvm.experimental.vector.deinterleave2.v8f16(<8 x half>)
126 declare {<2 x float>, <2 x float>} @llvm.experimental.vector.deinterleave2.v4f32(<4 x float>)
127 declare {<8 x half>, <8 x half>} @llvm.experimental.vector.deinterleave2.v16f16(<16 x half>)
128 declare {<4 x float>, <4 x float>} @llvm.experimental.vector.deinterleave2.v8f32(<8 x float>)
129 declare {<2 x double>, <2 x double>} @llvm.experimental.vector.deinterleave2.v4f64(<4 x double>)
131 ; Integer declarations
132 declare {<16 x i8>, <16 x i8>} @llvm.experimental.vector.deinterleave2.v32i8(<32 x i8>)
133 declare {<8 x i16>, <8 x i16>} @llvm.experimental.vector.deinterleave2.v16i16(<16 x i16>)
134 declare {<4 x i32>, <4 x i32>} @llvm.experimental.vector.deinterleave2.v8i32(<8 x i32>)
135 declare {<2 x i64>, <2 x i64>} @llvm.experimental.vector.deinterleave2.v4i64(<4 x i64>)