1 ; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py UTC_ARGS: --version 5
2 ; RUN: llc < %s -mtriple=arm64-eabi -aarch64-neon-syntax=apple | FileCheck %s --check-prefix=CHECK-SD
3 ; RUN: llc < %s -mtriple=arm64-eabi -global-isel=1 -aarch64-neon-syntax=apple | FileCheck %s --check-prefix=CHECK-GI
5 ; Extract of an upper half of a vector is an "ext.16b v0, v0, v0, #8" insn.
7 define <8 x i8> @v8i8(<16 x i8> %a) nounwind {
8 ; CHECK-SD-LABEL: v8i8:
10 ; CHECK-SD-NEXT: ext.16b v0, v0, v0, #8
11 ; CHECK-SD-NEXT: // kill: def $d0 killed $d0 killed $q0
14 ; CHECK-GI-LABEL: v8i8:
16 ; CHECK-GI-NEXT: mov d0, v0[1]
18 %ret = shufflevector <16 x i8> %a, <16 x i8> %a, <8 x i32> <i32 8, i32 9, i32 10, i32 11, i32 12, i32 13, i32 14, i32 15>
22 define <4 x i16> @v4i16(<8 x i16> %a) nounwind {
23 ; CHECK-SD-LABEL: v4i16:
25 ; CHECK-SD-NEXT: ext.16b v0, v0, v0, #8
26 ; CHECK-SD-NEXT: // kill: def $d0 killed $d0 killed $q0
29 ; CHECK-GI-LABEL: v4i16:
31 ; CHECK-GI-NEXT: mov d0, v0[1]
33 %ret = shufflevector <8 x i16> %a, <8 x i16> %a, <4 x i32> <i32 4, i32 5, i32 6, i32 7>
37 define <2 x i32> @v2i32(<4 x i32> %a) nounwind {
38 ; CHECK-SD-LABEL: v2i32:
40 ; CHECK-SD-NEXT: ext.16b v0, v0, v0, #8
41 ; CHECK-SD-NEXT: // kill: def $d0 killed $d0 killed $q0
44 ; CHECK-GI-LABEL: v2i32:
46 ; CHECK-GI-NEXT: mov d0, v0[1]
48 %ret = shufflevector <4 x i32> %a, <4 x i32> %a, <2 x i32> <i32 2, i32 3>
52 define <1 x i64> @v1i64(<2 x i64> %a) nounwind {
53 ; CHECK-SD-LABEL: v1i64:
55 ; CHECK-SD-NEXT: ext.16b v0, v0, v0, #8
56 ; CHECK-SD-NEXT: // kill: def $d0 killed $d0 killed $q0
59 ; CHECK-GI-LABEL: v1i64:
61 ; CHECK-GI-NEXT: mov d0, v0[1]
63 %ret = shufflevector <2 x i64> %a, <2 x i64> %a, <1 x i32> <i32 1>
67 define <1 x ptr> @v1p0(<2 x ptr> %a) nounwind {
68 ; CHECK-SD-LABEL: v1p0:
70 ; CHECK-SD-NEXT: ext.16b v0, v0, v0, #8
71 ; CHECK-SD-NEXT: // kill: def $d0 killed $d0 killed $q0
74 ; CHECK-GI-LABEL: v1p0:
76 ; CHECK-GI-NEXT: mov d0, v0[1]
78 %ret = shufflevector <2 x ptr> %a, <2 x ptr> %a, <1 x i32> <i32 1>
82 define <2 x float> @v2f32(<4 x float> %a) nounwind {
83 ; CHECK-SD-LABEL: v2f32:
85 ; CHECK-SD-NEXT: ext.16b v0, v0, v0, #8
86 ; CHECK-SD-NEXT: // kill: def $d0 killed $d0 killed $q0
89 ; CHECK-GI-LABEL: v2f32:
91 ; CHECK-GI-NEXT: mov d0, v0[1]
93 %ret = shufflevector <4 x float> %a, <4 x float> %a, <2 x i32> <i32 2, i32 3>
97 define <1 x double> @v1f64(<2 x double> %a) nounwind {
98 ; CHECK-SD-LABEL: v1f64:
100 ; CHECK-SD-NEXT: ext.16b v0, v0, v0, #8
101 ; CHECK-SD-NEXT: // kill: def $d0 killed $d0 killed $q0
104 ; CHECK-GI-LABEL: v1f64:
105 ; CHECK-GI: // %bb.0:
106 ; CHECK-GI-NEXT: mov d0, v0[1]
108 %ret = shufflevector <2 x double> %a, <2 x double> %a, <1 x i32> <i32 1>
109 ret <1 x double> %ret