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 <4 x half> @interleave2_v4f16(<2 x half> %vec0, <2 x half> %vec1) {
5 ; CHECK-LABEL: interleave2_v4f16:
7 ; CHECK-NEXT: zip1 v0.4h, v0.4h, v1.4h
9 %retval = call <4 x half> @llvm.experimental.vector.interleave2.v4f16(<2 x half> %vec0, <2 x half> %vec1)
10 ret <4 x half> %retval
13 define <8 x half> @interleave2_v8f16(<4 x half> %vec0, <4 x half> %vec1) {
14 ; CHECK-LABEL: interleave2_v8f16:
16 ; CHECK-NEXT: // kill: def $d0 killed $d0 def $q0
17 ; CHECK-NEXT: // kill: def $d1 killed $d1 def $q1
18 ; CHECK-NEXT: adrp x8, .LCPI1_0
19 ; CHECK-NEXT: mov v0.d[1], v1.d[0]
20 ; CHECK-NEXT: ldr q1, [x8, :lo12:.LCPI1_0]
21 ; CHECK-NEXT: tbl v0.16b, { v0.16b }, v1.16b
23 %retval = call <8 x half> @llvm.experimental.vector.interleave2.v8f16(<4 x half> %vec0, <4 x half> %vec1)
24 ret <8 x half> %retval
27 define <16 x half> @interleave2_v16f16(<8 x half> %vec0, <8 x half> %vec1) {
28 ; CHECK-LABEL: interleave2_v16f16:
30 ; CHECK-NEXT: zip1 v2.8h, v0.8h, v1.8h
31 ; CHECK-NEXT: zip2 v1.8h, v0.8h, v1.8h
32 ; CHECK-NEXT: mov v0.16b, v2.16b
34 %retval = call <16 x half> @llvm.experimental.vector.interleave2.v16f16(<8 x half> %vec0, <8 x half> %vec1)
35 ret <16 x half> %retval
38 define <4 x float> @interleave2_v4f32(<2 x float> %vec0, <2 x float> %vec1) {
39 ; CHECK-LABEL: interleave2_v4f32:
41 ; CHECK-NEXT: // kill: def $d0 killed $d0 def $q0
42 ; CHECK-NEXT: // kill: def $d1 killed $d1 def $q1
43 ; CHECK-NEXT: mov v0.d[1], v1.d[0]
44 ; CHECK-NEXT: rev64 v1.4s, v0.4s
45 ; CHECK-NEXT: uzp1 v0.4s, v0.4s, v1.4s
47 %retval = call <4 x float> @llvm.experimental.vector.interleave2.v4f32(<2 x float> %vec0, <2 x float> %vec1)
48 ret <4 x float> %retval
51 define <8 x float> @interleave2_v8f32(<4 x float> %vec0, <4 x float> %vec1) {
52 ; CHECK-LABEL: interleave2_v8f32:
54 ; CHECK-NEXT: zip1 v2.4s, v0.4s, v1.4s
55 ; CHECK-NEXT: zip2 v1.4s, v0.4s, v1.4s
56 ; CHECK-NEXT: mov v0.16b, v2.16b
58 %retval = call <8 x float> @llvm.experimental.vector.interleave2.v8f32(<4 x float> %vec0, <4 x float> %vec1)
59 ret <8 x float> %retval
62 define <4 x double> @interleave2_v4f64(<2 x double> %vec0, <2 x double> %vec1) {
63 ; CHECK-LABEL: interleave2_v4f64:
65 ; CHECK-NEXT: zip1 v2.2d, v0.2d, v1.2d
66 ; CHECK-NEXT: zip2 v1.2d, v0.2d, v1.2d
67 ; CHECK-NEXT: mov v0.16b, v2.16b
69 %retval = call <4 x double>@llvm.experimental.vector.interleave2.v4f64(<2 x double> %vec0, <2 x double> %vec1)
70 ret <4 x double> %retval
75 define <32 x i8> @interleave2_v32i8(<16 x i8> %vec0, <16 x i8> %vec1) {
76 ; CHECK-LABEL: interleave2_v32i8:
78 ; CHECK-NEXT: zip1 v2.16b, v0.16b, v1.16b
79 ; CHECK-NEXT: zip2 v1.16b, v0.16b, v1.16b
80 ; CHECK-NEXT: mov v0.16b, v2.16b
82 %retval = call <32 x i8> @llvm.experimental.vector.interleave2.v32i8(<16 x i8> %vec0, <16 x i8> %vec1)
86 define <16 x i16> @interleave2_v16i16(<8 x i16> %vec0, <8 x i16> %vec1) {
87 ; CHECK-LABEL: interleave2_v16i16:
89 ; CHECK-NEXT: zip1 v2.8h, v0.8h, v1.8h
90 ; CHECK-NEXT: zip2 v1.8h, v0.8h, v1.8h
91 ; CHECK-NEXT: mov v0.16b, v2.16b
93 %retval = call <16 x i16> @llvm.experimental.vector.interleave2.v16i16(<8 x i16> %vec0, <8 x i16> %vec1)
94 ret <16 x i16> %retval
97 define <8 x i32> @interleave2_v8i32(<4 x i32> %vec0, <4 x i32> %vec1) {
98 ; CHECK-LABEL: interleave2_v8i32:
100 ; CHECK-NEXT: zip1 v2.4s, v0.4s, v1.4s
101 ; CHECK-NEXT: zip2 v1.4s, v0.4s, v1.4s
102 ; CHECK-NEXT: mov v0.16b, v2.16b
104 %retval = call <8 x i32> @llvm.experimental.vector.interleave2.v8i32(<4 x i32> %vec0, <4 x i32> %vec1)
105 ret <8 x i32> %retval
108 define <4 x i64> @interleave2_v4i64(<2 x i64> %vec0, <2 x i64> %vec1) {
109 ; CHECK-LABEL: interleave2_v4i64:
111 ; CHECK-NEXT: zip1 v2.2d, v0.2d, v1.2d
112 ; CHECK-NEXT: zip2 v1.2d, v0.2d, v1.2d
113 ; CHECK-NEXT: mov v0.16b, v2.16b
115 %retval = call <4 x i64> @llvm.experimental.vector.interleave2.v4i64(<2 x i64> %vec0, <2 x i64> %vec1)
116 ret <4 x i64> %retval
121 declare <4 x half> @llvm.experimental.vector.interleave2.v4f16(<2 x half>, <2 x half>)
122 declare <8 x half> @llvm.experimental.vector.interleave2.v8f16(<4 x half>, <4 x half>)
123 declare <16 x half> @llvm.experimental.vector.interleave2.v16f16(<8 x half>, <8 x half>)
124 declare <4 x float> @llvm.experimental.vector.interleave2.v4f32(<2 x float>, <2 x float>)
125 declare <8 x float> @llvm.experimental.vector.interleave2.v8f32(<4 x float>, <4 x float>)
126 declare <4 x double> @llvm.experimental.vector.interleave2.v4f64(<2 x double>, <2 x double>)
128 ; Integer declarations
129 declare <32 x i8> @llvm.experimental.vector.interleave2.v32i8(<16 x i8>, <16 x i8>)
130 declare <16 x i16> @llvm.experimental.vector.interleave2.v16i16(<8 x i16>, <8 x i16>)
131 declare <8 x i32> @llvm.experimental.vector.interleave2.v8i32(<4 x i32>, <4 x i32>)
132 declare <4 x i64> @llvm.experimental.vector.interleave2.v4i64(<2 x i64>, <2 x i64>)