@@ -5,6 +5,7 @@ target datalayout = "e-m:e-i8:8:32-i16:16:32-i64:64-i128:128-n32:64-S128"
55
66define i32 @sdiv () {
77; CHECK-LABEL: 'sdiv'
8+ ; CHECK-NEXT: Cost Model: Found an estimated cost of 10 for instruction: %I128 = sdiv i128 undef, undef
89; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %I64 = sdiv i64 undef, undef
910; CHECK-NEXT: Cost Model: Found an estimated cost of 28 for instruction: %V2i64 = sdiv <2 x i64> undef, undef
1011; 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() {
2324; CHECK-NEXT: Cost Model: Found an estimated cost of 672 for instruction: %V64i8 = sdiv <64 x i8> undef, undef
2425; CHECK-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret i32 undef
2526;
27+ %I128 = sdiv i128 undef , undef
28+
2629 %I64 = sdiv i64 undef , undef
2730 %V2i64 = sdiv <2 x i64 > undef , undef
2831 %V4i64 = sdiv <4 x i64 > undef , undef
@@ -48,6 +51,7 @@ define i32 @sdiv() {
4851
4952define i32 @udiv () {
5053; CHECK-LABEL: 'udiv'
54+ ; CHECK-NEXT: Cost Model: Found an estimated cost of 10 for instruction: %I128 = udiv i128 undef, undef
5155; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %I64 = udiv i64 undef, undef
5256; CHECK-NEXT: Cost Model: Found an estimated cost of 28 for instruction: %V2i64 = udiv <2 x i64> undef, undef
5357; 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() {
6670; CHECK-NEXT: Cost Model: Found an estimated cost of 672 for instruction: %V64i8 = udiv <64 x i8> undef, undef
6771; CHECK-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret i32 undef
6872;
73+ %I128 = udiv i128 undef , undef
74+
6975 %I64 = udiv i64 undef , undef
7076 %V2i64 = udiv <2 x i64 > undef , undef
7177 %V4i64 = udiv <4 x i64 > undef , undef
@@ -91,6 +97,7 @@ define i32 @udiv() {
9197
9298define i32 @sdiv_const () {
9399; CHECK-LABEL: 'sdiv_const'
100+ ; CHECK-NEXT: Cost Model: Found an estimated cost of 10 for instruction: %I128 = sdiv i128 undef, 7
94101; CHECK-NEXT: Cost Model: Found an estimated cost of 7 for instruction: %I64 = sdiv i64 undef, 7
95102; CHECK-NEXT: Cost Model: Found an estimated cost of 28 for instruction: %V2i64 = sdiv <2 x i64> undef, <i64 6, i64 7>
96103; 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() {
109116; 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>
110117; CHECK-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret i32 undef
111118;
119+ %I128 = sdiv i128 undef , 7
120+
112121 %I64 = sdiv i64 undef , 7
113122 %V2i64 = sdiv <2 x i64 > undef , <i64 6 , i64 7 >
114123 %V4i64 = sdiv <4 x i64 > undef , <i64 4 , i64 5 , i64 6 , i64 7 >
@@ -134,6 +143,7 @@ define i32 @sdiv_const() {
134143
135144define i32 @udiv_const () {
136145; CHECK-LABEL: 'udiv_const'
146+ ; CHECK-NEXT: Cost Model: Found an estimated cost of 10 for instruction: %I128 = udiv i128 undef, 7
137147; CHECK-NEXT: Cost Model: Found an estimated cost of 7 for instruction: %I64 = udiv i64 undef, 7
138148; CHECK-NEXT: Cost Model: Found an estimated cost of 28 for instruction: %V2i64 = udiv <2 x i64> undef, <i64 6, i64 7>
139149; 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() {
152162; 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>
153163; CHECK-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret i32 undef
154164;
165+
166+ %I128 = udiv i128 undef , 7
167+
155168 %I64 = udiv i64 undef , 7
156169 %V2i64 = udiv <2 x i64 > undef , <i64 6 , i64 7 >
157170 %V4i64 = udiv <4 x i64 > undef , <i64 4 , i64 5 , i64 6 , i64 7 >
@@ -177,6 +190,7 @@ define i32 @udiv_const() {
177190
178191define i32 @sdiv_uniformconst () {
179192; CHECK-LABEL: 'sdiv_uniformconst'
193+ ; CHECK-NEXT: Cost Model: Found an estimated cost of 10 for instruction: %I128 = sdiv i128 undef, 7
180194; CHECK-NEXT: Cost Model: Found an estimated cost of 7 for instruction: %I64 = sdiv i64 undef, 7
181195; CHECK-NEXT: Cost Model: Found an estimated cost of 10 for instruction: %V2i64 = sdiv <2 x i64> undef, <i64 7, i64 7>
182196; 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() {
195209; 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>
196210; CHECK-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret i32 undef
197211;
212+ %I128 = sdiv i128 undef , 7
213+
198214 %I64 = sdiv i64 undef , 7
199215 %V2i64 = sdiv <2 x i64 > undef , <i64 7 , i64 7 >
200216 %V4i64 = sdiv <4 x i64 > undef , <i64 7 , i64 7 , i64 7 , i64 7 >
@@ -220,6 +236,7 @@ define i32 @sdiv_uniformconst() {
220236
221237define i32 @udiv_uniformconst () {
222238; CHECK-LABEL: 'udiv_uniformconst'
239+ ; CHECK-NEXT: Cost Model: Found an estimated cost of 10 for instruction: %I128 = udiv i128 undef, 7
223240; CHECK-NEXT: Cost Model: Found an estimated cost of 7 for instruction: %I64 = udiv i64 undef, 7
224241; CHECK-NEXT: Cost Model: Found an estimated cost of 10 for instruction: %V2i64 = udiv <2 x i64> undef, <i64 7, i64 7>
225242; 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() {
238255; 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>
239256; CHECK-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret i32 undef
240257;
258+ %I128 = udiv i128 undef , 7
259+
241260 %I64 = udiv i64 undef , 7
242261 %V2i64 = udiv <2 x i64 > undef , <i64 7 , i64 7 >
243262 %V4i64 = udiv <4 x i64 > undef , <i64 7 , i64 7 , i64 7 , i64 7 >
@@ -263,6 +282,7 @@ define i32 @udiv_uniformconst() {
263282
264283define i32 @sdiv_constpow2 () {
265284; CHECK-LABEL: 'sdiv_constpow2'
285+ ; CHECK-NEXT: Cost Model: Found an estimated cost of 10 for instruction: %I128 = sdiv i128 undef, 16
266286; CHECK-NEXT: Cost Model: Found an estimated cost of 5 for instruction: %I64 = sdiv i64 undef, 16
267287; CHECK-NEXT: Cost Model: Found an estimated cost of 28 for instruction: %V2i64 = sdiv <2 x i64> undef, <i64 8, i64 16>
268288; 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() {
281301; 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>
282302; CHECK-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret i32 undef
283303;
304+ %I128 = sdiv i128 undef , 16
305+
284306 %I64 = sdiv i64 undef , 16
285307 %V2i64 = sdiv <2 x i64 > undef , <i64 8 , i64 16 >
286308 %V4i64 = sdiv <4 x i64 > undef , <i64 2 , i64 4 , i64 8 , i64 16 >
@@ -306,6 +328,7 @@ define i32 @sdiv_constpow2() {
306328
307329define i32 @udiv_constpow2 () {
308330; CHECK-LABEL: 'udiv_constpow2'
331+ ; CHECK-NEXT: Cost Model: Found an estimated cost of 10 for instruction: %I128 = udiv i128 undef, 16
309332; CHECK-NEXT: Cost Model: Found an estimated cost of 7 for instruction: %I64 = udiv i64 undef, 16
310333; CHECK-NEXT: Cost Model: Found an estimated cost of 28 for instruction: %V2i64 = udiv <2 x i64> undef, <i64 8, i64 16>
311334; 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() {
324347; 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>
325348; CHECK-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret i32 undef
326349;
350+ %I128 = udiv i128 undef , 16
351+
327352 %I64 = udiv i64 undef , 16
328353 %V2i64 = udiv <2 x i64 > undef , <i64 8 , i64 16 >
329354 %V4i64 = udiv <4 x i64 > undef , <i64 2 , i64 4 , i64 8 , i64 16 >
@@ -349,6 +374,7 @@ define i32 @udiv_constpow2() {
349374
350375define i32 @sdiv_uniformconstpow2 () {
351376; CHECK-LABEL: 'sdiv_uniformconstpow2'
377+ ; CHECK-NEXT: Cost Model: Found an estimated cost of 10 for instruction: %I128 = sdiv i128 undef, 16
352378; CHECK-NEXT: Cost Model: Found an estimated cost of 5 for instruction: %I64 = sdiv i64 undef, 16
353379; CHECK-NEXT: Cost Model: Found an estimated cost of 15 for instruction: %V2i64 = sdiv <2 x i64> undef, <i64 16, i64 16>
354380; 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() {
367393; 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>
368394; CHECK-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret i32 undef
369395;
396+ %I128 = sdiv i128 undef , 16
397+
370398 %I64 = sdiv i64 undef , 16
371399 %V2i64 = sdiv <2 x i64 > undef , <i64 16 , i64 16 >
372400 %V4i64 = sdiv <4 x i64 > undef , <i64 16 , i64 16 , i64 16 , i64 16 >
@@ -392,6 +420,7 @@ define i32 @sdiv_uniformconstpow2() {
392420
393421define i32 @udiv_uniformconstpow2 () {
394422; CHECK-LABEL: 'udiv_uniformconstpow2'
423+ ; CHECK-NEXT: Cost Model: Found an estimated cost of 10 for instruction: %I128 = udiv i128 undef, 16
395424; CHECK-NEXT: Cost Model: Found an estimated cost of 7 for instruction: %I64 = udiv i64 undef, 16
396425; CHECK-NEXT: Cost Model: Found an estimated cost of 10 for instruction: %V2i64 = udiv <2 x i64> undef, <i64 16, i64 16>
397426; 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() {
410439; 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>
411440; CHECK-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret i32 undef
412441;
442+ %I128 = udiv i128 undef , 16
443+
413444 %I64 = udiv i64 undef , 16
414445 %V2i64 = udiv <2 x i64 > undef , <i64 16 , i64 16 >
415446 %V4i64 = udiv <4 x i64 > undef , <i64 16 , i64 16 , i64 16 , i64 16 >
@@ -435,6 +466,7 @@ define i32 @udiv_uniformconstpow2() {
435466
436467define i32 @sdiv_constnegpow2 () {
437468; CHECK-LABEL: 'sdiv_constnegpow2'
469+ ; CHECK-NEXT: Cost Model: Found an estimated cost of 10 for instruction: %I128 = sdiv i128 undef, -16
438470; CHECK-NEXT: Cost Model: Found an estimated cost of 7 for instruction: %I64 = sdiv i64 undef, -16
439471; CHECK-NEXT: Cost Model: Found an estimated cost of 28 for instruction: %V2i64 = sdiv <2 x i64> undef, <i64 -8, i64 -16>
440472; 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() {
453485; 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>
454486; CHECK-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret i32 undef
455487;
488+ %I128 = sdiv i128 undef , -16
489+
456490 %I64 = sdiv i64 undef , -16
457491 %V2i64 = sdiv <2 x i64 > undef , <i64 -8 , i64 -16 >
458492 %V4i64 = sdiv <4 x i64 > undef , <i64 -2 , i64 -4 , i64 -8 , i64 -16 >
@@ -478,6 +512,7 @@ define i32 @sdiv_constnegpow2() {
478512
479513define i32 @udiv_constnegpow2 () {
480514; CHECK-LABEL: 'udiv_constnegpow2'
515+ ; CHECK-NEXT: Cost Model: Found an estimated cost of 10 for instruction: %I128 = udiv i128 undef, -16
481516; CHECK-NEXT: Cost Model: Found an estimated cost of 7 for instruction: %I64 = udiv i64 undef, -16
482517; CHECK-NEXT: Cost Model: Found an estimated cost of 28 for instruction: %V2i64 = udiv <2 x i64> undef, <i64 -8, i64 -16>
483518; 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() {
496531; 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>
497532; CHECK-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret i32 undef
498533;
534+ %I128 = udiv i128 undef , -16
535+
499536 %I64 = udiv i64 undef , -16
500537 %V2i64 = udiv <2 x i64 > undef , <i64 -8 , i64 -16 >
501538 %V4i64 = udiv <4 x i64 > undef , <i64 -2 , i64 -4 , i64 -8 , i64 -16 >
@@ -521,6 +558,7 @@ define i32 @udiv_constnegpow2() {
521558
522559define i32 @sdiv_uniformconstnegpow2 () {
523560; CHECK-LABEL: 'sdiv_uniformconstnegpow2'
561+ ; CHECK-NEXT: Cost Model: Found an estimated cost of 10 for instruction: %I128 = sdiv i128 undef, -16
524562; CHECK-NEXT: Cost Model: Found an estimated cost of 7 for instruction: %I64 = sdiv i64 undef, -16
525563; CHECK-NEXT: Cost Model: Found an estimated cost of 10 for instruction: %V2i64 = sdiv <2 x i64> undef, <i64 -16, i64 -16>
526564; 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() {
539577; 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>
540578; CHECK-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret i32 undef
541579;
580+ %I128 = sdiv i128 undef , -16
581+
542582 %I64 = sdiv i64 undef , -16
543583 %V2i64 = sdiv <2 x i64 > undef , <i64 -16 , i64 -16 >
544584 %V4i64 = sdiv <4 x i64 > undef , <i64 -16 , i64 -16 , i64 -16 , i64 -16 >
@@ -564,6 +604,7 @@ define i32 @sdiv_uniformconstnegpow2() {
564604
565605define i32 @udiv_uniformconstnegpow2 () {
566606; CHECK-LABEL: 'udiv_uniformconstnegpow2'
607+ ; CHECK-NEXT: Cost Model: Found an estimated cost of 10 for instruction: %I128 = udiv i128 undef, -16
567608; CHECK-NEXT: Cost Model: Found an estimated cost of 7 for instruction: %I64 = udiv i64 undef, -16
568609; CHECK-NEXT: Cost Model: Found an estimated cost of 10 for instruction: %V2i64 = udiv <2 x i64> undef, <i64 -16, i64 -16>
569610; 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() {
582623; 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>
583624; CHECK-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret i32 undef
584625;
626+ %I128 = udiv i128 undef , -16
627+
585628 %I64 = udiv i64 undef , -16
586629 %V2i64 = udiv <2 x i64 > undef , <i64 -16 , i64 -16 >
587630 %V4i64 = udiv <4 x i64 > undef , <i64 -16 , i64 -16 , i64 -16 , i64 -16 >
0 commit comments