@@ -5,6 +5,7 @@ target datalayout = "e-m:e-i8:8:32-i16:16:32-i64:64-i128:128-n32:64-S128"
5
5
6
6
define i32 @sdiv () {
7
7
; CHECK-LABEL: 'sdiv'
8
+ ; CHECK-NEXT: Cost Model: Found an estimated cost of 10 for instruction: %I128 = sdiv i128 undef, undef
8
9
; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %I64 = sdiv i64 undef, undef
9
10
; CHECK-NEXT: Cost Model: Found an estimated cost of 28 for instruction: %V2i64 = sdiv <2 x i64> undef, undef
10
11
; CHECK-NEXT: Cost Model: Found an estimated cost of 56 for instruction: %V4i64 = sdiv <4 x i64> undef, undef
@@ -23,6 +24,8 @@ define i32 @sdiv() {
23
24
; CHECK-NEXT: Cost Model: Found an estimated cost of 672 for instruction: %V64i8 = sdiv <64 x i8> undef, undef
24
25
; CHECK-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret i32 undef
25
26
;
27
+ %I128 = sdiv i128 undef , undef
28
+
26
29
%I64 = sdiv i64 undef , undef
27
30
%V2i64 = sdiv <2 x i64 > undef , undef
28
31
%V4i64 = sdiv <4 x i64 > undef , undef
@@ -48,6 +51,7 @@ define i32 @sdiv() {
48
51
49
52
define i32 @udiv () {
50
53
; CHECK-LABEL: 'udiv'
54
+ ; CHECK-NEXT: Cost Model: Found an estimated cost of 10 for instruction: %I128 = udiv i128 undef, undef
51
55
; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %I64 = udiv i64 undef, undef
52
56
; CHECK-NEXT: Cost Model: Found an estimated cost of 28 for instruction: %V2i64 = udiv <2 x i64> undef, undef
53
57
; CHECK-NEXT: Cost Model: Found an estimated cost of 56 for instruction: %V4i64 = udiv <4 x i64> undef, undef
@@ -66,6 +70,8 @@ define i32 @udiv() {
66
70
; CHECK-NEXT: Cost Model: Found an estimated cost of 672 for instruction: %V64i8 = udiv <64 x i8> undef, undef
67
71
; CHECK-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret i32 undef
68
72
;
73
+ %I128 = udiv i128 undef , undef
74
+
69
75
%I64 = udiv i64 undef , undef
70
76
%V2i64 = udiv <2 x i64 > undef , undef
71
77
%V4i64 = udiv <4 x i64 > undef , undef
@@ -91,6 +97,7 @@ define i32 @udiv() {
91
97
92
98
define i32 @sdiv_const () {
93
99
; CHECK-LABEL: 'sdiv_const'
100
+ ; CHECK-NEXT: Cost Model: Found an estimated cost of 10 for instruction: %I128 = sdiv i128 undef, 7
94
101
; CHECK-NEXT: Cost Model: Found an estimated cost of 7 for instruction: %I64 = sdiv i64 undef, 7
95
102
; CHECK-NEXT: Cost Model: Found an estimated cost of 28 for instruction: %V2i64 = sdiv <2 x i64> undef, <i64 6, i64 7>
96
103
; CHECK-NEXT: Cost Model: Found an estimated cost of 56 for instruction: %V4i64 = sdiv <4 x i64> undef, <i64 4, i64 5, i64 6, i64 7>
@@ -109,6 +116,8 @@ define i32 @sdiv_const() {
109
116
; CHECK-NEXT: Cost Model: Found an estimated cost of 672 for instruction: %V64i8 = sdiv <64 x i8> undef, <i8 4, i8 5, i8 6, i8 7, i8 8, i8 9, i8 10, i8 11, i8 12, i8 13, i8 14, i8 15, i8 16, i8 17, i8 18, i8 19, i8 4, i8 5, i8 6, i8 7, i8 8, i8 9, i8 10, i8 11, i8 12, i8 13, i8 14, i8 15, i8 16, i8 17, i8 18, i8 19, i8 4, i8 5, i8 6, i8 7, i8 8, i8 9, i8 10, i8 11, i8 12, i8 13, i8 14, i8 15, i8 16, i8 17, i8 18, i8 19, i8 4, i8 5, i8 6, i8 7, i8 8, i8 9, i8 10, i8 11, i8 12, i8 13, i8 14, i8 15, i8 16, i8 17, i8 18, i8 19>
110
117
; CHECK-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret i32 undef
111
118
;
119
+ %I128 = sdiv i128 undef , 7
120
+
112
121
%I64 = sdiv i64 undef , 7
113
122
%V2i64 = sdiv <2 x i64 > undef , <i64 6 , i64 7 >
114
123
%V4i64 = sdiv <4 x i64 > undef , <i64 4 , i64 5 , i64 6 , i64 7 >
@@ -134,6 +143,7 @@ define i32 @sdiv_const() {
134
143
135
144
define i32 @udiv_const () {
136
145
; CHECK-LABEL: 'udiv_const'
146
+ ; CHECK-NEXT: Cost Model: Found an estimated cost of 10 for instruction: %I128 = udiv i128 undef, 7
137
147
; CHECK-NEXT: Cost Model: Found an estimated cost of 7 for instruction: %I64 = udiv i64 undef, 7
138
148
; CHECK-NEXT: Cost Model: Found an estimated cost of 28 for instruction: %V2i64 = udiv <2 x i64> undef, <i64 6, i64 7>
139
149
; CHECK-NEXT: Cost Model: Found an estimated cost of 56 for instruction: %V4i64 = udiv <4 x i64> undef, <i64 4, i64 5, i64 6, i64 7>
@@ -152,6 +162,9 @@ define i32 @udiv_const() {
152
162
; CHECK-NEXT: Cost Model: Found an estimated cost of 672 for instruction: %V64i8 = udiv <64 x i8> undef, <i8 4, i8 5, i8 6, i8 7, i8 8, i8 9, i8 10, i8 11, i8 12, i8 13, i8 14, i8 15, i8 16, i8 17, i8 18, i8 19, i8 4, i8 5, i8 6, i8 7, i8 8, i8 9, i8 10, i8 11, i8 12, i8 13, i8 14, i8 15, i8 16, i8 17, i8 18, i8 19, i8 4, i8 5, i8 6, i8 7, i8 8, i8 9, i8 10, i8 11, i8 12, i8 13, i8 14, i8 15, i8 16, i8 17, i8 18, i8 19, i8 4, i8 5, i8 6, i8 7, i8 8, i8 9, i8 10, i8 11, i8 12, i8 13, i8 14, i8 15, i8 16, i8 17, i8 18, i8 19>
153
163
; CHECK-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret i32 undef
154
164
;
165
+
166
+ %I128 = udiv i128 undef , 7
167
+
155
168
%I64 = udiv i64 undef , 7
156
169
%V2i64 = udiv <2 x i64 > undef , <i64 6 , i64 7 >
157
170
%V4i64 = udiv <4 x i64 > undef , <i64 4 , i64 5 , i64 6 , i64 7 >
@@ -177,6 +190,7 @@ define i32 @udiv_const() {
177
190
178
191
define i32 @sdiv_uniformconst () {
179
192
; CHECK-LABEL: 'sdiv_uniformconst'
193
+ ; CHECK-NEXT: Cost Model: Found an estimated cost of 10 for instruction: %I128 = sdiv i128 undef, 7
180
194
; CHECK-NEXT: Cost Model: Found an estimated cost of 7 for instruction: %I64 = sdiv i64 undef, 7
181
195
; CHECK-NEXT: Cost Model: Found an estimated cost of 10 for instruction: %V2i64 = sdiv <2 x i64> undef, <i64 7, i64 7>
182
196
; CHECK-NEXT: Cost Model: Found an estimated cost of 20 for instruction: %V4i64 = sdiv <4 x i64> undef, <i64 7, i64 7, i64 7, i64 7>
@@ -195,6 +209,8 @@ define i32 @sdiv_uniformconst() {
195
209
; CHECK-NEXT: Cost Model: Found an estimated cost of 320 for instruction: %V64i8 = sdiv <64 x i8> undef, <i8 7, i8 7, i8 7, i8 7, i8 7, i8 7, i8 7, i8 7, i8 7, i8 7, i8 7, i8 7, i8 7, i8 7, i8 7, i8 7, i8 7, i8 7, i8 7, i8 7, i8 7, i8 7, i8 7, i8 7, i8 7, i8 7, i8 7, i8 7, i8 7, i8 7, i8 7, i8 7, i8 7, i8 7, i8 7, i8 7, i8 7, i8 7, i8 7, i8 7, i8 7, i8 7, i8 7, i8 7, i8 7, i8 7, i8 7, i8 7, i8 7, i8 7, i8 7, i8 7, i8 7, i8 7, i8 7, i8 7, i8 7, i8 7, i8 7, i8 7, i8 7, i8 7, i8 7, i8 7>
196
210
; CHECK-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret i32 undef
197
211
;
212
+ %I128 = sdiv i128 undef , 7
213
+
198
214
%I64 = sdiv i64 undef , 7
199
215
%V2i64 = sdiv <2 x i64 > undef , <i64 7 , i64 7 >
200
216
%V4i64 = sdiv <4 x i64 > undef , <i64 7 , i64 7 , i64 7 , i64 7 >
@@ -220,6 +236,7 @@ define i32 @sdiv_uniformconst() {
220
236
221
237
define i32 @udiv_uniformconst () {
222
238
; CHECK-LABEL: 'udiv_uniformconst'
239
+ ; CHECK-NEXT: Cost Model: Found an estimated cost of 10 for instruction: %I128 = udiv i128 undef, 7
223
240
; CHECK-NEXT: Cost Model: Found an estimated cost of 7 for instruction: %I64 = udiv i64 undef, 7
224
241
; CHECK-NEXT: Cost Model: Found an estimated cost of 10 for instruction: %V2i64 = udiv <2 x i64> undef, <i64 7, i64 7>
225
242
; CHECK-NEXT: Cost Model: Found an estimated cost of 20 for instruction: %V4i64 = udiv <4 x i64> undef, <i64 7, i64 7, i64 7, i64 7>
@@ -238,6 +255,8 @@ define i32 @udiv_uniformconst() {
238
255
; CHECK-NEXT: Cost Model: Found an estimated cost of 320 for instruction: %V64i8 = udiv <64 x i8> undef, <i8 7, i8 7, i8 7, i8 7, i8 7, i8 7, i8 7, i8 7, i8 7, i8 7, i8 7, i8 7, i8 7, i8 7, i8 7, i8 7, i8 7, i8 7, i8 7, i8 7, i8 7, i8 7, i8 7, i8 7, i8 7, i8 7, i8 7, i8 7, i8 7, i8 7, i8 7, i8 7, i8 7, i8 7, i8 7, i8 7, i8 7, i8 7, i8 7, i8 7, i8 7, i8 7, i8 7, i8 7, i8 7, i8 7, i8 7, i8 7, i8 7, i8 7, i8 7, i8 7, i8 7, i8 7, i8 7, i8 7, i8 7, i8 7, i8 7, i8 7, i8 7, i8 7, i8 7, i8 7>
239
256
; CHECK-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret i32 undef
240
257
;
258
+ %I128 = udiv i128 undef , 7
259
+
241
260
%I64 = udiv i64 undef , 7
242
261
%V2i64 = udiv <2 x i64 > undef , <i64 7 , i64 7 >
243
262
%V4i64 = udiv <4 x i64 > undef , <i64 7 , i64 7 , i64 7 , i64 7 >
@@ -263,6 +282,7 @@ define i32 @udiv_uniformconst() {
263
282
264
283
define i32 @sdiv_constpow2 () {
265
284
; CHECK-LABEL: 'sdiv_constpow2'
285
+ ; CHECK-NEXT: Cost Model: Found an estimated cost of 10 for instruction: %I128 = sdiv i128 undef, 16
266
286
; CHECK-NEXT: Cost Model: Found an estimated cost of 5 for instruction: %I64 = sdiv i64 undef, 16
267
287
; CHECK-NEXT: Cost Model: Found an estimated cost of 28 for instruction: %V2i64 = sdiv <2 x i64> undef, <i64 8, i64 16>
268
288
; CHECK-NEXT: Cost Model: Found an estimated cost of 56 for instruction: %V4i64 = sdiv <4 x i64> undef, <i64 2, i64 4, i64 8, i64 16>
@@ -281,6 +301,8 @@ define i32 @sdiv_constpow2() {
281
301
; CHECK-NEXT: Cost Model: Found an estimated cost of 672 for instruction: %V64i8 = sdiv <64 x i8> undef, <i8 2, i8 4, i8 8, i8 16, i8 2, i8 4, i8 8, i8 16, i8 2, i8 4, i8 8, i8 16, i8 2, i8 4, i8 8, i8 16, i8 2, i8 4, i8 8, i8 16, i8 2, i8 4, i8 8, i8 16, i8 2, i8 4, i8 8, i8 16, i8 2, i8 4, i8 8, i8 16, i8 2, i8 4, i8 8, i8 16, i8 2, i8 4, i8 8, i8 16, i8 2, i8 4, i8 8, i8 16, i8 2, i8 4, i8 8, i8 16, i8 2, i8 4, i8 8, i8 16, i8 2, i8 4, i8 8, i8 16, i8 2, i8 4, i8 8, i8 16, i8 2, i8 4, i8 8, i8 16>
282
302
; CHECK-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret i32 undef
283
303
;
304
+ %I128 = sdiv i128 undef , 16
305
+
284
306
%I64 = sdiv i64 undef , 16
285
307
%V2i64 = sdiv <2 x i64 > undef , <i64 8 , i64 16 >
286
308
%V4i64 = sdiv <4 x i64 > undef , <i64 2 , i64 4 , i64 8 , i64 16 >
@@ -306,6 +328,7 @@ define i32 @sdiv_constpow2() {
306
328
307
329
define i32 @udiv_constpow2 () {
308
330
; CHECK-LABEL: 'udiv_constpow2'
331
+ ; CHECK-NEXT: Cost Model: Found an estimated cost of 10 for instruction: %I128 = udiv i128 undef, 16
309
332
; CHECK-NEXT: Cost Model: Found an estimated cost of 7 for instruction: %I64 = udiv i64 undef, 16
310
333
; CHECK-NEXT: Cost Model: Found an estimated cost of 28 for instruction: %V2i64 = udiv <2 x i64> undef, <i64 8, i64 16>
311
334
; CHECK-NEXT: Cost Model: Found an estimated cost of 56 for instruction: %V4i64 = udiv <4 x i64> undef, <i64 2, i64 4, i64 8, i64 16>
@@ -324,6 +347,8 @@ define i32 @udiv_constpow2() {
324
347
; CHECK-NEXT: Cost Model: Found an estimated cost of 672 for instruction: %V64i8 = udiv <64 x i8> undef, <i8 2, i8 4, i8 8, i8 16, i8 2, i8 4, i8 8, i8 16, i8 2, i8 4, i8 8, i8 16, i8 2, i8 4, i8 8, i8 16, i8 2, i8 4, i8 8, i8 16, i8 2, i8 4, i8 8, i8 16, i8 2, i8 4, i8 8, i8 16, i8 2, i8 4, i8 8, i8 16, i8 2, i8 4, i8 8, i8 16, i8 2, i8 4, i8 8, i8 16, i8 2, i8 4, i8 8, i8 16, i8 2, i8 4, i8 8, i8 16, i8 2, i8 4, i8 8, i8 16, i8 2, i8 4, i8 8, i8 16, i8 2, i8 4, i8 8, i8 16, i8 2, i8 4, i8 8, i8 16>
325
348
; CHECK-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret i32 undef
326
349
;
350
+ %I128 = udiv i128 undef , 16
351
+
327
352
%I64 = udiv i64 undef , 16
328
353
%V2i64 = udiv <2 x i64 > undef , <i64 8 , i64 16 >
329
354
%V4i64 = udiv <4 x i64 > undef , <i64 2 , i64 4 , i64 8 , i64 16 >
@@ -349,6 +374,7 @@ define i32 @udiv_constpow2() {
349
374
350
375
define i32 @sdiv_uniformconstpow2 () {
351
376
; CHECK-LABEL: 'sdiv_uniformconstpow2'
377
+ ; CHECK-NEXT: Cost Model: Found an estimated cost of 10 for instruction: %I128 = sdiv i128 undef, 16
352
378
; CHECK-NEXT: Cost Model: Found an estimated cost of 5 for instruction: %I64 = sdiv i64 undef, 16
353
379
; CHECK-NEXT: Cost Model: Found an estimated cost of 15 for instruction: %V2i64 = sdiv <2 x i64> undef, <i64 16, i64 16>
354
380
; CHECK-NEXT: Cost Model: Found an estimated cost of 30 for instruction: %V4i64 = sdiv <4 x i64> undef, <i64 16, i64 16, i64 16, i64 16>
@@ -367,6 +393,8 @@ define i32 @sdiv_uniformconstpow2() {
367
393
; CHECK-NEXT: Cost Model: Found an estimated cost of 396 for instruction: %V64i8 = sdiv <64 x i8> undef, <i8 16, i8 16, i8 16, i8 16, i8 16, i8 16, i8 16, i8 16, i8 16, i8 16, i8 16, i8 16, i8 16, i8 16, i8 16, i8 16, i8 16, i8 16, i8 16, i8 16, i8 16, i8 16, i8 16, i8 16, i8 16, i8 16, i8 16, i8 16, i8 16, i8 16, i8 16, i8 16, i8 16, i8 16, i8 16, i8 16, i8 16, i8 16, i8 16, i8 16, i8 16, i8 16, i8 16, i8 16, i8 16, i8 16, i8 16, i8 16, i8 16, i8 16, i8 16, i8 16, i8 16, i8 16, i8 16, i8 16, i8 16, i8 16, i8 16, i8 16, i8 16, i8 16, i8 16, i8 16>
368
394
; CHECK-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret i32 undef
369
395
;
396
+ %I128 = sdiv i128 undef , 16
397
+
370
398
%I64 = sdiv i64 undef , 16
371
399
%V2i64 = sdiv <2 x i64 > undef , <i64 16 , i64 16 >
372
400
%V4i64 = sdiv <4 x i64 > undef , <i64 16 , i64 16 , i64 16 , i64 16 >
@@ -392,6 +420,7 @@ define i32 @sdiv_uniformconstpow2() {
392
420
393
421
define i32 @udiv_uniformconstpow2 () {
394
422
; CHECK-LABEL: 'udiv_uniformconstpow2'
423
+ ; CHECK-NEXT: Cost Model: Found an estimated cost of 10 for instruction: %I128 = udiv i128 undef, 16
395
424
; CHECK-NEXT: Cost Model: Found an estimated cost of 7 for instruction: %I64 = udiv i64 undef, 16
396
425
; CHECK-NEXT: Cost Model: Found an estimated cost of 10 for instruction: %V2i64 = udiv <2 x i64> undef, <i64 16, i64 16>
397
426
; CHECK-NEXT: Cost Model: Found an estimated cost of 20 for instruction: %V4i64 = udiv <4 x i64> undef, <i64 16, i64 16, i64 16, i64 16>
@@ -410,6 +439,8 @@ define i32 @udiv_uniformconstpow2() {
410
439
; CHECK-NEXT: Cost Model: Found an estimated cost of 320 for instruction: %V64i8 = udiv <64 x i8> undef, <i8 16, i8 16, i8 16, i8 16, i8 16, i8 16, i8 16, i8 16, i8 16, i8 16, i8 16, i8 16, i8 16, i8 16, i8 16, i8 16, i8 16, i8 16, i8 16, i8 16, i8 16, i8 16, i8 16, i8 16, i8 16, i8 16, i8 16, i8 16, i8 16, i8 16, i8 16, i8 16, i8 16, i8 16, i8 16, i8 16, i8 16, i8 16, i8 16, i8 16, i8 16, i8 16, i8 16, i8 16, i8 16, i8 16, i8 16, i8 16, i8 16, i8 16, i8 16, i8 16, i8 16, i8 16, i8 16, i8 16, i8 16, i8 16, i8 16, i8 16, i8 16, i8 16, i8 16, i8 16>
411
440
; CHECK-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret i32 undef
412
441
;
442
+ %I128 = udiv i128 undef , 16
443
+
413
444
%I64 = udiv i64 undef , 16
414
445
%V2i64 = udiv <2 x i64 > undef , <i64 16 , i64 16 >
415
446
%V4i64 = udiv <4 x i64 > undef , <i64 16 , i64 16 , i64 16 , i64 16 >
@@ -435,6 +466,7 @@ define i32 @udiv_uniformconstpow2() {
435
466
436
467
define i32 @sdiv_constnegpow2 () {
437
468
; CHECK-LABEL: 'sdiv_constnegpow2'
469
+ ; CHECK-NEXT: Cost Model: Found an estimated cost of 10 for instruction: %I128 = sdiv i128 undef, -16
438
470
; CHECK-NEXT: Cost Model: Found an estimated cost of 7 for instruction: %I64 = sdiv i64 undef, -16
439
471
; CHECK-NEXT: Cost Model: Found an estimated cost of 28 for instruction: %V2i64 = sdiv <2 x i64> undef, <i64 -8, i64 -16>
440
472
; CHECK-NEXT: Cost Model: Found an estimated cost of 56 for instruction: %V4i64 = sdiv <4 x i64> undef, <i64 -2, i64 -4, i64 -8, i64 -16>
@@ -453,6 +485,8 @@ define i32 @sdiv_constnegpow2() {
453
485
; CHECK-NEXT: Cost Model: Found an estimated cost of 672 for instruction: %V64i8 = sdiv <64 x i8> undef, <i8 -2, i8 -4, i8 -8, i8 -16, i8 -2, i8 -4, i8 -8, i8 -16, i8 -2, i8 -4, i8 -8, i8 -16, i8 -2, i8 -4, i8 -8, i8 -16, i8 -2, i8 -4, i8 -8, i8 -16, i8 -2, i8 -4, i8 -8, i8 -16, i8 -2, i8 -4, i8 -8, i8 -16, i8 -2, i8 -4, i8 -8, i8 -16, i8 -2, i8 -4, i8 -8, i8 -16, i8 -2, i8 -4, i8 -8, i8 -16, i8 -2, i8 -4, i8 -8, i8 -16, i8 -2, i8 -4, i8 -8, i8 -16, i8 -2, i8 -4, i8 -8, i8 -16, i8 -2, i8 -4, i8 -8, i8 -16, i8 -2, i8 -4, i8 -8, i8 -16, i8 -2, i8 -4, i8 -8, i8 -16>
454
486
; CHECK-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret i32 undef
455
487
;
488
+ %I128 = sdiv i128 undef , -16
489
+
456
490
%I64 = sdiv i64 undef , -16
457
491
%V2i64 = sdiv <2 x i64 > undef , <i64 -8 , i64 -16 >
458
492
%V4i64 = sdiv <4 x i64 > undef , <i64 -2 , i64 -4 , i64 -8 , i64 -16 >
@@ -478,6 +512,7 @@ define i32 @sdiv_constnegpow2() {
478
512
479
513
define i32 @udiv_constnegpow2 () {
480
514
; CHECK-LABEL: 'udiv_constnegpow2'
515
+ ; CHECK-NEXT: Cost Model: Found an estimated cost of 10 for instruction: %I128 = udiv i128 undef, -16
481
516
; CHECK-NEXT: Cost Model: Found an estimated cost of 7 for instruction: %I64 = udiv i64 undef, -16
482
517
; CHECK-NEXT: Cost Model: Found an estimated cost of 28 for instruction: %V2i64 = udiv <2 x i64> undef, <i64 -8, i64 -16>
483
518
; CHECK-NEXT: Cost Model: Found an estimated cost of 56 for instruction: %V4i64 = udiv <4 x i64> undef, <i64 -2, i64 -4, i64 -8, i64 -16>
@@ -496,6 +531,8 @@ define i32 @udiv_constnegpow2() {
496
531
; CHECK-NEXT: Cost Model: Found an estimated cost of 672 for instruction: %V64i8 = udiv <64 x i8> undef, <i8 -2, i8 -4, i8 -8, i8 -16, i8 -2, i8 -4, i8 -8, i8 -16, i8 -2, i8 -4, i8 -8, i8 -16, i8 -2, i8 -4, i8 -8, i8 -16, i8 -2, i8 -4, i8 -8, i8 -16, i8 -2, i8 -4, i8 -8, i8 -16, i8 -2, i8 -4, i8 -8, i8 -16, i8 -2, i8 -4, i8 -8, i8 -16, i8 -2, i8 -4, i8 -8, i8 -16, i8 -2, i8 -4, i8 -8, i8 -16, i8 -2, i8 -4, i8 -8, i8 -16, i8 -2, i8 -4, i8 -8, i8 -16, i8 -2, i8 -4, i8 -8, i8 -16, i8 -2, i8 -4, i8 -8, i8 -16, i8 -2, i8 -4, i8 -8, i8 -16, i8 -2, i8 -4, i8 -8, i8 -16>
497
532
; CHECK-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret i32 undef
498
533
;
534
+ %I128 = udiv i128 undef , -16
535
+
499
536
%I64 = udiv i64 undef , -16
500
537
%V2i64 = udiv <2 x i64 > undef , <i64 -8 , i64 -16 >
501
538
%V4i64 = udiv <4 x i64 > undef , <i64 -2 , i64 -4 , i64 -8 , i64 -16 >
@@ -521,6 +558,7 @@ define i32 @udiv_constnegpow2() {
521
558
522
559
define i32 @sdiv_uniformconstnegpow2 () {
523
560
; CHECK-LABEL: 'sdiv_uniformconstnegpow2'
561
+ ; CHECK-NEXT: Cost Model: Found an estimated cost of 10 for instruction: %I128 = sdiv i128 undef, -16
524
562
; CHECK-NEXT: Cost Model: Found an estimated cost of 7 for instruction: %I64 = sdiv i64 undef, -16
525
563
; CHECK-NEXT: Cost Model: Found an estimated cost of 10 for instruction: %V2i64 = sdiv <2 x i64> undef, <i64 -16, i64 -16>
526
564
; CHECK-NEXT: Cost Model: Found an estimated cost of 20 for instruction: %V4i64 = sdiv <4 x i64> undef, <i64 -16, i64 -16, i64 -16, i64 -16>
@@ -539,6 +577,8 @@ define i32 @sdiv_uniformconstnegpow2() {
539
577
; CHECK-NEXT: Cost Model: Found an estimated cost of 320 for instruction: %V64i8 = sdiv <64 x i8> undef, <i8 -16, i8 -16, i8 -16, i8 -16, i8 -16, i8 -16, i8 -16, i8 -16, i8 -16, i8 -16, i8 -16, i8 -16, i8 -16, i8 -16, i8 -16, i8 -16, i8 -16, i8 -16, i8 -16, i8 -16, i8 -16, i8 -16, i8 -16, i8 -16, i8 -16, i8 -16, i8 -16, i8 -16, i8 -16, i8 -16, i8 -16, i8 -16, i8 -16, i8 -16, i8 -16, i8 -16, i8 -16, i8 -16, i8 -16, i8 -16, i8 -16, i8 -16, i8 -16, i8 -16, i8 -16, i8 -16, i8 -16, i8 -16, i8 -16, i8 -16, i8 -16, i8 -16, i8 -16, i8 -16, i8 -16, i8 -16, i8 -16, i8 -16, i8 -16, i8 -16, i8 -16, i8 -16, i8 -16, i8 -16>
540
578
; CHECK-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret i32 undef
541
579
;
580
+ %I128 = sdiv i128 undef , -16
581
+
542
582
%I64 = sdiv i64 undef , -16
543
583
%V2i64 = sdiv <2 x i64 > undef , <i64 -16 , i64 -16 >
544
584
%V4i64 = sdiv <4 x i64 > undef , <i64 -16 , i64 -16 , i64 -16 , i64 -16 >
@@ -564,6 +604,7 @@ define i32 @sdiv_uniformconstnegpow2() {
564
604
565
605
define i32 @udiv_uniformconstnegpow2 () {
566
606
; CHECK-LABEL: 'udiv_uniformconstnegpow2'
607
+ ; CHECK-NEXT: Cost Model: Found an estimated cost of 10 for instruction: %I128 = udiv i128 undef, -16
567
608
; CHECK-NEXT: Cost Model: Found an estimated cost of 7 for instruction: %I64 = udiv i64 undef, -16
568
609
; CHECK-NEXT: Cost Model: Found an estimated cost of 10 for instruction: %V2i64 = udiv <2 x i64> undef, <i64 -16, i64 -16>
569
610
; CHECK-NEXT: Cost Model: Found an estimated cost of 20 for instruction: %V4i64 = udiv <4 x i64> undef, <i64 -16, i64 -16, i64 -16, i64 -16>
@@ -582,6 +623,8 @@ define i32 @udiv_uniformconstnegpow2() {
582
623
; CHECK-NEXT: Cost Model: Found an estimated cost of 320 for instruction: %V64i8 = udiv <64 x i8> undef, <i8 -16, i8 -16, i8 -16, i8 -16, i8 -16, i8 -16, i8 -16, i8 -16, i8 -16, i8 -16, i8 -16, i8 -16, i8 -16, i8 -16, i8 -16, i8 -16, i8 -16, i8 -16, i8 -16, i8 -16, i8 -16, i8 -16, i8 -16, i8 -16, i8 -16, i8 -16, i8 -16, i8 -16, i8 -16, i8 -16, i8 -16, i8 -16, i8 -16, i8 -16, i8 -16, i8 -16, i8 -16, i8 -16, i8 -16, i8 -16, i8 -16, i8 -16, i8 -16, i8 -16, i8 -16, i8 -16, i8 -16, i8 -16, i8 -16, i8 -16, i8 -16, i8 -16, i8 -16, i8 -16, i8 -16, i8 -16, i8 -16, i8 -16, i8 -16, i8 -16, i8 -16, i8 -16, i8 -16, i8 -16>
583
624
; CHECK-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret i32 undef
584
625
;
626
+ %I128 = udiv i128 undef , -16
627
+
585
628
%I64 = udiv i64 undef , -16
586
629
%V2i64 = udiv <2 x i64 > undef , <i64 -16 , i64 -16 >
587
630
%V4i64 = udiv <4 x i64 > undef , <i64 -16 , i64 -16 , i64 -16 , i64 -16 >
0 commit comments