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 <4 x i32> @v4i32(<4 x i32> %a) {
16 ; CHECK: // %bb.0: // %entry
17 ; CHECK-NEXT: rev64 v0.4s, v0.4s
18 ; CHECK-NEXT: ext v0.16b, v0.16b, v0.16b, #8
21 %V128 = shufflevector <4 x i32> %a, <4 x i32> undef, <4 x i32> <i32 3, i32 2, i32 1, i32 0>
25 define <2 x i32> @v2i32(<2 x i32> %a) {
27 ; CHECK: // %bb.0: // %entry
28 ; CHECK-NEXT: rev64 v0.2s, v0.2s
31 %V128 = shufflevector <2 x i32> %a, <2 x i32> undef, <2 x i32> <i32 1, i32 0>
35 define <8 x i16> @v8i16(<8 x i16> %a) {
37 ; CHECK: // %bb.0: // %entry
38 ; CHECK-NEXT: rev64 v0.8h, v0.8h
39 ; CHECK-NEXT: ext v0.16b, v0.16b, v0.16b, #8
42 %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>
46 define <8 x i16> @v8i16_2(<4 x i16> %a, <4 x i16> %b) {
47 ; CHECK-LABEL: v8i16_2:
48 ; CHECK: // %bb.0: // %entry
49 ; CHECK-NEXT: adrp x8, .LCPI4_0
50 ; CHECK-NEXT: // kill: def $d1 killed $d1 killed $q0_q1 def $q0_q1
51 ; CHECK-NEXT: ldr q2, [x8, :lo12:.LCPI4_0]
52 ; CHECK-NEXT: // kill: def $d0 killed $d0 killed $q0_q1 def $q0_q1
53 ; CHECK-NEXT: tbl v0.16b, { v0.16b, v1.16b }, v2.16b
56 %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>
60 define <4 x i16> @v4i16(<4 x i16> %a) {
62 ; CHECK: // %bb.0: // %entry
63 ; CHECK-NEXT: rev64 v0.4h, v0.4h
66 %V128 = shufflevector <4 x i16> %a, <4 x i16> undef, <4 x i32> <i32 3, i32 2, i32 1, i32 0>
70 define <16 x i8> @v16i8(<16 x i8> %a) {
72 ; CHECK: // %bb.0: // %entry
73 ; CHECK-NEXT: rev64 v0.16b, v0.16b
74 ; CHECK-NEXT: ext v0.16b, v0.16b, v0.16b, #8
77 %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>
81 define <16 x i8> @v16i8_2(<8 x i8> %a, <8 x i8> %b) {
82 ; CHECK-LABEL: v16i8_2:
83 ; CHECK: // %bb.0: // %entry
84 ; CHECK-NEXT: adrp x8, .LCPI7_0
85 ; CHECK-NEXT: // kill: def $d1 killed $d1 killed $q0_q1 def $q0_q1
86 ; CHECK-NEXT: ldr q2, [x8, :lo12:.LCPI7_0]
87 ; CHECK-NEXT: // kill: def $d0 killed $d0 killed $q0_q1 def $q0_q1
88 ; CHECK-NEXT: tbl v0.16b, { v0.16b, v1.16b }, v2.16b
91 %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>
95 define <8 x i8> @v8i8(<8 x i8> %a) {
97 ; CHECK: // %bb.0: // %entry
98 ; CHECK-NEXT: rev64 v0.8b, v0.8b
101 %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>
105 define <2 x double> @v2f64(<2 x double> %a) {
106 ; CHECK-LABEL: v2f64:
107 ; CHECK: // %bb.0: // %entry
108 ; CHECK-NEXT: ext v0.16b, v0.16b, v0.16b, #8
111 %V128 = shufflevector <2 x double> %a, <2 x double> undef, <2 x i32> <i32 1, i32 0>
112 ret <2 x double> %V128
115 define <4 x float> @v4f32(<4 x float> %a) {
116 ; CHECK-LABEL: v4f32:
117 ; CHECK: // %bb.0: // %entry
118 ; CHECK-NEXT: rev64 v0.4s, v0.4s
119 ; CHECK-NEXT: ext v0.16b, v0.16b, v0.16b, #8
122 %V128 = shufflevector <4 x float> %a, <4 x float> undef, <4 x i32> <i32 3, i32 2, i32 1, i32 0>
123 ret <4 x float> %V128
126 define <2 x float> @v2f32(<2 x float> %a) {
127 ; CHECK-LABEL: v2f32:
128 ; CHECK: // %bb.0: // %entry
129 ; CHECK-NEXT: rev64 v0.2s, v0.2s
132 %V128 = shufflevector <2 x float> %a, <2 x float> undef, <2 x i32> <i32 1, i32 0>
133 ret <2 x float> %V128
136 define <8 x half> @v8f16(<8 x half> %a) {
137 ; CHECK-LABEL: v8f16:
138 ; CHECK: // %bb.0: // %entry
139 ; CHECK-NEXT: rev64 v0.8h, v0.8h
140 ; CHECK-NEXT: ext v0.16b, v0.16b, v0.16b, #8
143 %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>
147 define <4 x half> @v4f16(<4 x half> %a) {
148 ; CHECK-LABEL: v4f16:
149 ; CHECK: // %bb.0: // %entry
150 ; CHECK-NEXT: rev64 v0.4h, v0.4h
153 %V128 = shufflevector <4 x half> %a, <4 x half> undef, <4 x i32> <i32 3, i32 2, i32 1, i32 0>