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 i8> @concat1(<2 x i8> %A, <2 x i8> %B) {
5 ; CHECK-LABEL: concat1:
7 ; CHECK-NEXT: uzp1 v0.4h, v0.4h, v1.4h
9 %v4i8 = shufflevector <2 x i8> %A, <2 x i8> %B, <4 x i32> <i32 0, i32 1, i32 2, i32 3>
13 define <8 x i8> @concat2(<4 x i8> %A, <4 x i8> %B) {
14 ; CHECK-LABEL: concat2:
16 ; CHECK-NEXT: uzp1 v0.8b, v0.8b, v1.8b
18 %v8i8 = shufflevector <4 x i8> %A, <4 x i8> %B, <8 x i32> <i32 0, i32 1, i32 2, i32 3, i32 4, i32 5, i32 6, i32 7>
22 define <16 x i8> @concat3(<8 x i8> %A, <8 x i8> %B) {
23 ; CHECK-LABEL: concat3:
25 ; CHECK-NEXT: // kill: def $d0 killed $d0 def $q0
26 ; CHECK-NEXT: // kill: def $d1 killed $d1 def $q1
27 ; CHECK-NEXT: mov v0.d[1], v1.d[0]
29 %v16i8 = shufflevector <8 x i8> %A, <8 x i8> %B, <16 x i32> <i32 0, i32 1, i32 2, i32 3, i32 4, i32 5, i32 6, i32 7, i32 8, i32 9, i32 10, i32 11, i32 12, i32 13, i32 14, i32 15>
33 define <4 x i16> @concat4(<2 x i16> %A, <2 x i16> %B) {
34 ; CHECK-LABEL: concat4:
36 ; CHECK-NEXT: uzp1 v0.4h, v0.4h, v1.4h
38 %v4i16 = shufflevector <2 x i16> %A, <2 x i16> %B, <4 x i32> <i32 0, i32 1, i32 2, i32 3>
42 define <8 x i16> @concat5(<4 x i16> %A, <4 x i16> %B) {
43 ; CHECK-LABEL: concat5:
45 ; CHECK-NEXT: // kill: def $d0 killed $d0 def $q0
46 ; CHECK-NEXT: // kill: def $d1 killed $d1 def $q1
47 ; CHECK-NEXT: mov v0.d[1], v1.d[0]
49 %v8i16 = shufflevector <4 x i16> %A, <4 x i16> %B, <8 x i32> <i32 0, i32 1, i32 2, i32 3, i32 4, i32 5, i32 6, i32 7>
53 define <16 x i16> @concat6(ptr %A, ptr %B) {
54 ; CHECK-LABEL: concat6:
56 ; CHECK-NEXT: ldr q0, [x0]
57 ; CHECK-NEXT: ldr q1, [x1]
59 %tmp1 = load <8 x i16>, ptr %A
60 %tmp2 = load <8 x i16>, ptr %B
61 %v16i16 = shufflevector <8 x i16> %tmp1, <8 x i16> %tmp2, <16 x i32> <i32 0, i32 1, i32 2, i32 3, i32 4, i32 5, i32 6, i32 7, i32 8, i32 9, i32 10, i32 11, i32 12, i32 13, i32 14, i32 15>
62 ret <16 x i16> %v16i16
65 define <4 x i32> @concat7(<2 x i32> %A, <2 x i32> %B) {
66 ; CHECK-LABEL: concat7:
68 ; CHECK-NEXT: // kill: def $d0 killed $d0 def $q0
69 ; CHECK-NEXT: // kill: def $d1 killed $d1 def $q1
70 ; CHECK-NEXT: mov v0.d[1], v1.d[0]
72 %v4i32 = shufflevector <2 x i32> %A, <2 x i32> %B, <4 x i32> <i32 0, i32 1, i32 2, i32 3>
76 define <8 x i32> @concat8(ptr %A, ptr %B) {
77 ; CHECK-LABEL: concat8:
79 ; CHECK-NEXT: ldr q0, [x0]
80 ; CHECK-NEXT: ldr q1, [x1]
82 %tmp1 = load <4 x i32>, ptr %A
83 %tmp2 = load <4 x i32>, ptr %B
84 %v8i32 = shufflevector <4 x i32> %tmp1, <4 x i32> %tmp2, <8 x i32> <i32 0, i32 1, i32 2, i32 3, i32 4, i32 5, i32 6, i32 7>
88 define <4 x half> @concat9(<2 x half> %A, <2 x half> %B) {
89 ; CHECK-LABEL: concat9:
91 ; CHECK-NEXT: zip1 v0.2s, v0.2s, v1.2s
93 %v4half= shufflevector <2 x half> %A, <2 x half> %B, <4 x i32> <i32 0, i32 1, i32 2, i32 3>
94 ret <4 x half> %v4half
97 define <8 x half> @concat10(<4 x half> %A, <4 x half> %B) {
98 ; CHECK-LABEL: concat10:
100 ; CHECK-NEXT: // kill: def $d0 killed $d0 def $q0
101 ; CHECK-NEXT: // kill: def $d1 killed $d1 def $q1
102 ; CHECK-NEXT: mov v0.d[1], v1.d[0]
104 %v8half= shufflevector <4 x half> %A, <4 x half> %B, <8 x i32> <i32 0, i32 1, i32 2, i32 3, i32 4, i32 5, i32 6, i32 7>
105 ret <8 x half> %v8half
108 define <16 x half> @concat11(<8 x half> %A, <8 x half> %B) {
109 ; CHECK-LABEL: concat11:
112 %v16half= shufflevector <8 x half> %A, <8 x half> %B, <16 x i32> <i32 0, i32 1, i32 2, i32 3, i32 4, i32 5, i32 6, i32 7, i32 8, i32 9, i32 10, i32 11, i32 12, i32 13, i32 14, i32 15>
113 ret <16 x half> %v16half