1 ; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py
2 ; RUN: llc -mtriple=aarch64-none-linux-gnu -mattr=+neon < %s -verify-machineinstrs | FileCheck %s
4 define <2 x i64> @v2i64(<2 x i64> %a) {
6 ; CHECK: // %bb.0: // %entry
7 ; CHECK-NEXT: ext v0.16b, v0.16b, v0.16b, #8
10 %V128 = shufflevector <2 x i64> %a, <2 x i64> undef, <2 x i32> <i32 1, i32 0>
14 define <2 x ptr> @v2p0(<2 x ptr> %a) {
16 ; CHECK: // %bb.0: // %entry
17 ; CHECK-NEXT: ext v0.16b, v0.16b, v0.16b, #8
20 %V128 = shufflevector <2 x ptr> %a, <2 x ptr> undef, <2 x i32> <i32 1, i32 0>
24 define <4 x i32> @v4i32(<4 x i32> %a) {
26 ; CHECK: // %bb.0: // %entry
27 ; CHECK-NEXT: rev64 v0.4s, v0.4s
28 ; CHECK-NEXT: ext v0.16b, v0.16b, v0.16b, #8
31 %V128 = shufflevector <4 x i32> %a, <4 x i32> undef, <4 x i32> <i32 3, i32 2, i32 1, i32 0>
35 define <2 x i32> @v2i32(<2 x i32> %a) {
37 ; CHECK: // %bb.0: // %entry
38 ; CHECK-NEXT: rev64 v0.2s, v0.2s
41 %V128 = shufflevector <2 x i32> %a, <2 x i32> undef, <2 x i32> <i32 1, i32 0>
45 define <8 x i16> @v8i16(<8 x i16> %a) {
47 ; CHECK: // %bb.0: // %entry
48 ; CHECK-NEXT: rev64 v0.8h, v0.8h
49 ; CHECK-NEXT: ext v0.16b, v0.16b, v0.16b, #8
52 %V128 = shufflevector <8 x i16> %a, <8 x i16> undef, <8 x i32> <i32 7, i32 6, i32 5, i32 4, i32 3, i32 2, i32 1, i32 0>
56 define <8 x i16> @v8i16_2(<4 x i16> %a, <4 x i16> %b) {
57 ; CHECK-LABEL: v8i16_2:
58 ; CHECK: // %bb.0: // %entry
59 ; CHECK-NEXT: adrp x8, .LCPI5_0
60 ; CHECK-NEXT: // kill: def $d1 killed $d1 killed $q0_q1 def $q0_q1
61 ; CHECK-NEXT: ldr q2, [x8, :lo12:.LCPI5_0]
62 ; CHECK-NEXT: // kill: def $d0 killed $d0 killed $q0_q1 def $q0_q1
63 ; CHECK-NEXT: tbl v0.16b, { v0.16b, v1.16b }, v2.16b
66 %V128 = shufflevector <4 x i16> %a, <4 x i16> %b, <8 x i32> <i32 7, i32 6, i32 5, i32 4, i32 3, i32 2, i32 1, i32 0>
70 define <4 x i16> @v4i16(<4 x i16> %a) {
72 ; CHECK: // %bb.0: // %entry
73 ; CHECK-NEXT: rev64 v0.4h, v0.4h
76 %V128 = shufflevector <4 x i16> %a, <4 x i16> undef, <4 x i32> <i32 3, i32 2, i32 1, i32 0>
80 define <16 x i8> @v16i8(<16 x i8> %a) {
82 ; CHECK: // %bb.0: // %entry
83 ; CHECK-NEXT: rev64 v0.16b, v0.16b
84 ; CHECK-NEXT: ext v0.16b, v0.16b, v0.16b, #8
87 %V128 = shufflevector <16 x i8> %a, <16 x i8> undef, <16 x i32> <i32 15, i32 14, i32 13, i32 12, i32 11, i32 10, i32 9, i32 8, i32 7, i32 6, i32 5, i32 4, i32 3, i32 2, i32 1, i32 0>
91 define <16 x i8> @v16i8_2(<8 x i8> %a, <8 x i8> %b) {
92 ; CHECK-LABEL: v16i8_2:
93 ; CHECK: // %bb.0: // %entry
94 ; CHECK-NEXT: adrp x8, .LCPI8_0
95 ; CHECK-NEXT: // kill: def $d1 killed $d1 killed $q0_q1 def $q0_q1
96 ; CHECK-NEXT: ldr q2, [x8, :lo12:.LCPI8_0]
97 ; CHECK-NEXT: // kill: def $d0 killed $d0 killed $q0_q1 def $q0_q1
98 ; CHECK-NEXT: tbl v0.16b, { v0.16b, v1.16b }, v2.16b
101 %V128 = shufflevector <8 x i8> %a, <8 x i8> %b, <16 x i32> <i32 15, i32 14, i32 13, i32 12, i32 11, i32 10, i32 9, i32 8, i32 7, i32 6, i32 5, i32 4, i32 3, i32 2, i32 1, i32 0>
105 define <8 x i8> @v8i8(<8 x i8> %a) {
107 ; CHECK: // %bb.0: // %entry
108 ; CHECK-NEXT: rev64 v0.8b, v0.8b
111 %V128 = shufflevector <8 x i8> %a, <8 x i8> undef, <8 x i32> <i32 7, i32 6, i32 5, i32 4, i32 3, i32 2, i32 1, i32 0>
115 define <2 x double> @v2f64(<2 x double> %a) {
116 ; CHECK-LABEL: v2f64:
117 ; CHECK: // %bb.0: // %entry
118 ; CHECK-NEXT: ext v0.16b, v0.16b, v0.16b, #8
121 %V128 = shufflevector <2 x double> %a, <2 x double> undef, <2 x i32> <i32 1, i32 0>
122 ret <2 x double> %V128
125 define <4 x float> @v4f32(<4 x float> %a) {
126 ; CHECK-LABEL: v4f32:
127 ; CHECK: // %bb.0: // %entry
128 ; CHECK-NEXT: rev64 v0.4s, v0.4s
129 ; CHECK-NEXT: ext v0.16b, v0.16b, v0.16b, #8
132 %V128 = shufflevector <4 x float> %a, <4 x float> undef, <4 x i32> <i32 3, i32 2, i32 1, i32 0>
133 ret <4 x float> %V128
136 define <2 x float> @v2f32(<2 x float> %a) {
137 ; CHECK-LABEL: v2f32:
138 ; CHECK: // %bb.0: // %entry
139 ; CHECK-NEXT: rev64 v0.2s, v0.2s
142 %V128 = shufflevector <2 x float> %a, <2 x float> undef, <2 x i32> <i32 1, i32 0>
143 ret <2 x float> %V128
146 define <8 x half> @v8f16(<8 x half> %a) {
147 ; CHECK-LABEL: v8f16:
148 ; CHECK: // %bb.0: // %entry
149 ; CHECK-NEXT: rev64 v0.8h, v0.8h
150 ; CHECK-NEXT: ext v0.16b, v0.16b, v0.16b, #8
153 %V128 = shufflevector <8 x half> %a, <8 x half> undef, <8 x i32> <i32 7, i32 6, i32 5, i32 4, i32 3, i32 2, i32 1, i32 0>
157 define <4 x half> @v4f16(<4 x half> %a) {
158 ; CHECK-LABEL: v4f16:
159 ; CHECK: // %bb.0: // %entry
160 ; CHECK-NEXT: rev64 v0.4h, v0.4h
163 %V128 = shufflevector <4 x half> %a, <4 x half> undef, <4 x i32> <i32 3, i32 2, i32 1, i32 0>