1 ; RUN: llc -mtriple=arm-eabi -mattr=+neon %s -o - | FileCheck %s
4 ; Test generataion of code for vmull instruction when multiplying 128-bit
5 ; vectors that were created by sign-extending smaller vector sizes.
7 ; The vmull operation requires 64-bit vectors, so we must extend the original
8 ; vector size to 64 bits for vmull operation.
9 ; Previously failed with an assertion because the <4 x i8> vector was too small
15 define void @sextload_v4i8_c(ptr %v) nounwind {
16 ;CHECK-LABEL: sextload_v4i8_c:
18 %0 = load <4 x i8>, ptr %v, align 8
19 %v0 = sext <4 x i8> %0 to <4 x i32>
21 %v1 = mul <4 x i32> %v0, <i32 3, i32 3, i32 3, i32 3>
22 store <4 x i32> %v1, ptr undef, align 8
28 define void @sextload_v2i8_c(ptr %v) nounwind {
29 ;CHECK-LABEL: sextload_v2i8_c:
31 %0 = load <2 x i8>, ptr %v, align 8
32 %v0 = sext <2 x i8> %0 to <2 x i64>
34 %v1 = mul <2 x i64> %v0, <i64 3, i64 3>
35 store <2 x i64> %v1, ptr undef, align 8
41 define void @sextload_v2i16_c(ptr %v) nounwind {
42 ;CHECK-LABEL: sextload_v2i16_c:
44 %0 = load <2 x i16>, ptr %v, align 8
45 %v0 = sext <2 x i16> %0 to <2 x i64>
47 %v1 = mul <2 x i64> %v0, <i64 3, i64 3>
48 store <2 x i64> %v1, ptr undef, align 8
56 define void @sextload_v4i8_v(ptr %v, ptr %p) nounwind {
57 ;CHECK-LABEL: sextload_v4i8_v:
59 %0 = load <4 x i8>, ptr %v, align 8
60 %v0 = sext <4 x i8> %0 to <4 x i32>
62 %1 = load <4 x i8>, ptr %p, align 8
63 %v2 = sext <4 x i8> %1 to <4 x i32>
65 %v1 = mul <4 x i32> %v0, %v2
66 store <4 x i32> %v1, ptr undef, align 8
72 define void @sextload_v2i8_v(ptr %v, ptr %p) nounwind {
73 ;CHECK-LABEL: sextload_v2i8_v:
75 %0 = load <2 x i8>, ptr %v, align 8
76 %v0 = sext <2 x i8> %0 to <2 x i64>
78 %1 = load <2 x i8>, ptr %p, align 8
79 %v2 = sext <2 x i8> %1 to <2 x i64>
81 %v1 = mul <2 x i64> %v0, %v2
82 store <2 x i64> %v1, ptr undef, align 8
88 define void @sextload_v2i16_v(ptr %v, ptr %p) nounwind {
89 ;CHECK-LABEL: sextload_v2i16_v:
91 %0 = load <2 x i16>, ptr %v, align 8
92 %v0 = sext <2 x i16> %0 to <2 x i64>
94 %1 = load <2 x i16>, ptr %p, align 8
95 %v2 = sext <2 x i16> %1 to <2 x i64>
97 %v1 = mul <2 x i64> %v0, %v2
98 store <2 x i64> %v1, ptr undef, align 8
103 ; Vector(small) x Vector(big)
106 define void @sextload_v4i8_vs(ptr %v, ptr %p) nounwind {
107 ;CHECK-LABEL: sextload_v4i8_vs:
109 %0 = load <4 x i8>, ptr %v, align 8
110 %v0 = sext <4 x i8> %0 to <4 x i32>
112 %1 = load <4 x i16>, ptr %p, align 8
113 %v2 = sext <4 x i16> %1 to <4 x i32>
115 %v1 = mul <4 x i32> %v0, %v2
116 store <4 x i32> %v1, ptr undef, align 8
122 define void @sextload_v2i8_vs(ptr %v, ptr %p) nounwind {
123 ;CHECK-LABEL: sextload_v2i8_vs:
125 %0 = load <2 x i8>, ptr %v, align 8
126 %v0 = sext <2 x i8> %0 to <2 x i64>
128 %1 = load <2 x i16>, ptr %p, align 8
129 %v2 = sext <2 x i16> %1 to <2 x i64>
131 %v1 = mul <2 x i64> %v0, %v2
132 store <2 x i64> %v1, ptr undef, align 8
138 define void @sextload_v2i16_vs(ptr %v, ptr %p) nounwind {
139 ;CHECK-LABEL: sextload_v2i16_vs:
141 %0 = load <2 x i16>, ptr %v, align 8
142 %v0 = sext <2 x i16> %0 to <2 x i64>
144 %1 = load <2 x i32>, ptr %p, align 8
145 %v2 = sext <2 x i32> %1 to <2 x i64>
147 %v1 = mul <2 x i64> %v0, %v2
148 store <2 x i64> %v1, ptr undef, align 8