1 ; RUN: llc < %s -mtriple=arm64-eabi -aarch64-neon-syntax=apple -asm-verbose=false | FileCheck %s
3 ; Test efficient codegen of vector extends up from legal type to 128 bit
4 ; and 256 bit vector types.
9 define <8 x i16> @func1(<8 x i8> %v0) nounwind {
11 ; CHECK-NEXT: ushll.8h v0, v0, #0
13 %r = zext <8 x i8> %v0 to <8 x i16>
17 define <8 x i16> @func2(<8 x i8> %v0) nounwind {
19 ; CHECK-NEXT: sshll.8h v0, v0, #0
21 %r = sext <8 x i8> %v0 to <8 x i16>
25 define <16 x i16> @func3(<16 x i8> %v0) nounwind {
27 ; CHECK-NEXT: ushll2.8h v1, v0, #0
28 ; CHECK-NEXT: ushll.8h v0, v0, #0
30 %r = zext <16 x i8> %v0 to <16 x i16>
34 define <16 x i16> @func4(<16 x i8> %v0) nounwind {
36 ; CHECK-NEXT: sshll2.8h v1, v0, #0
37 ; CHECK-NEXT: sshll.8h v0, v0, #0
39 %r = sext <16 x i8> %v0 to <16 x i16>
47 define <4 x i32> @afunc1(<4 x i16> %v0) nounwind {
48 ; CHECK-LABEL: afunc1:
49 ; CHECK-NEXT: ushll.4s v0, v0, #0
51 %r = zext <4 x i16> %v0 to <4 x i32>
55 define <4 x i32> @afunc2(<4 x i16> %v0) nounwind {
56 ; CHECK-LABEL: afunc2:
57 ; CHECK-NEXT: sshll.4s v0, v0, #0
59 %r = sext <4 x i16> %v0 to <4 x i32>
63 define <8 x i32> @afunc3(<8 x i16> %v0) nounwind {
64 ; CHECK-LABEL: afunc3:
65 ; CHECK-NEXT: ushll2.4s v1, v0, #0
66 ; CHECK-NEXT: ushll.4s v0, v0, #0
68 %r = zext <8 x i16> %v0 to <8 x i32>
72 define <8 x i32> @afunc4(<8 x i16> %v0) nounwind {
73 ; CHECK-LABEL: afunc4:
74 ; CHECK-NEXT: sshll2.4s v1, v0, #0
75 ; CHECK-NEXT: sshll.4s v0, v0, #0
77 %r = sext <8 x i16> %v0 to <8 x i32>
81 define <8 x i32> @bfunc1(<8 x i8> %v0) nounwind {
82 ; CHECK-LABEL: bfunc1:
83 ; CHECK-NEXT: ushll.8h v0, v0, #0
84 ; CHECK-NEXT: ushll2.4s v1, v0, #0
85 ; CHECK-NEXT: ushll.4s v0, v0, #0
87 %r = zext <8 x i8> %v0 to <8 x i32>
91 define <8 x i32> @bfunc2(<8 x i8> %v0) nounwind {
92 ; CHECK-LABEL: bfunc2:
93 ; CHECK-NEXT: sshll.8h v0, v0, #0
94 ; CHECK-NEXT: sshll2.4s v1, v0, #0
95 ; CHECK-NEXT: sshll.4s v0, v0, #0
97 %r = sext <8 x i8> %v0 to <8 x i32>
105 define <4 x i64> @zfunc1(<4 x i32> %v0) nounwind {
106 ; CHECK-LABEL: zfunc1:
107 ; CHECK-NEXT: ushll2.2d v1, v0, #0
108 ; CHECK-NEXT: ushll.2d v0, v0, #0
110 %r = zext <4 x i32> %v0 to <4 x i64>
114 define <4 x i64> @zfunc2(<4 x i32> %v0) nounwind {
115 ; CHECK-LABEL: zfunc2:
116 ; CHECK-NEXT: sshll2.2d v1, v0, #0
117 ; CHECK-NEXT: sshll.2d v0, v0, #0
119 %r = sext <4 x i32> %v0 to <4 x i64>
123 define <4 x i64> @bfunc3(<4 x i16> %v0) nounwind {
124 ; CHECK-LABEL: func3:
125 ; CHECK-NEXT: ushll.4s v0, v0, #0
126 ; CHECK-NEXT: ushll2.2d v1, v0, #0
127 ; CHECK-NEXT: ushll.2d v0, v0, #0
129 %r = zext <4 x i16> %v0 to <4 x i64>
133 define <4 x i64> @cfunc4(<4 x i16> %v0) nounwind {
134 ; CHECK-LABEL: func4:
135 ; CHECK-NEXT: sshll.4s v0, v0, #0
136 ; CHECK-NEXT: sshll2.2d v1, v0, #0
137 ; CHECK-NEXT: sshll.2d v0, v0, #0
139 %r = sext <4 x i16> %v0 to <4 x i64>