1 ; RUN: llvm-dis < %s.bc | FileCheck %s
3 ; vmovls should be auto-upgraded to sext
6 ; CHECK-NOT: arm.neon.vmovls.v8i16
10 ; CHECK-NOT: arm.neon.vmovls.v4i32
11 ; CHECK: sext <4 x i16>
14 ; CHECK-NOT: arm.neon.vmovls.v2i64
15 ; CHECK: sext <2 x i32>
17 ; vmovlu should be auto-upgraded to zext
20 ; CHECK-NOT: arm.neon.vmovlu.v8i16
21 ; CHECK: zext <8 x i8>
24 ; CHECK-NOT: arm.neon.vmovlu.v4i32
25 ; CHECK: zext <4 x i16>
28 ; CHECK-NOT: arm.neon.vmovlu.v2i64
29 ; CHECK: zext <2 x i32>
31 ; vaddl/vaddw should be auto-upgraded to add with sext/zext
34 ; CHECK-NOT: arm.neon.vaddls.v4i32
35 ; CHECK: sext <4 x i16>
36 ; CHECK-NEXT: sext <4 x i16>
37 ; CHECK-NEXT: add <4 x i32>
40 ; CHECK-NOT: arm.neon.vaddlu.v2i64
41 ; CHECK: zext <2 x i32>
42 ; CHECK-NEXT: zext <2 x i32>
43 ; CHECK-NEXT: add <2 x i64>
46 ; CHECK-NOT: arm.neon.vaddws.v8i16
47 ; CHECK: sext <8 x i8>
48 ; CHECK-NEXT: add <8 x i16>
51 ; CHECK-NOT: arm.neon.vaddwu.v4i32
52 ; CHECK: zext <4 x i16>
53 ; CHECK-NEXT: add <4 x i32>
55 ; vsubl/vsubw should be auto-upgraded to subtract with sext/zext
58 ; CHECK-NOT: arm.neon.vsubls.v4i32
59 ; CHECK: sext <4 x i16>
60 ; CHECK-NEXT: sext <4 x i16>
61 ; CHECK-NEXT: sub <4 x i32>
64 ; CHECK-NOT: arm.neon.vsublu.v2i64
65 ; CHECK: zext <2 x i32>
66 ; CHECK-NEXT: zext <2 x i32>
67 ; CHECK-NEXT: sub <2 x i64>
70 ; CHECK-NOT: arm.neon.vsubws.v8i16
71 ; CHECK: sext <8 x i8>
72 ; CHECK-NEXT: sub <8 x i16>
75 ; CHECK-NOT: arm.neon.vsubwu.v4i32
76 ; CHECK: zext <4 x i16>
77 ; CHECK-NEXT: sub <4 x i32>
79 ; vmull should be auto-upgraded to multiply with sext/zext
80 ; (but vmullp should remain an intrinsic)
83 ; CHECK-NOT: arm.neon.vmulls.v8i16
84 ; CHECK: sext <8 x i8>
85 ; CHECK-NEXT: sext <8 x i8>
86 ; CHECK-NEXT: mul <8 x i16>
89 ; CHECK-NOT: arm.neon.vmullu.v4i32
90 ; CHECK: zext <4 x i16>
91 ; CHECK-NEXT: zext <4 x i16>
92 ; CHECK-NEXT: mul <4 x i32>
95 ; CHECK: arm.neon.vmullp.v8i16
97 ; vmlal should be auto-upgraded to multiply/add with sext/zext
100 ; CHECK-NOT: arm.neon.vmlals.v2i64
101 ; CHECK: sext <2 x i32>
102 ; CHECK-NEXT: sext <2 x i32>
103 ; CHECK-NEXT: mul <2 x i64>
104 ; CHECK-NEXT: add <2 x i64>
107 ; CHECK-NOT: arm.neon.vmlalu.v8i16
108 ; CHECK: zext <8 x i8>
109 ; CHECK-NEXT: zext <8 x i8>
110 ; CHECK-NEXT: mul <8 x i16>
111 ; CHECK-NEXT: add <8 x i16>
113 ; vmlsl should be auto-upgraded to multiply/sub with sext/zext
116 ; CHECK-NOT: arm.neon.vmlsls.v4i32
117 ; CHECK: sext <4 x i16>
118 ; CHECK-NEXT: sext <4 x i16>
119 ; CHECK-NEXT: mul <4 x i32>
120 ; CHECK-NEXT: sub <4 x i32>
123 ; CHECK-NOT: arm.neon.vmlslu.v2i64
124 ; CHECK: zext <2 x i32>
125 ; CHECK-NEXT: zext <2 x i32>
126 ; CHECK-NEXT: mul <2 x i64>
127 ; CHECK-NEXT: sub <2 x i64>
129 ; vaba should be auto-upgraded to vabd + add
132 ; CHECK-NOT: arm.neon.vabas.v2i32
133 ; CHECK: arm.neon.vabds.v2i32
134 ; CHECK-NEXT: add <2 x i32>
137 ; CHECK-NOT: arm.neon.vabau.v16i8
138 ; CHECK: arm.neon.vabdu.v16i8
139 ; CHECK-NEXT: add <16 x i8>
141 ; vabal should be auto-upgraded to vabd with zext + add
144 ; CHECK-NOT: arm.neon.vabals.v4i32
145 ; CHECK: arm.neon.vabds.v4i16
146 ; CHECK-NEXT: zext <4 x i16>
147 ; CHECK-NEXT: add <4 x i32>
150 ; CHECK-NOT: arm.neon.vabalu.v2i64
151 ; CHECK: arm.neon.vabdu.v2i32
152 ; CHECK-NEXT: zext <2 x i32>
153 ; CHECK-NEXT: add <2 x i64>
155 ; vabdl should be auto-upgraded to vabd with zext
158 ; CHECK-NOT: arm.neon.vabdls.v8i16
159 ; CHECK: arm.neon.vabds.v8i8
160 ; CHECK-NEXT: zext <8 x i8>
163 ; CHECK-NOT: arm.neon.vabdlu.v4i32
164 ; CHECK: arm.neon.vabdu.v4i16
165 ; CHECK-NEXT: zext <4 x i16>
167 ; vmovn should be auto-upgraded to trunc
170 ; CHECK-NOT: arm.neon.vmovn.v8i8
171 ; CHECK: trunc <8 x i16>
174 ; CHECK-NOT: arm.neon.vmovn.v4i16
175 ; CHECK: trunc <4 x i32>
178 ; CHECK-NOT: arm.neon.vmovn.v2i32
179 ; CHECK: trunc <2 x i64>
181 ; vld* and vst* intrinsic calls need an alignment argument (defaulted to 1)
201 ; CHECK: vld2laneQi16
208 ; CHECK: vst2laneQi16