1 ; NOTE: Assertions have been autogenerated by utils/update_test_checks.py
2 ; RUN: opt -S -mtriple=amdgcn-- -mcpu=tahiti -passes=amdgpu-codegenprepare %s | FileCheck -check-prefix=SI %s
3 ; RUN: opt -S -mtriple=amdgcn-- -mcpu=fiji -amdgpu-codegenprepare %s | FileCheck -check-prefix=VI %s
4 ; RUN: opt -S -mtriple=amdgcn-- -mcpu=fiji -amdgpu-codegenprepare-mul24=0 -amdgpu-codegenprepare %s | FileCheck -check-prefix=DISABLED %s
6 define i16 @mul_i16(i16 %lhs, i16 %rhs) {
8 ; SI-NEXT: [[TMP1:%.*]] = zext i16 [[LHS:%.*]] to i32
9 ; SI-NEXT: [[TMP2:%.*]] = zext i16 [[RHS:%.*]] to i32
10 ; SI-NEXT: [[TMP3:%.*]] = call i32 @llvm.amdgcn.mul.u24(i32 [[TMP1]], i32 [[TMP2]])
11 ; SI-NEXT: [[MUL:%.*]] = trunc i32 [[TMP3]] to i16
12 ; SI-NEXT: ret i16 [[MUL]]
15 ; VI-NEXT: [[MUL:%.*]] = mul i16 [[LHS:%.*]], [[RHS:%.*]]
16 ; VI-NEXT: ret i16 [[MUL]]
18 ; DISABLED-LABEL: @mul_i16(
19 ; DISABLED-NEXT: [[MUL:%.*]] = mul i16 [[LHS:%.*]], [[RHS:%.*]]
20 ; DISABLED-NEXT: ret i16 [[MUL]]
22 %mul = mul i16 %lhs, %rhs
26 define i32 @smul24_i32(i32 %lhs, i32 %rhs) {
27 ; SI-LABEL: @smul24_i32(
28 ; SI-NEXT: [[SHL_LHS:%.*]] = shl i32 [[LHS:%.*]], 8
29 ; SI-NEXT: [[LHS24:%.*]] = ashr i32 [[SHL_LHS]], 8
30 ; SI-NEXT: [[SHL_RHS:%.*]] = shl i32 [[RHS:%.*]], 8
31 ; SI-NEXT: [[RHS24:%.*]] = ashr i32 [[SHL_RHS]], 8
32 ; SI-NEXT: [[MUL:%.*]] = call i32 @llvm.amdgcn.mul.i24(i32 [[LHS24]], i32 [[RHS24]])
33 ; SI-NEXT: ret i32 [[MUL]]
35 ; VI-LABEL: @smul24_i32(
36 ; VI-NEXT: [[SHL_LHS:%.*]] = shl i32 [[LHS:%.*]], 8
37 ; VI-NEXT: [[LHS24:%.*]] = ashr i32 [[SHL_LHS]], 8
38 ; VI-NEXT: [[SHL_RHS:%.*]] = shl i32 [[RHS:%.*]], 8
39 ; VI-NEXT: [[RHS24:%.*]] = ashr i32 [[SHL_RHS]], 8
40 ; VI-NEXT: [[MUL:%.*]] = call i32 @llvm.amdgcn.mul.i24(i32 [[LHS24]], i32 [[RHS24]])
41 ; VI-NEXT: ret i32 [[MUL]]
43 ; DISABLED-LABEL: @smul24_i32(
44 ; DISABLED-NEXT: [[SHL_LHS:%.*]] = shl i32 [[LHS:%.*]], 8
45 ; DISABLED-NEXT: [[LHS24:%.*]] = ashr i32 [[SHL_LHS]], 8
46 ; DISABLED-NEXT: [[SHL_RHS:%.*]] = shl i32 [[RHS:%.*]], 8
47 ; DISABLED-NEXT: [[RHS24:%.*]] = ashr i32 [[SHL_RHS]], 8
48 ; DISABLED-NEXT: [[MUL:%.*]] = mul i32 [[LHS24]], [[RHS24]]
49 ; DISABLED-NEXT: ret i32 [[MUL]]
51 %shl.lhs = shl i32 %lhs, 8
52 %lhs24 = ashr i32 %shl.lhs, 8
53 %shl.rhs = shl i32 %rhs, 8
54 %rhs24 = ashr i32 %shl.rhs, 8
55 %mul = mul i32 %lhs24, %rhs24
59 define <2 x i8> @mul_v1i16(<1 x i16> %arg) {
60 ; SI-LABEL: @mul_v1i16(
62 ; SI-NEXT: [[TMP0:%.*]] = extractelement <1 x i16> [[ARG:%.*]], i64 0
63 ; SI-NEXT: [[TMP1:%.*]] = zext i16 [[TMP0]] to i32
64 ; SI-NEXT: [[TMP2:%.*]] = call i32 @llvm.amdgcn.mul.u24(i32 [[TMP1]], i32 42)
65 ; SI-NEXT: [[TMP3:%.*]] = trunc i32 [[TMP2]] to i16
66 ; SI-NEXT: [[MUL:%.*]] = insertelement <1 x i16> poison, i16 [[TMP3]], i64 0
67 ; SI-NEXT: [[CAST:%.*]] = bitcast <1 x i16> [[MUL]] to <2 x i8>
68 ; SI-NEXT: ret <2 x i8> [[CAST]]
70 ; VI-LABEL: @mul_v1i16(
72 ; VI-NEXT: [[MUL:%.*]] = mul <1 x i16> [[ARG:%.*]], <i16 42>
73 ; VI-NEXT: [[CAST:%.*]] = bitcast <1 x i16> [[MUL]] to <2 x i8>
74 ; VI-NEXT: ret <2 x i8> [[CAST]]
76 ; DISABLED-LABEL: @mul_v1i16(
78 ; DISABLED-NEXT: [[MUL:%.*]] = mul <1 x i16> [[ARG:%.*]], <i16 42>
79 ; DISABLED-NEXT: [[CAST:%.*]] = bitcast <1 x i16> [[MUL]] to <2 x i8>
80 ; DISABLED-NEXT: ret <2 x i8> [[CAST]]
83 %mul = mul <1 x i16> %arg, <i16 42>
84 %cast = bitcast <1 x i16> %mul to <2 x i8>
88 define <1 x i8> @mul_v1i8(<1 x i8> %arg) {
89 ; SI-LABEL: @mul_v1i8(
91 ; SI-NEXT: [[TMP0:%.*]] = extractelement <1 x i8> [[ARG:%.*]], i64 0
92 ; SI-NEXT: [[TMP1:%.*]] = zext i8 [[TMP0]] to i32
93 ; SI-NEXT: [[TMP2:%.*]] = call i32 @llvm.amdgcn.mul.u24(i32 [[TMP1]], i32 42)
94 ; SI-NEXT: [[TMP3:%.*]] = trunc i32 [[TMP2]] to i8
95 ; SI-NEXT: [[MUL:%.*]] = insertelement <1 x i8> poison, i8 [[TMP3]], i64 0
96 ; SI-NEXT: ret <1 x i8> [[MUL]]
98 ; VI-LABEL: @mul_v1i8(
100 ; VI-NEXT: [[MUL:%.*]] = mul <1 x i8> [[ARG:%.*]], <i8 42>
101 ; VI-NEXT: ret <1 x i8> [[MUL]]
103 ; DISABLED-LABEL: @mul_v1i8(
105 ; DISABLED-NEXT: [[MUL:%.*]] = mul <1 x i8> [[ARG:%.*]], <i8 42>
106 ; DISABLED-NEXT: ret <1 x i8> [[MUL]]
109 %mul = mul <1 x i8> %arg, <i8 42>
113 define <2 x i32> @smul24_v2i32(<2 x i32> %lhs, <2 x i32> %rhs) {
114 ; SI-LABEL: @smul24_v2i32(
115 ; SI-NEXT: [[SHL_LHS:%.*]] = shl <2 x i32> [[LHS:%.*]], <i32 8, i32 8>
116 ; SI-NEXT: [[LHS24:%.*]] = ashr <2 x i32> [[SHL_LHS]], <i32 8, i32 8>
117 ; SI-NEXT: [[SHL_RHS:%.*]] = shl <2 x i32> [[RHS:%.*]], <i32 8, i32 8>
118 ; SI-NEXT: [[RHS24:%.*]] = ashr <2 x i32> [[SHL_RHS]], <i32 8, i32 8>
119 ; SI-NEXT: [[TMP1:%.*]] = extractelement <2 x i32> [[LHS24]], i64 0
120 ; SI-NEXT: [[TMP2:%.*]] = extractelement <2 x i32> [[LHS24]], i64 1
121 ; SI-NEXT: [[TMP3:%.*]] = extractelement <2 x i32> [[RHS24]], i64 0
122 ; SI-NEXT: [[TMP4:%.*]] = extractelement <2 x i32> [[RHS24]], i64 1
123 ; SI-NEXT: [[TMP5:%.*]] = call i32 @llvm.amdgcn.mul.i24(i32 [[TMP1]], i32 [[TMP3]])
124 ; SI-NEXT: [[TMP6:%.*]] = call i32 @llvm.amdgcn.mul.i24(i32 [[TMP2]], i32 [[TMP4]])
125 ; SI-NEXT: [[TMP7:%.*]] = insertelement <2 x i32> poison, i32 [[TMP5]], i64 0
126 ; SI-NEXT: [[MUL:%.*]] = insertelement <2 x i32> [[TMP7]], i32 [[TMP6]], i64 1
127 ; SI-NEXT: ret <2 x i32> [[MUL]]
129 ; VI-LABEL: @smul24_v2i32(
130 ; VI-NEXT: [[SHL_LHS:%.*]] = shl <2 x i32> [[LHS:%.*]], <i32 8, i32 8>
131 ; VI-NEXT: [[LHS24:%.*]] = ashr <2 x i32> [[SHL_LHS]], <i32 8, i32 8>
132 ; VI-NEXT: [[SHL_RHS:%.*]] = shl <2 x i32> [[RHS:%.*]], <i32 8, i32 8>
133 ; VI-NEXT: [[RHS24:%.*]] = ashr <2 x i32> [[SHL_RHS]], <i32 8, i32 8>
134 ; VI-NEXT: [[TMP1:%.*]] = extractelement <2 x i32> [[LHS24]], i64 0
135 ; VI-NEXT: [[TMP2:%.*]] = extractelement <2 x i32> [[LHS24]], i64 1
136 ; VI-NEXT: [[TMP3:%.*]] = extractelement <2 x i32> [[RHS24]], i64 0
137 ; VI-NEXT: [[TMP4:%.*]] = extractelement <2 x i32> [[RHS24]], i64 1
138 ; VI-NEXT: [[TMP5:%.*]] = call i32 @llvm.amdgcn.mul.i24(i32 [[TMP1]], i32 [[TMP3]])
139 ; VI-NEXT: [[TMP6:%.*]] = call i32 @llvm.amdgcn.mul.i24(i32 [[TMP2]], i32 [[TMP4]])
140 ; VI-NEXT: [[TMP7:%.*]] = insertelement <2 x i32> poison, i32 [[TMP5]], i64 0
141 ; VI-NEXT: [[MUL:%.*]] = insertelement <2 x i32> [[TMP7]], i32 [[TMP6]], i64 1
142 ; VI-NEXT: ret <2 x i32> [[MUL]]
144 ; DISABLED-LABEL: @smul24_v2i32(
145 ; DISABLED-NEXT: [[SHL_LHS:%.*]] = shl <2 x i32> [[LHS:%.*]], <i32 8, i32 8>
146 ; DISABLED-NEXT: [[LHS24:%.*]] = ashr <2 x i32> [[SHL_LHS]], <i32 8, i32 8>
147 ; DISABLED-NEXT: [[SHL_RHS:%.*]] = shl <2 x i32> [[RHS:%.*]], <i32 8, i32 8>
148 ; DISABLED-NEXT: [[RHS24:%.*]] = ashr <2 x i32> [[SHL_RHS]], <i32 8, i32 8>
149 ; DISABLED-NEXT: [[MUL:%.*]] = mul <2 x i32> [[LHS24]], [[RHS24]]
150 ; DISABLED-NEXT: ret <2 x i32> [[MUL]]
152 %shl.lhs = shl <2 x i32> %lhs, <i32 8, i32 8>
153 %lhs24 = ashr <2 x i32> %shl.lhs, <i32 8, i32 8>
154 %shl.rhs = shl <2 x i32> %rhs, <i32 8, i32 8>
155 %rhs24 = ashr <2 x i32> %shl.rhs, <i32 8, i32 8>
156 %mul = mul <2 x i32> %lhs24, %rhs24
160 define i32 @umul24_i32(i32 %lhs, i32 %rhs) {
161 ; SI-LABEL: @umul24_i32(
162 ; SI-NEXT: [[LHS24:%.*]] = and i32 [[LHS:%.*]], 16777215
163 ; SI-NEXT: [[RHS24:%.*]] = and i32 [[RHS:%.*]], 16777215
164 ; SI-NEXT: [[MUL:%.*]] = call i32 @llvm.amdgcn.mul.u24(i32 [[LHS24]], i32 [[RHS24]])
165 ; SI-NEXT: ret i32 [[MUL]]
167 ; VI-LABEL: @umul24_i32(
168 ; VI-NEXT: [[LHS24:%.*]] = and i32 [[LHS:%.*]], 16777215
169 ; VI-NEXT: [[RHS24:%.*]] = and i32 [[RHS:%.*]], 16777215
170 ; VI-NEXT: [[MUL:%.*]] = call i32 @llvm.amdgcn.mul.u24(i32 [[LHS24]], i32 [[RHS24]])
171 ; VI-NEXT: ret i32 [[MUL]]
173 ; DISABLED-LABEL: @umul24_i32(
174 ; DISABLED-NEXT: [[LHS24:%.*]] = and i32 [[LHS:%.*]], 16777215
175 ; DISABLED-NEXT: [[RHS24:%.*]] = and i32 [[RHS:%.*]], 16777215
176 ; DISABLED-NEXT: [[MUL:%.*]] = mul i32 [[LHS24]], [[RHS24]]
177 ; DISABLED-NEXT: ret i32 [[MUL]]
179 %lhs24 = and i32 %lhs, 16777215
180 %rhs24 = and i32 %rhs, 16777215
181 %mul = mul i32 %lhs24, %rhs24
185 define <2 x i32> @umul24_v2i32(<2 x i32> %lhs, <2 x i32> %rhs) {
186 ; SI-LABEL: @umul24_v2i32(
187 ; SI-NEXT: [[LHS24:%.*]] = and <2 x i32> [[LHS:%.*]], <i32 16777215, i32 16777215>
188 ; SI-NEXT: [[RHS24:%.*]] = and <2 x i32> [[RHS:%.*]], <i32 16777215, i32 16777215>
189 ; SI-NEXT: [[TMP1:%.*]] = extractelement <2 x i32> [[LHS24]], i64 0
190 ; SI-NEXT: [[TMP2:%.*]] = extractelement <2 x i32> [[LHS24]], i64 1
191 ; SI-NEXT: [[TMP3:%.*]] = extractelement <2 x i32> [[RHS24]], i64 0
192 ; SI-NEXT: [[TMP4:%.*]] = extractelement <2 x i32> [[RHS24]], i64 1
193 ; SI-NEXT: [[TMP5:%.*]] = call i32 @llvm.amdgcn.mul.u24(i32 [[TMP1]], i32 [[TMP3]])
194 ; SI-NEXT: [[TMP6:%.*]] = call i32 @llvm.amdgcn.mul.u24(i32 [[TMP2]], i32 [[TMP4]])
195 ; SI-NEXT: [[TMP7:%.*]] = insertelement <2 x i32> poison, i32 [[TMP5]], i64 0
196 ; SI-NEXT: [[MUL:%.*]] = insertelement <2 x i32> [[TMP7]], i32 [[TMP6]], i64 1
197 ; SI-NEXT: ret <2 x i32> [[MUL]]
199 ; VI-LABEL: @umul24_v2i32(
200 ; VI-NEXT: [[LHS24:%.*]] = and <2 x i32> [[LHS:%.*]], <i32 16777215, i32 16777215>
201 ; VI-NEXT: [[RHS24:%.*]] = and <2 x i32> [[RHS:%.*]], <i32 16777215, i32 16777215>
202 ; VI-NEXT: [[TMP1:%.*]] = extractelement <2 x i32> [[LHS24]], i64 0
203 ; VI-NEXT: [[TMP2:%.*]] = extractelement <2 x i32> [[LHS24]], i64 1
204 ; VI-NEXT: [[TMP3:%.*]] = extractelement <2 x i32> [[RHS24]], i64 0
205 ; VI-NEXT: [[TMP4:%.*]] = extractelement <2 x i32> [[RHS24]], i64 1
206 ; VI-NEXT: [[TMP5:%.*]] = call i32 @llvm.amdgcn.mul.u24(i32 [[TMP1]], i32 [[TMP3]])
207 ; VI-NEXT: [[TMP6:%.*]] = call i32 @llvm.amdgcn.mul.u24(i32 [[TMP2]], i32 [[TMP4]])
208 ; VI-NEXT: [[TMP7:%.*]] = insertelement <2 x i32> poison, i32 [[TMP5]], i64 0
209 ; VI-NEXT: [[MUL:%.*]] = insertelement <2 x i32> [[TMP7]], i32 [[TMP6]], i64 1
210 ; VI-NEXT: ret <2 x i32> [[MUL]]
212 ; DISABLED-LABEL: @umul24_v2i32(
213 ; DISABLED-NEXT: [[LHS24:%.*]] = and <2 x i32> [[LHS:%.*]], <i32 16777215, i32 16777215>
214 ; DISABLED-NEXT: [[RHS24:%.*]] = and <2 x i32> [[RHS:%.*]], <i32 16777215, i32 16777215>
215 ; DISABLED-NEXT: [[MUL:%.*]] = mul <2 x i32> [[LHS24]], [[RHS24]]
216 ; DISABLED-NEXT: ret <2 x i32> [[MUL]]
218 %lhs24 = and <2 x i32> %lhs, <i32 16777215, i32 16777215>
219 %rhs24 = and <2 x i32> %rhs, <i32 16777215, i32 16777215>
220 %mul = mul <2 x i32> %lhs24, %rhs24
224 define i64 @smul24_i64(i64 %lhs, i64 %rhs) {
225 ; SI-LABEL: @smul24_i64(
226 ; SI-NEXT: [[SHL_LHS:%.*]] = shl i64 [[LHS:%.*]], 40
227 ; SI-NEXT: [[LHS24:%.*]] = ashr i64 [[SHL_LHS]], 40
228 ; SI-NEXT: [[SHL_RHS:%.*]] = shl i64 [[RHS:%.*]], 40
229 ; SI-NEXT: [[RHS24:%.*]] = ashr i64 [[SHL_RHS]], 40
230 ; SI-NEXT: [[TMP1:%.*]] = trunc i64 [[LHS24]] to i32
231 ; SI-NEXT: [[TMP2:%.*]] = trunc i64 [[RHS24]] to i32
232 ; SI-NEXT: [[TMP3:%.*]] = call i32 @llvm.amdgcn.mul.i24(i32 [[TMP1]], i32 [[TMP2]])
233 ; SI-NEXT: [[TMP4:%.*]] = call i32 @llvm.amdgcn.mulhi.i24(i32 [[TMP1]], i32 [[TMP2]])
234 ; SI-NEXT: [[TMP5:%.*]] = zext i32 [[TMP3]] to i64
235 ; SI-NEXT: [[TMP6:%.*]] = zext i32 [[TMP4]] to i64
236 ; SI-NEXT: [[TMP7:%.*]] = shl i64 [[TMP6]], 32
237 ; SI-NEXT: [[MUL:%.*]] = or i64 [[TMP5]], [[TMP7]]
238 ; SI-NEXT: ret i64 [[MUL]]
240 ; VI-LABEL: @smul24_i64(
241 ; VI-NEXT: [[SHL_LHS:%.*]] = shl i64 [[LHS:%.*]], 40
242 ; VI-NEXT: [[LHS24:%.*]] = ashr i64 [[SHL_LHS]], 40
243 ; VI-NEXT: [[SHL_RHS:%.*]] = shl i64 [[RHS:%.*]], 40
244 ; VI-NEXT: [[RHS24:%.*]] = ashr i64 [[SHL_RHS]], 40
245 ; VI-NEXT: [[TMP1:%.*]] = trunc i64 [[LHS24]] to i32
246 ; VI-NEXT: [[TMP2:%.*]] = trunc i64 [[RHS24]] to i32
247 ; VI-NEXT: [[TMP3:%.*]] = call i32 @llvm.amdgcn.mul.i24(i32 [[TMP1]], i32 [[TMP2]])
248 ; VI-NEXT: [[TMP4:%.*]] = call i32 @llvm.amdgcn.mulhi.i24(i32 [[TMP1]], i32 [[TMP2]])
249 ; VI-NEXT: [[TMP5:%.*]] = zext i32 [[TMP3]] to i64
250 ; VI-NEXT: [[TMP6:%.*]] = zext i32 [[TMP4]] to i64
251 ; VI-NEXT: [[TMP7:%.*]] = shl i64 [[TMP6]], 32
252 ; VI-NEXT: [[MUL:%.*]] = or i64 [[TMP5]], [[TMP7]]
253 ; VI-NEXT: ret i64 [[MUL]]
255 ; DISABLED-LABEL: @smul24_i64(
256 ; DISABLED-NEXT: [[SHL_LHS:%.*]] = shl i64 [[LHS:%.*]], 40
257 ; DISABLED-NEXT: [[LHS24:%.*]] = ashr i64 [[SHL_LHS]], 40
258 ; DISABLED-NEXT: [[SHL_RHS:%.*]] = shl i64 [[RHS:%.*]], 40
259 ; DISABLED-NEXT: [[RHS24:%.*]] = ashr i64 [[SHL_RHS]], 40
260 ; DISABLED-NEXT: [[MUL:%.*]] = mul i64 [[LHS24]], [[RHS24]]
261 ; DISABLED-NEXT: ret i64 [[MUL]]
263 %shl.lhs = shl i64 %lhs, 40
264 %lhs24 = ashr i64 %shl.lhs, 40
265 %shl.rhs = shl i64 %rhs, 40
266 %rhs24 = ashr i64 %shl.rhs, 40
267 %mul = mul i64 %lhs24, %rhs24
271 define i64 @smul24_i64_2(i64 %lhs, i64 %rhs) {
272 ; SI-LABEL: @smul24_i64_2(
273 ; SI-NEXT: [[SHL_LHS:%.*]] = shl i64 [[LHS:%.*]], 49
274 ; SI-NEXT: [[LHS24:%.*]] = ashr i64 [[SHL_LHS]], 49
275 ; SI-NEXT: [[SHL_RHS:%.*]] = shl i64 [[RHS:%.*]], 49
276 ; SI-NEXT: [[RHS24:%.*]] = ashr i64 [[SHL_RHS]], 49
277 ; SI-NEXT: [[TMP1:%.*]] = trunc i64 [[LHS24]] to i32
278 ; SI-NEXT: [[TMP2:%.*]] = trunc i64 [[RHS24]] to i32
279 ; SI-NEXT: [[TMP3:%.*]] = call i32 @llvm.amdgcn.mul.i24(i32 [[TMP1]], i32 [[TMP2]])
280 ; SI-NEXT: [[MUL:%.*]] = sext i32 [[TMP3]] to i64
281 ; SI-NEXT: ret i64 [[MUL]]
283 ; VI-LABEL: @smul24_i64_2(
284 ; VI-NEXT: [[SHL_LHS:%.*]] = shl i64 [[LHS:%.*]], 49
285 ; VI-NEXT: [[LHS24:%.*]] = ashr i64 [[SHL_LHS]], 49
286 ; VI-NEXT: [[SHL_RHS:%.*]] = shl i64 [[RHS:%.*]], 49
287 ; VI-NEXT: [[RHS24:%.*]] = ashr i64 [[SHL_RHS]], 49
288 ; VI-NEXT: [[TMP1:%.*]] = trunc i64 [[LHS24]] to i32
289 ; VI-NEXT: [[TMP2:%.*]] = trunc i64 [[RHS24]] to i32
290 ; VI-NEXT: [[TMP3:%.*]] = call i32 @llvm.amdgcn.mul.i24(i32 [[TMP1]], i32 [[TMP2]])
291 ; VI-NEXT: [[MUL:%.*]] = sext i32 [[TMP3]] to i64
292 ; VI-NEXT: ret i64 [[MUL]]
294 ; DISABLED-LABEL: @smul24_i64_2(
295 ; DISABLED-NEXT: [[SHL_LHS:%.*]] = shl i64 [[LHS:%.*]], 49
296 ; DISABLED-NEXT: [[LHS24:%.*]] = ashr i64 [[SHL_LHS]], 49
297 ; DISABLED-NEXT: [[SHL_RHS:%.*]] = shl i64 [[RHS:%.*]], 49
298 ; DISABLED-NEXT: [[RHS24:%.*]] = ashr i64 [[SHL_RHS]], 49
299 ; DISABLED-NEXT: [[MUL:%.*]] = mul i64 [[LHS24]], [[RHS24]]
300 ; DISABLED-NEXT: ret i64 [[MUL]]
302 %shl.lhs = shl i64 %lhs, 49
303 %lhs24 = ashr i64 %shl.lhs, 49
304 %shl.rhs = shl i64 %rhs, 49
305 %rhs24 = ashr i64 %shl.rhs, 49
306 %mul = mul i64 %lhs24, %rhs24
310 define i64 @smul24_i64_3(i64 %lhs, i64 %rhs) {
311 ; SI-LABEL: @smul24_i64_3(
312 ; SI-NEXT: [[LHS_TRUNC:%.*]] = trunc i64 [[LHS:%.*]] to i16
313 ; SI-NEXT: [[LHS24:%.*]] = sext i16 [[LHS_TRUNC]] to i64
314 ; SI-NEXT: [[RHS_TRUNC:%.*]] = trunc i64 [[RHS:%.*]] to i17
315 ; SI-NEXT: [[RHS24:%.*]] = sext i17 [[RHS_TRUNC]] to i64
316 ; SI-NEXT: [[TMP1:%.*]] = trunc i64 [[LHS24]] to i32
317 ; SI-NEXT: [[TMP2:%.*]] = trunc i64 [[RHS24]] to i32
318 ; SI-NEXT: [[TMP3:%.*]] = call i32 @llvm.amdgcn.mul.i24(i32 [[TMP1]], i32 [[TMP2]])
319 ; SI-NEXT: [[TMP4:%.*]] = call i32 @llvm.amdgcn.mulhi.i24(i32 [[TMP1]], i32 [[TMP2]])
320 ; SI-NEXT: [[TMP5:%.*]] = zext i32 [[TMP3]] to i64
321 ; SI-NEXT: [[TMP6:%.*]] = zext i32 [[TMP4]] to i64
322 ; SI-NEXT: [[TMP7:%.*]] = shl i64 [[TMP6]], 32
323 ; SI-NEXT: [[MUL:%.*]] = or i64 [[TMP5]], [[TMP7]]
324 ; SI-NEXT: ret i64 [[MUL]]
326 ; VI-LABEL: @smul24_i64_3(
327 ; VI-NEXT: [[LHS_TRUNC:%.*]] = trunc i64 [[LHS:%.*]] to i16
328 ; VI-NEXT: [[LHS24:%.*]] = sext i16 [[LHS_TRUNC]] to i64
329 ; VI-NEXT: [[RHS_TRUNC:%.*]] = trunc i64 [[RHS:%.*]] to i17
330 ; VI-NEXT: [[RHS24:%.*]] = sext i17 [[RHS_TRUNC]] to i64
331 ; VI-NEXT: [[TMP1:%.*]] = trunc i64 [[LHS24]] to i32
332 ; VI-NEXT: [[TMP2:%.*]] = trunc i64 [[RHS24]] to i32
333 ; VI-NEXT: [[TMP3:%.*]] = call i32 @llvm.amdgcn.mul.i24(i32 [[TMP1]], i32 [[TMP2]])
334 ; VI-NEXT: [[TMP4:%.*]] = call i32 @llvm.amdgcn.mulhi.i24(i32 [[TMP1]], i32 [[TMP2]])
335 ; VI-NEXT: [[TMP5:%.*]] = zext i32 [[TMP3]] to i64
336 ; VI-NEXT: [[TMP6:%.*]] = zext i32 [[TMP4]] to i64
337 ; VI-NEXT: [[TMP7:%.*]] = shl i64 [[TMP6]], 32
338 ; VI-NEXT: [[MUL:%.*]] = or i64 [[TMP5]], [[TMP7]]
339 ; VI-NEXT: ret i64 [[MUL]]
341 ; DISABLED-LABEL: @smul24_i64_3(
342 ; DISABLED-NEXT: [[LHS_TRUNC:%.*]] = trunc i64 [[LHS:%.*]] to i16
343 ; DISABLED-NEXT: [[LHS24:%.*]] = sext i16 [[LHS_TRUNC]] to i64
344 ; DISABLED-NEXT: [[RHS_TRUNC:%.*]] = trunc i64 [[RHS:%.*]] to i17
345 ; DISABLED-NEXT: [[RHS24:%.*]] = sext i17 [[RHS_TRUNC]] to i64
346 ; DISABLED-NEXT: [[MUL:%.*]] = mul i64 [[LHS24]], [[RHS24]]
347 ; DISABLED-NEXT: ret i64 [[MUL]]
349 %lhs.trunc = trunc i64 %lhs to i16
350 %lhs24 = sext i16 %lhs.trunc to i64
351 %rhs.trunc = trunc i64 %rhs to i17
352 %rhs24 = sext i17 %rhs.trunc to i64
353 %mul = mul i64 %lhs24, %rhs24
357 define i64 @smul24_i64_4(i64 %lhs, i64 %rhs) {
358 ; SI-LABEL: @smul24_i64_4(
359 ; SI-NEXT: [[LHS_TRUNC:%.*]] = trunc i64 [[LHS:%.*]] to i24
360 ; SI-NEXT: [[LHS24:%.*]] = sext i24 [[LHS_TRUNC]] to i64
361 ; SI-NEXT: [[RHS_TRUNC:%.*]] = trunc i64 [[RHS:%.*]] to i25
362 ; SI-NEXT: [[RHS24:%.*]] = sext i25 [[RHS_TRUNC]] to i64
363 ; SI-NEXT: [[MUL:%.*]] = mul i64 [[LHS24]], [[RHS24]]
364 ; SI-NEXT: ret i64 [[MUL]]
366 ; VI-LABEL: @smul24_i64_4(
367 ; VI-NEXT: [[LHS_TRUNC:%.*]] = trunc i64 [[LHS:%.*]] to i24
368 ; VI-NEXT: [[LHS24:%.*]] = sext i24 [[LHS_TRUNC]] to i64
369 ; VI-NEXT: [[RHS_TRUNC:%.*]] = trunc i64 [[RHS:%.*]] to i25
370 ; VI-NEXT: [[RHS24:%.*]] = sext i25 [[RHS_TRUNC]] to i64
371 ; VI-NEXT: [[MUL:%.*]] = mul i64 [[LHS24]], [[RHS24]]
372 ; VI-NEXT: ret i64 [[MUL]]
374 ; DISABLED-LABEL: @smul24_i64_4(
375 ; DISABLED-NEXT: [[LHS_TRUNC:%.*]] = trunc i64 [[LHS:%.*]] to i24
376 ; DISABLED-NEXT: [[LHS24:%.*]] = sext i24 [[LHS_TRUNC]] to i64
377 ; DISABLED-NEXT: [[RHS_TRUNC:%.*]] = trunc i64 [[RHS:%.*]] to i25
378 ; DISABLED-NEXT: [[RHS24:%.*]] = sext i25 [[RHS_TRUNC]] to i64
379 ; DISABLED-NEXT: [[MUL:%.*]] = mul i64 [[LHS24]], [[RHS24]]
380 ; DISABLED-NEXT: ret i64 [[MUL]]
382 %lhs.trunc = trunc i64 %lhs to i24
383 %lhs24 = sext i24 %lhs.trunc to i64
384 %rhs.trunc = trunc i64 %rhs to i25
385 %rhs24 = sext i25 %rhs.trunc to i64
386 %mul = mul i64 %lhs24, %rhs24
390 define i64 @umul24_i64(i64 %lhs, i64 %rhs) {
391 ; SI-LABEL: @umul24_i64(
392 ; SI-NEXT: [[LHS24:%.*]] = and i64 [[LHS:%.*]], 16777215
393 ; SI-NEXT: [[RHS24:%.*]] = and i64 [[RHS:%.*]], 16777215
394 ; SI-NEXT: [[TMP1:%.*]] = trunc i64 [[LHS24]] to i32
395 ; SI-NEXT: [[TMP2:%.*]] = trunc i64 [[RHS24]] to i32
396 ; SI-NEXT: [[TMP3:%.*]] = call i32 @llvm.amdgcn.mul.u24(i32 [[TMP1]], i32 [[TMP2]])
397 ; SI-NEXT: [[TMP4:%.*]] = call i32 @llvm.amdgcn.mulhi.u24(i32 [[TMP1]], i32 [[TMP2]])
398 ; SI-NEXT: [[TMP5:%.*]] = zext i32 [[TMP3]] to i64
399 ; SI-NEXT: [[TMP6:%.*]] = zext i32 [[TMP4]] to i64
400 ; SI-NEXT: [[TMP7:%.*]] = shl i64 [[TMP6]], 32
401 ; SI-NEXT: [[MUL:%.*]] = or i64 [[TMP5]], [[TMP7]]
402 ; SI-NEXT: ret i64 [[MUL]]
404 ; VI-LABEL: @umul24_i64(
405 ; VI-NEXT: [[LHS24:%.*]] = and i64 [[LHS:%.*]], 16777215
406 ; VI-NEXT: [[RHS24:%.*]] = and i64 [[RHS:%.*]], 16777215
407 ; VI-NEXT: [[TMP1:%.*]] = trunc i64 [[LHS24]] to i32
408 ; VI-NEXT: [[TMP2:%.*]] = trunc i64 [[RHS24]] to i32
409 ; VI-NEXT: [[TMP3:%.*]] = call i32 @llvm.amdgcn.mul.u24(i32 [[TMP1]], i32 [[TMP2]])
410 ; VI-NEXT: [[TMP4:%.*]] = call i32 @llvm.amdgcn.mulhi.u24(i32 [[TMP1]], i32 [[TMP2]])
411 ; VI-NEXT: [[TMP5:%.*]] = zext i32 [[TMP3]] to i64
412 ; VI-NEXT: [[TMP6:%.*]] = zext i32 [[TMP4]] to i64
413 ; VI-NEXT: [[TMP7:%.*]] = shl i64 [[TMP6]], 32
414 ; VI-NEXT: [[MUL:%.*]] = or i64 [[TMP5]], [[TMP7]]
415 ; VI-NEXT: ret i64 [[MUL]]
417 ; DISABLED-LABEL: @umul24_i64(
418 ; DISABLED-NEXT: [[LHS24:%.*]] = and i64 [[LHS:%.*]], 16777215
419 ; DISABLED-NEXT: [[RHS24:%.*]] = and i64 [[RHS:%.*]], 16777215
420 ; DISABLED-NEXT: [[MUL:%.*]] = mul i64 [[LHS24]], [[RHS24]]
421 ; DISABLED-NEXT: ret i64 [[MUL]]
423 %lhs24 = and i64 %lhs, 16777215
424 %rhs24 = and i64 %rhs, 16777215
425 %mul = mul i64 %lhs24, %rhs24
429 define i64 @umul24_i64_2(i64 %lhs, i64 %rhs) {
430 ; SI-LABEL: @umul24_i64_2(
431 ; SI-NEXT: [[LHS24:%.*]] = and i64 [[LHS:%.*]], 65535
432 ; SI-NEXT: [[RHS24:%.*]] = and i64 [[RHS:%.*]], 65535
433 ; SI-NEXT: [[TMP1:%.*]] = trunc i64 [[LHS24]] to i32
434 ; SI-NEXT: [[TMP2:%.*]] = trunc i64 [[RHS24]] to i32
435 ; SI-NEXT: [[TMP3:%.*]] = call i32 @llvm.amdgcn.mul.u24(i32 [[TMP1]], i32 [[TMP2]])
436 ; SI-NEXT: [[MUL:%.*]] = zext i32 [[TMP3]] to i64
437 ; SI-NEXT: ret i64 [[MUL]]
439 ; VI-LABEL: @umul24_i64_2(
440 ; VI-NEXT: [[LHS24:%.*]] = and i64 [[LHS:%.*]], 65535
441 ; VI-NEXT: [[RHS24:%.*]] = and i64 [[RHS:%.*]], 65535
442 ; VI-NEXT: [[TMP1:%.*]] = trunc i64 [[LHS24]] to i32
443 ; VI-NEXT: [[TMP2:%.*]] = trunc i64 [[RHS24]] to i32
444 ; VI-NEXT: [[TMP3:%.*]] = call i32 @llvm.amdgcn.mul.u24(i32 [[TMP1]], i32 [[TMP2]])
445 ; VI-NEXT: [[MUL:%.*]] = zext i32 [[TMP3]] to i64
446 ; VI-NEXT: ret i64 [[MUL]]
448 ; DISABLED-LABEL: @umul24_i64_2(
449 ; DISABLED-NEXT: [[LHS24:%.*]] = and i64 [[LHS:%.*]], 65535
450 ; DISABLED-NEXT: [[RHS24:%.*]] = and i64 [[RHS:%.*]], 65535
451 ; DISABLED-NEXT: [[MUL:%.*]] = mul i64 [[LHS24]], [[RHS24]]
452 ; DISABLED-NEXT: ret i64 [[MUL]]
454 %lhs24 = and i64 %lhs, 65535
455 %rhs24 = and i64 %rhs, 65535
456 %mul = mul i64 %lhs24, %rhs24
460 define i31 @smul24_i31(i31 %lhs, i31 %rhs) {
461 ; SI-LABEL: @smul24_i31(
462 ; SI-NEXT: [[SHL_LHS:%.*]] = shl i31 [[LHS:%.*]], 7
463 ; SI-NEXT: [[LHS24:%.*]] = ashr i31 [[SHL_LHS]], 7
464 ; SI-NEXT: [[SHL_RHS:%.*]] = shl i31 [[RHS:%.*]], 7
465 ; SI-NEXT: [[RHS24:%.*]] = ashr i31 [[SHL_RHS]], 7
466 ; SI-NEXT: [[TMP1:%.*]] = sext i31 [[LHS24]] to i32
467 ; SI-NEXT: [[TMP2:%.*]] = sext i31 [[RHS24]] to i32
468 ; SI-NEXT: [[TMP3:%.*]] = call i32 @llvm.amdgcn.mul.i24(i32 [[TMP1]], i32 [[TMP2]])
469 ; SI-NEXT: [[MUL:%.*]] = trunc i32 [[TMP3]] to i31
470 ; SI-NEXT: ret i31 [[MUL]]
472 ; VI-LABEL: @smul24_i31(
473 ; VI-NEXT: [[SHL_LHS:%.*]] = shl i31 [[LHS:%.*]], 7
474 ; VI-NEXT: [[LHS24:%.*]] = ashr i31 [[SHL_LHS]], 7
475 ; VI-NEXT: [[SHL_RHS:%.*]] = shl i31 [[RHS:%.*]], 7
476 ; VI-NEXT: [[RHS24:%.*]] = ashr i31 [[SHL_RHS]], 7
477 ; VI-NEXT: [[TMP1:%.*]] = sext i31 [[LHS24]] to i32
478 ; VI-NEXT: [[TMP2:%.*]] = sext i31 [[RHS24]] to i32
479 ; VI-NEXT: [[TMP3:%.*]] = call i32 @llvm.amdgcn.mul.i24(i32 [[TMP1]], i32 [[TMP2]])
480 ; VI-NEXT: [[MUL:%.*]] = trunc i32 [[TMP3]] to i31
481 ; VI-NEXT: ret i31 [[MUL]]
483 ; DISABLED-LABEL: @smul24_i31(
484 ; DISABLED-NEXT: [[SHL_LHS:%.*]] = shl i31 [[LHS:%.*]], 7
485 ; DISABLED-NEXT: [[LHS24:%.*]] = ashr i31 [[SHL_LHS]], 7
486 ; DISABLED-NEXT: [[SHL_RHS:%.*]] = shl i31 [[RHS:%.*]], 7
487 ; DISABLED-NEXT: [[RHS24:%.*]] = ashr i31 [[SHL_RHS]], 7
488 ; DISABLED-NEXT: [[MUL:%.*]] = mul i31 [[LHS24]], [[RHS24]]
489 ; DISABLED-NEXT: ret i31 [[MUL]]
491 %shl.lhs = shl i31 %lhs, 7
492 %lhs24 = ashr i31 %shl.lhs, 7
493 %shl.rhs = shl i31 %rhs, 7
494 %rhs24 = ashr i31 %shl.rhs, 7
495 %mul = mul i31 %lhs24, %rhs24
499 define i31 @umul24_i31(i31 %lhs, i31 %rhs) {
500 ; SI-LABEL: @umul24_i31(
501 ; SI-NEXT: [[LHS24:%.*]] = and i31 [[LHS:%.*]], 16777215
502 ; SI-NEXT: [[RHS24:%.*]] = and i31 [[RHS:%.*]], 16777215
503 ; SI-NEXT: [[TMP1:%.*]] = zext i31 [[LHS24]] to i32
504 ; SI-NEXT: [[TMP2:%.*]] = zext i31 [[RHS24]] to i32
505 ; SI-NEXT: [[TMP3:%.*]] = call i32 @llvm.amdgcn.mul.u24(i32 [[TMP1]], i32 [[TMP2]])
506 ; SI-NEXT: [[MUL:%.*]] = trunc i32 [[TMP3]] to i31
507 ; SI-NEXT: ret i31 [[MUL]]
509 ; VI-LABEL: @umul24_i31(
510 ; VI-NEXT: [[LHS24:%.*]] = and i31 [[LHS:%.*]], 16777215
511 ; VI-NEXT: [[RHS24:%.*]] = and i31 [[RHS:%.*]], 16777215
512 ; VI-NEXT: [[TMP1:%.*]] = zext i31 [[LHS24]] to i32
513 ; VI-NEXT: [[TMP2:%.*]] = zext i31 [[RHS24]] to i32
514 ; VI-NEXT: [[TMP3:%.*]] = call i32 @llvm.amdgcn.mul.u24(i32 [[TMP1]], i32 [[TMP2]])
515 ; VI-NEXT: [[MUL:%.*]] = trunc i32 [[TMP3]] to i31
516 ; VI-NEXT: ret i31 [[MUL]]
518 ; DISABLED-LABEL: @umul24_i31(
519 ; DISABLED-NEXT: [[LHS24:%.*]] = and i31 [[LHS:%.*]], 16777215
520 ; DISABLED-NEXT: [[RHS24:%.*]] = and i31 [[RHS:%.*]], 16777215
521 ; DISABLED-NEXT: [[MUL:%.*]] = mul i31 [[LHS24]], [[RHS24]]
522 ; DISABLED-NEXT: ret i31 [[MUL]]
524 %lhs24 = and i31 %lhs, 16777215
525 %rhs24 = and i31 %rhs, 16777215
526 %mul = mul i31 %lhs24, %rhs24
530 define <2 x i31> @umul24_v2i31(<2 x i31> %lhs, <2 x i31> %rhs) {
531 ; SI-LABEL: @umul24_v2i31(
532 ; SI-NEXT: [[LHS24:%.*]] = and <2 x i31> [[LHS:%.*]], <i31 16777215, i31 16777215>
533 ; SI-NEXT: [[RHS24:%.*]] = and <2 x i31> [[RHS:%.*]], <i31 16777215, i31 16777215>
534 ; SI-NEXT: [[TMP1:%.*]] = extractelement <2 x i31> [[LHS24]], i64 0
535 ; SI-NEXT: [[TMP2:%.*]] = extractelement <2 x i31> [[LHS24]], i64 1
536 ; SI-NEXT: [[TMP3:%.*]] = extractelement <2 x i31> [[RHS24]], i64 0
537 ; SI-NEXT: [[TMP4:%.*]] = extractelement <2 x i31> [[RHS24]], i64 1
538 ; SI-NEXT: [[TMP5:%.*]] = zext i31 [[TMP1]] to i32
539 ; SI-NEXT: [[TMP6:%.*]] = zext i31 [[TMP3]] to i32
540 ; SI-NEXT: [[TMP7:%.*]] = call i32 @llvm.amdgcn.mul.u24(i32 [[TMP5]], i32 [[TMP6]])
541 ; SI-NEXT: [[TMP8:%.*]] = trunc i32 [[TMP7]] to i31
542 ; SI-NEXT: [[TMP9:%.*]] = zext i31 [[TMP2]] to i32
543 ; SI-NEXT: [[TMP10:%.*]] = zext i31 [[TMP4]] to i32
544 ; SI-NEXT: [[TMP11:%.*]] = call i32 @llvm.amdgcn.mul.u24(i32 [[TMP9]], i32 [[TMP10]])
545 ; SI-NEXT: [[TMP12:%.*]] = trunc i32 [[TMP11]] to i31
546 ; SI-NEXT: [[TMP13:%.*]] = insertelement <2 x i31> poison, i31 [[TMP8]], i64 0
547 ; SI-NEXT: [[MUL:%.*]] = insertelement <2 x i31> [[TMP13]], i31 [[TMP12]], i64 1
548 ; SI-NEXT: ret <2 x i31> [[MUL]]
550 ; VI-LABEL: @umul24_v2i31(
551 ; VI-NEXT: [[LHS24:%.*]] = and <2 x i31> [[LHS:%.*]], <i31 16777215, i31 16777215>
552 ; VI-NEXT: [[RHS24:%.*]] = and <2 x i31> [[RHS:%.*]], <i31 16777215, i31 16777215>
553 ; VI-NEXT: [[TMP1:%.*]] = extractelement <2 x i31> [[LHS24]], i64 0
554 ; VI-NEXT: [[TMP2:%.*]] = extractelement <2 x i31> [[LHS24]], i64 1
555 ; VI-NEXT: [[TMP3:%.*]] = extractelement <2 x i31> [[RHS24]], i64 0
556 ; VI-NEXT: [[TMP4:%.*]] = extractelement <2 x i31> [[RHS24]], i64 1
557 ; VI-NEXT: [[TMP5:%.*]] = zext i31 [[TMP1]] to i32
558 ; VI-NEXT: [[TMP6:%.*]] = zext i31 [[TMP3]] to i32
559 ; VI-NEXT: [[TMP7:%.*]] = call i32 @llvm.amdgcn.mul.u24(i32 [[TMP5]], i32 [[TMP6]])
560 ; VI-NEXT: [[TMP8:%.*]] = trunc i32 [[TMP7]] to i31
561 ; VI-NEXT: [[TMP9:%.*]] = zext i31 [[TMP2]] to i32
562 ; VI-NEXT: [[TMP10:%.*]] = zext i31 [[TMP4]] to i32
563 ; VI-NEXT: [[TMP11:%.*]] = call i32 @llvm.amdgcn.mul.u24(i32 [[TMP9]], i32 [[TMP10]])
564 ; VI-NEXT: [[TMP12:%.*]] = trunc i32 [[TMP11]] to i31
565 ; VI-NEXT: [[TMP13:%.*]] = insertelement <2 x i31> poison, i31 [[TMP8]], i64 0
566 ; VI-NEXT: [[MUL:%.*]] = insertelement <2 x i31> [[TMP13]], i31 [[TMP12]], i64 1
567 ; VI-NEXT: ret <2 x i31> [[MUL]]
569 ; DISABLED-LABEL: @umul24_v2i31(
570 ; DISABLED-NEXT: [[LHS24:%.*]] = and <2 x i31> [[LHS:%.*]], <i31 16777215, i31 16777215>
571 ; DISABLED-NEXT: [[RHS24:%.*]] = and <2 x i31> [[RHS:%.*]], <i31 16777215, i31 16777215>
572 ; DISABLED-NEXT: [[MUL:%.*]] = mul <2 x i31> [[LHS24]], [[RHS24]]
573 ; DISABLED-NEXT: ret <2 x i31> [[MUL]]
575 %lhs24 = and <2 x i31> %lhs, <i31 16777215, i31 16777215>
576 %rhs24 = and <2 x i31> %rhs, <i31 16777215, i31 16777215>
577 %mul = mul <2 x i31> %lhs24, %rhs24
581 define <2 x i31> @smul24_v2i31(<2 x i31> %lhs, <2 x i31> %rhs) {
582 ; SI-LABEL: @smul24_v2i31(
583 ; SI-NEXT: [[SHL_LHS:%.*]] = shl <2 x i31> [[LHS:%.*]], <i31 8, i31 8>
584 ; SI-NEXT: [[LHS24:%.*]] = ashr <2 x i31> [[SHL_LHS]], <i31 8, i31 8>
585 ; SI-NEXT: [[SHL_RHS:%.*]] = shl <2 x i31> [[RHS:%.*]], <i31 8, i31 8>
586 ; SI-NEXT: [[RHS24:%.*]] = ashr <2 x i31> [[SHL_RHS]], <i31 8, i31 8>
587 ; SI-NEXT: [[TMP1:%.*]] = extractelement <2 x i31> [[LHS24]], i64 0
588 ; SI-NEXT: [[TMP2:%.*]] = extractelement <2 x i31> [[LHS24]], i64 1
589 ; SI-NEXT: [[TMP3:%.*]] = extractelement <2 x i31> [[RHS24]], i64 0
590 ; SI-NEXT: [[TMP4:%.*]] = extractelement <2 x i31> [[RHS24]], i64 1
591 ; SI-NEXT: [[TMP5:%.*]] = sext i31 [[TMP1]] to i32
592 ; SI-NEXT: [[TMP6:%.*]] = sext i31 [[TMP3]] to i32
593 ; SI-NEXT: [[TMP7:%.*]] = call i32 @llvm.amdgcn.mul.i24(i32 [[TMP5]], i32 [[TMP6]])
594 ; SI-NEXT: [[TMP8:%.*]] = trunc i32 [[TMP7]] to i31
595 ; SI-NEXT: [[TMP9:%.*]] = sext i31 [[TMP2]] to i32
596 ; SI-NEXT: [[TMP10:%.*]] = sext i31 [[TMP4]] to i32
597 ; SI-NEXT: [[TMP11:%.*]] = call i32 @llvm.amdgcn.mul.i24(i32 [[TMP9]], i32 [[TMP10]])
598 ; SI-NEXT: [[TMP12:%.*]] = trunc i32 [[TMP11]] to i31
599 ; SI-NEXT: [[TMP13:%.*]] = insertelement <2 x i31> poison, i31 [[TMP8]], i64 0
600 ; SI-NEXT: [[MUL:%.*]] = insertelement <2 x i31> [[TMP13]], i31 [[TMP12]], i64 1
601 ; SI-NEXT: ret <2 x i31> [[MUL]]
603 ; VI-LABEL: @smul24_v2i31(
604 ; VI-NEXT: [[SHL_LHS:%.*]] = shl <2 x i31> [[LHS:%.*]], <i31 8, i31 8>
605 ; VI-NEXT: [[LHS24:%.*]] = ashr <2 x i31> [[SHL_LHS]], <i31 8, i31 8>
606 ; VI-NEXT: [[SHL_RHS:%.*]] = shl <2 x i31> [[RHS:%.*]], <i31 8, i31 8>
607 ; VI-NEXT: [[RHS24:%.*]] = ashr <2 x i31> [[SHL_RHS]], <i31 8, i31 8>
608 ; VI-NEXT: [[TMP1:%.*]] = extractelement <2 x i31> [[LHS24]], i64 0
609 ; VI-NEXT: [[TMP2:%.*]] = extractelement <2 x i31> [[LHS24]], i64 1
610 ; VI-NEXT: [[TMP3:%.*]] = extractelement <2 x i31> [[RHS24]], i64 0
611 ; VI-NEXT: [[TMP4:%.*]] = extractelement <2 x i31> [[RHS24]], i64 1
612 ; VI-NEXT: [[TMP5:%.*]] = sext i31 [[TMP1]] to i32
613 ; VI-NEXT: [[TMP6:%.*]] = sext i31 [[TMP3]] to i32
614 ; VI-NEXT: [[TMP7:%.*]] = call i32 @llvm.amdgcn.mul.i24(i32 [[TMP5]], i32 [[TMP6]])
615 ; VI-NEXT: [[TMP8:%.*]] = trunc i32 [[TMP7]] to i31
616 ; VI-NEXT: [[TMP9:%.*]] = sext i31 [[TMP2]] to i32
617 ; VI-NEXT: [[TMP10:%.*]] = sext i31 [[TMP4]] to i32
618 ; VI-NEXT: [[TMP11:%.*]] = call i32 @llvm.amdgcn.mul.i24(i32 [[TMP9]], i32 [[TMP10]])
619 ; VI-NEXT: [[TMP12:%.*]] = trunc i32 [[TMP11]] to i31
620 ; VI-NEXT: [[TMP13:%.*]] = insertelement <2 x i31> poison, i31 [[TMP8]], i64 0
621 ; VI-NEXT: [[MUL:%.*]] = insertelement <2 x i31> [[TMP13]], i31 [[TMP12]], i64 1
622 ; VI-NEXT: ret <2 x i31> [[MUL]]
624 ; DISABLED-LABEL: @smul24_v2i31(
625 ; DISABLED-NEXT: [[SHL_LHS:%.*]] = shl <2 x i31> [[LHS:%.*]], <i31 8, i31 8>
626 ; DISABLED-NEXT: [[LHS24:%.*]] = ashr <2 x i31> [[SHL_LHS]], <i31 8, i31 8>
627 ; DISABLED-NEXT: [[SHL_RHS:%.*]] = shl <2 x i31> [[RHS:%.*]], <i31 8, i31 8>
628 ; DISABLED-NEXT: [[RHS24:%.*]] = ashr <2 x i31> [[SHL_RHS]], <i31 8, i31 8>
629 ; DISABLED-NEXT: [[MUL:%.*]] = mul <2 x i31> [[LHS24]], [[RHS24]]
630 ; DISABLED-NEXT: ret <2 x i31> [[MUL]]
632 %shl.lhs = shl <2 x i31> %lhs, <i31 8, i31 8>
633 %lhs24 = ashr <2 x i31> %shl.lhs, <i31 8, i31 8>
634 %shl.rhs = shl <2 x i31> %rhs, <i31 8, i31 8>
635 %rhs24 = ashr <2 x i31> %shl.rhs, <i31 8, i31 8>
636 %mul = mul <2 x i31> %lhs24, %rhs24
640 define i33 @smul24_i33(i33 %lhs, i33 %rhs) {
641 ; SI-LABEL: @smul24_i33(
642 ; SI-NEXT: [[SHL_LHS:%.*]] = shl i33 [[LHS:%.*]], 9
643 ; SI-NEXT: [[LHS24:%.*]] = ashr i33 [[SHL_LHS]], 9
644 ; SI-NEXT: [[SHL_RHS:%.*]] = shl i33 [[RHS:%.*]], 9
645 ; SI-NEXT: [[RHS24:%.*]] = ashr i33 [[SHL_RHS]], 9
646 ; SI-NEXT: [[TMP1:%.*]] = trunc i33 [[LHS24]] to i32
647 ; SI-NEXT: [[TMP2:%.*]] = trunc i33 [[RHS24]] to i32
648 ; SI-NEXT: [[TMP3:%.*]] = call i32 @llvm.amdgcn.mul.i24(i32 [[TMP1]], i32 [[TMP2]])
649 ; SI-NEXT: [[TMP4:%.*]] = call i32 @llvm.amdgcn.mulhi.i24(i32 [[TMP1]], i32 [[TMP2]])
650 ; SI-NEXT: [[TMP5:%.*]] = zext i32 [[TMP3]] to i64
651 ; SI-NEXT: [[TMP6:%.*]] = zext i32 [[TMP4]] to i64
652 ; SI-NEXT: [[TMP7:%.*]] = shl i64 [[TMP6]], 32
653 ; SI-NEXT: [[TMP8:%.*]] = or i64 [[TMP5]], [[TMP7]]
654 ; SI-NEXT: [[MUL:%.*]] = trunc i64 [[TMP8]] to i33
655 ; SI-NEXT: ret i33 [[MUL]]
657 ; VI-LABEL: @smul24_i33(
658 ; VI-NEXT: [[SHL_LHS:%.*]] = shl i33 [[LHS:%.*]], 9
659 ; VI-NEXT: [[LHS24:%.*]] = ashr i33 [[SHL_LHS]], 9
660 ; VI-NEXT: [[SHL_RHS:%.*]] = shl i33 [[RHS:%.*]], 9
661 ; VI-NEXT: [[RHS24:%.*]] = ashr i33 [[SHL_RHS]], 9
662 ; VI-NEXT: [[TMP1:%.*]] = trunc i33 [[LHS24]] to i32
663 ; VI-NEXT: [[TMP2:%.*]] = trunc i33 [[RHS24]] to i32
664 ; VI-NEXT: [[TMP3:%.*]] = call i32 @llvm.amdgcn.mul.i24(i32 [[TMP1]], i32 [[TMP2]])
665 ; VI-NEXT: [[TMP4:%.*]] = call i32 @llvm.amdgcn.mulhi.i24(i32 [[TMP1]], i32 [[TMP2]])
666 ; VI-NEXT: [[TMP5:%.*]] = zext i32 [[TMP3]] to i64
667 ; VI-NEXT: [[TMP6:%.*]] = zext i32 [[TMP4]] to i64
668 ; VI-NEXT: [[TMP7:%.*]] = shl i64 [[TMP6]], 32
669 ; VI-NEXT: [[TMP8:%.*]] = or i64 [[TMP5]], [[TMP7]]
670 ; VI-NEXT: [[MUL:%.*]] = trunc i64 [[TMP8]] to i33
671 ; VI-NEXT: ret i33 [[MUL]]
673 ; DISABLED-LABEL: @smul24_i33(
674 ; DISABLED-NEXT: [[SHL_LHS:%.*]] = shl i33 [[LHS:%.*]], 9
675 ; DISABLED-NEXT: [[LHS24:%.*]] = ashr i33 [[SHL_LHS]], 9
676 ; DISABLED-NEXT: [[SHL_RHS:%.*]] = shl i33 [[RHS:%.*]], 9
677 ; DISABLED-NEXT: [[RHS24:%.*]] = ashr i33 [[SHL_RHS]], 9
678 ; DISABLED-NEXT: [[MUL:%.*]] = mul i33 [[LHS24]], [[RHS24]]
679 ; DISABLED-NEXT: ret i33 [[MUL]]
681 %shl.lhs = shl i33 %lhs, 9
682 %lhs24 = ashr i33 %shl.lhs, 9
683 %shl.rhs = shl i33 %rhs, 9
684 %rhs24 = ashr i33 %shl.rhs, 9
685 %mul = mul i33 %lhs24, %rhs24
689 define i33 @umul24_i33(i33 %lhs, i33 %rhs) {
690 ; SI-LABEL: @umul24_i33(
691 ; SI-NEXT: [[LHS24:%.*]] = and i33 [[LHS:%.*]], 16777215
692 ; SI-NEXT: [[RHS24:%.*]] = and i33 [[RHS:%.*]], 16777215
693 ; SI-NEXT: [[TMP1:%.*]] = trunc i33 [[LHS24]] to i32
694 ; SI-NEXT: [[TMP2:%.*]] = trunc i33 [[RHS24]] to i32
695 ; SI-NEXT: [[TMP3:%.*]] = call i32 @llvm.amdgcn.mul.u24(i32 [[TMP1]], i32 [[TMP2]])
696 ; SI-NEXT: [[TMP4:%.*]] = call i32 @llvm.amdgcn.mulhi.u24(i32 [[TMP1]], i32 [[TMP2]])
697 ; SI-NEXT: [[TMP5:%.*]] = zext i32 [[TMP3]] to i64
698 ; SI-NEXT: [[TMP6:%.*]] = zext i32 [[TMP4]] to i64
699 ; SI-NEXT: [[TMP7:%.*]] = shl i64 [[TMP6]], 32
700 ; SI-NEXT: [[TMP8:%.*]] = or i64 [[TMP5]], [[TMP7]]
701 ; SI-NEXT: [[MUL:%.*]] = trunc i64 [[TMP8]] to i33
702 ; SI-NEXT: ret i33 [[MUL]]
704 ; VI-LABEL: @umul24_i33(
705 ; VI-NEXT: [[LHS24:%.*]] = and i33 [[LHS:%.*]], 16777215
706 ; VI-NEXT: [[RHS24:%.*]] = and i33 [[RHS:%.*]], 16777215
707 ; VI-NEXT: [[TMP1:%.*]] = trunc i33 [[LHS24]] to i32
708 ; VI-NEXT: [[TMP2:%.*]] = trunc i33 [[RHS24]] to i32
709 ; VI-NEXT: [[TMP3:%.*]] = call i32 @llvm.amdgcn.mul.u24(i32 [[TMP1]], i32 [[TMP2]])
710 ; VI-NEXT: [[TMP4:%.*]] = call i32 @llvm.amdgcn.mulhi.u24(i32 [[TMP1]], i32 [[TMP2]])
711 ; VI-NEXT: [[TMP5:%.*]] = zext i32 [[TMP3]] to i64
712 ; VI-NEXT: [[TMP6:%.*]] = zext i32 [[TMP4]] to i64
713 ; VI-NEXT: [[TMP7:%.*]] = shl i64 [[TMP6]], 32
714 ; VI-NEXT: [[TMP8:%.*]] = or i64 [[TMP5]], [[TMP7]]
715 ; VI-NEXT: [[MUL:%.*]] = trunc i64 [[TMP8]] to i33
716 ; VI-NEXT: ret i33 [[MUL]]
718 ; DISABLED-LABEL: @umul24_i33(
719 ; DISABLED-NEXT: [[LHS24:%.*]] = and i33 [[LHS:%.*]], 16777215
720 ; DISABLED-NEXT: [[RHS24:%.*]] = and i33 [[RHS:%.*]], 16777215
721 ; DISABLED-NEXT: [[MUL:%.*]] = mul i33 [[LHS24]], [[RHS24]]
722 ; DISABLED-NEXT: ret i33 [[MUL]]
724 %lhs24 = and i33 %lhs, 16777215
725 %rhs24 = and i33 %rhs, 16777215
726 %mul = mul i33 %lhs24, %rhs24
730 define i32 @smul25_i32(i32 %lhs, i32 %rhs) {
731 ; SI-LABEL: @smul25_i32(
732 ; SI-NEXT: [[SHL_LHS:%.*]] = shl i32 [[LHS:%.*]], 7
733 ; SI-NEXT: [[LHS24:%.*]] = ashr i32 [[SHL_LHS]], 7
734 ; SI-NEXT: [[SHL_RHS:%.*]] = shl i32 [[RHS:%.*]], 7
735 ; SI-NEXT: [[RHS24:%.*]] = ashr i32 [[SHL_RHS]], 7
736 ; SI-NEXT: [[MUL:%.*]] = mul i32 [[LHS24]], [[RHS24]]
737 ; SI-NEXT: ret i32 [[MUL]]
739 ; VI-LABEL: @smul25_i32(
740 ; VI-NEXT: [[SHL_LHS:%.*]] = shl i32 [[LHS:%.*]], 7
741 ; VI-NEXT: [[LHS24:%.*]] = ashr i32 [[SHL_LHS]], 7
742 ; VI-NEXT: [[SHL_RHS:%.*]] = shl i32 [[RHS:%.*]], 7
743 ; VI-NEXT: [[RHS24:%.*]] = ashr i32 [[SHL_RHS]], 7
744 ; VI-NEXT: [[MUL:%.*]] = mul i32 [[LHS24]], [[RHS24]]
745 ; VI-NEXT: ret i32 [[MUL]]
747 ; DISABLED-LABEL: @smul25_i32(
748 ; DISABLED-NEXT: [[SHL_LHS:%.*]] = shl i32 [[LHS:%.*]], 7
749 ; DISABLED-NEXT: [[LHS24:%.*]] = ashr i32 [[SHL_LHS]], 7
750 ; DISABLED-NEXT: [[SHL_RHS:%.*]] = shl i32 [[RHS:%.*]], 7
751 ; DISABLED-NEXT: [[RHS24:%.*]] = ashr i32 [[SHL_RHS]], 7
752 ; DISABLED-NEXT: [[MUL:%.*]] = mul i32 [[LHS24]], [[RHS24]]
753 ; DISABLED-NEXT: ret i32 [[MUL]]
755 %shl.lhs = shl i32 %lhs, 7
756 %lhs24 = ashr i32 %shl.lhs, 7
757 %shl.rhs = shl i32 %rhs, 7
758 %rhs24 = ashr i32 %shl.rhs, 7
759 %mul = mul i32 %lhs24, %rhs24
763 define i32 @umul25_i32(i32 %lhs, i32 %rhs) {
764 ; SI-LABEL: @umul25_i32(
765 ; SI-NEXT: [[LHS24:%.*]] = and i32 [[LHS:%.*]], 33554431
766 ; SI-NEXT: [[RHS24:%.*]] = and i32 [[RHS:%.*]], 33554431
767 ; SI-NEXT: [[MUL:%.*]] = mul i32 [[LHS24]], [[RHS24]]
768 ; SI-NEXT: ret i32 [[MUL]]
770 ; VI-LABEL: @umul25_i32(
771 ; VI-NEXT: [[LHS24:%.*]] = and i32 [[LHS:%.*]], 33554431
772 ; VI-NEXT: [[RHS24:%.*]] = and i32 [[RHS:%.*]], 33554431
773 ; VI-NEXT: [[MUL:%.*]] = mul i32 [[LHS24]], [[RHS24]]
774 ; VI-NEXT: ret i32 [[MUL]]
776 ; DISABLED-LABEL: @umul25_i32(
777 ; DISABLED-NEXT: [[LHS24:%.*]] = and i32 [[LHS:%.*]], 33554431
778 ; DISABLED-NEXT: [[RHS24:%.*]] = and i32 [[RHS:%.*]], 33554431
779 ; DISABLED-NEXT: [[MUL:%.*]] = mul i32 [[LHS24]], [[RHS24]]
780 ; DISABLED-NEXT: ret i32 [[MUL]]
782 %lhs24 = and i32 %lhs, 33554431
783 %rhs24 = and i32 %rhs, 33554431
784 %mul = mul i32 %lhs24, %rhs24
788 define <2 x i33> @smul24_v2i33(<2 x i33> %lhs, <2 x i33> %rhs) {
789 ; SI-LABEL: @smul24_v2i33(
790 ; SI-NEXT: [[SHL_LHS:%.*]] = shl <2 x i33> [[LHS:%.*]], <i33 9, i33 9>
791 ; SI-NEXT: [[LHS24:%.*]] = ashr <2 x i33> [[SHL_LHS]], <i33 9, i33 9>
792 ; SI-NEXT: [[SHL_RHS:%.*]] = shl <2 x i33> [[RHS:%.*]], <i33 9, i33 9>
793 ; SI-NEXT: [[RHS24:%.*]] = ashr <2 x i33> [[SHL_RHS]], <i33 9, i33 9>
794 ; SI-NEXT: [[TMP1:%.*]] = extractelement <2 x i33> [[LHS24]], i64 0
795 ; SI-NEXT: [[TMP2:%.*]] = extractelement <2 x i33> [[LHS24]], i64 1
796 ; SI-NEXT: [[TMP3:%.*]] = extractelement <2 x i33> [[RHS24]], i64 0
797 ; SI-NEXT: [[TMP4:%.*]] = extractelement <2 x i33> [[RHS24]], i64 1
798 ; SI-NEXT: [[TMP5:%.*]] = trunc i33 [[TMP1]] to i32
799 ; SI-NEXT: [[TMP6:%.*]] = trunc i33 [[TMP3]] to i32
800 ; SI-NEXT: [[TMP7:%.*]] = call i32 @llvm.amdgcn.mul.i24(i32 [[TMP5]], i32 [[TMP6]])
801 ; SI-NEXT: [[TMP8:%.*]] = call i32 @llvm.amdgcn.mulhi.i24(i32 [[TMP5]], i32 [[TMP6]])
802 ; SI-NEXT: [[TMP9:%.*]] = zext i32 [[TMP7]] to i64
803 ; SI-NEXT: [[TMP10:%.*]] = zext i32 [[TMP8]] to i64
804 ; SI-NEXT: [[TMP11:%.*]] = shl i64 [[TMP10]], 32
805 ; SI-NEXT: [[TMP12:%.*]] = or i64 [[TMP9]], [[TMP11]]
806 ; SI-NEXT: [[TMP13:%.*]] = trunc i64 [[TMP12]] to i33
807 ; SI-NEXT: [[TMP14:%.*]] = trunc i33 [[TMP2]] to i32
808 ; SI-NEXT: [[TMP15:%.*]] = trunc i33 [[TMP4]] to i32
809 ; SI-NEXT: [[TMP16:%.*]] = call i32 @llvm.amdgcn.mul.i24(i32 [[TMP14]], i32 [[TMP15]])
810 ; SI-NEXT: [[TMP17:%.*]] = call i32 @llvm.amdgcn.mulhi.i24(i32 [[TMP14]], i32 [[TMP15]])
811 ; SI-NEXT: [[TMP18:%.*]] = zext i32 [[TMP16]] to i64
812 ; SI-NEXT: [[TMP19:%.*]] = zext i32 [[TMP17]] to i64
813 ; SI-NEXT: [[TMP20:%.*]] = shl i64 [[TMP19]], 32
814 ; SI-NEXT: [[TMP21:%.*]] = or i64 [[TMP18]], [[TMP20]]
815 ; SI-NEXT: [[TMP22:%.*]] = trunc i64 [[TMP21]] to i33
816 ; SI-NEXT: [[TMP23:%.*]] = insertelement <2 x i33> poison, i33 [[TMP13]], i64 0
817 ; SI-NEXT: [[MUL:%.*]] = insertelement <2 x i33> [[TMP23]], i33 [[TMP22]], i64 1
818 ; SI-NEXT: ret <2 x i33> [[MUL]]
820 ; VI-LABEL: @smul24_v2i33(
821 ; VI-NEXT: [[SHL_LHS:%.*]] = shl <2 x i33> [[LHS:%.*]], <i33 9, i33 9>
822 ; VI-NEXT: [[LHS24:%.*]] = ashr <2 x i33> [[SHL_LHS]], <i33 9, i33 9>
823 ; VI-NEXT: [[SHL_RHS:%.*]] = shl <2 x i33> [[RHS:%.*]], <i33 9, i33 9>
824 ; VI-NEXT: [[RHS24:%.*]] = ashr <2 x i33> [[SHL_RHS]], <i33 9, i33 9>
825 ; VI-NEXT: [[TMP1:%.*]] = extractelement <2 x i33> [[LHS24]], i64 0
826 ; VI-NEXT: [[TMP2:%.*]] = extractelement <2 x i33> [[LHS24]], i64 1
827 ; VI-NEXT: [[TMP3:%.*]] = extractelement <2 x i33> [[RHS24]], i64 0
828 ; VI-NEXT: [[TMP4:%.*]] = extractelement <2 x i33> [[RHS24]], i64 1
829 ; VI-NEXT: [[TMP5:%.*]] = trunc i33 [[TMP1]] to i32
830 ; VI-NEXT: [[TMP6:%.*]] = trunc i33 [[TMP3]] to i32
831 ; VI-NEXT: [[TMP7:%.*]] = call i32 @llvm.amdgcn.mul.i24(i32 [[TMP5]], i32 [[TMP6]])
832 ; VI-NEXT: [[TMP8:%.*]] = call i32 @llvm.amdgcn.mulhi.i24(i32 [[TMP5]], i32 [[TMP6]])
833 ; VI-NEXT: [[TMP9:%.*]] = zext i32 [[TMP7]] to i64
834 ; VI-NEXT: [[TMP10:%.*]] = zext i32 [[TMP8]] to i64
835 ; VI-NEXT: [[TMP11:%.*]] = shl i64 [[TMP10]], 32
836 ; VI-NEXT: [[TMP12:%.*]] = or i64 [[TMP9]], [[TMP11]]
837 ; VI-NEXT: [[TMP13:%.*]] = trunc i64 [[TMP12]] to i33
838 ; VI-NEXT: [[TMP14:%.*]] = trunc i33 [[TMP2]] to i32
839 ; VI-NEXT: [[TMP15:%.*]] = trunc i33 [[TMP4]] to i32
840 ; VI-NEXT: [[TMP16:%.*]] = call i32 @llvm.amdgcn.mul.i24(i32 [[TMP14]], i32 [[TMP15]])
841 ; VI-NEXT: [[TMP17:%.*]] = call i32 @llvm.amdgcn.mulhi.i24(i32 [[TMP14]], i32 [[TMP15]])
842 ; VI-NEXT: [[TMP18:%.*]] = zext i32 [[TMP16]] to i64
843 ; VI-NEXT: [[TMP19:%.*]] = zext i32 [[TMP17]] to i64
844 ; VI-NEXT: [[TMP20:%.*]] = shl i64 [[TMP19]], 32
845 ; VI-NEXT: [[TMP21:%.*]] = or i64 [[TMP18]], [[TMP20]]
846 ; VI-NEXT: [[TMP22:%.*]] = trunc i64 [[TMP21]] to i33
847 ; VI-NEXT: [[TMP23:%.*]] = insertelement <2 x i33> poison, i33 [[TMP13]], i64 0
848 ; VI-NEXT: [[MUL:%.*]] = insertelement <2 x i33> [[TMP23]], i33 [[TMP22]], i64 1
849 ; VI-NEXT: ret <2 x i33> [[MUL]]
851 ; DISABLED-LABEL: @smul24_v2i33(
852 ; DISABLED-NEXT: [[SHL_LHS:%.*]] = shl <2 x i33> [[LHS:%.*]], <i33 9, i33 9>
853 ; DISABLED-NEXT: [[LHS24:%.*]] = ashr <2 x i33> [[SHL_LHS]], <i33 9, i33 9>
854 ; DISABLED-NEXT: [[SHL_RHS:%.*]] = shl <2 x i33> [[RHS:%.*]], <i33 9, i33 9>
855 ; DISABLED-NEXT: [[RHS24:%.*]] = ashr <2 x i33> [[SHL_RHS]], <i33 9, i33 9>
856 ; DISABLED-NEXT: [[MUL:%.*]] = mul <2 x i33> [[LHS24]], [[RHS24]]
857 ; DISABLED-NEXT: ret <2 x i33> [[MUL]]
859 %shl.lhs = shl <2 x i33> %lhs, <i33 9, i33 9>
860 %lhs24 = ashr <2 x i33> %shl.lhs, <i33 9, i33 9>
861 %shl.rhs = shl <2 x i33> %rhs, <i33 9, i33 9>
862 %rhs24 = ashr <2 x i33> %shl.rhs, <i33 9, i33 9>
863 %mul = mul <2 x i33> %lhs24, %rhs24