Skip to content

Commit 2c114d6

Browse files
author
SendaoYan
committed
8367899: compiler/c2/gvn/TestBitCompressValueTransform.java intermittent timed out
Reviewed-by: dfenacci, chagedorn
1 parent baf8bc5 commit 2c114d6

File tree

1 file changed

+20
-29
lines changed

1 file changed

+20
-29
lines changed

test/hotspot/jtreg/compiler/c2/gvn/TestBitCompressValueTransform.java

Lines changed: 20 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -76,10 +76,7 @@ public long test1(long value) {
7676

7777
@Run(test = "test1")
7878
public void run1(RunInfo info) {
79-
long res = 0;
80-
for (int i = 0; i < 10000; i++) {
81-
res |= test1(field_L);
82-
}
79+
long res = test1(field_L);
8380
Asserts.assertEQ(res, gold_L);
8481
}
8582

@@ -92,10 +89,7 @@ public int test2(int value) {
9289

9390
@Run(test = "test2")
9491
public void run2(RunInfo info) {
95-
int res = 0;
96-
for (int i = 0; i < 10000; i++) {
97-
res |= test2(field_I);
98-
}
92+
int res = test2(field_I);
9993
Asserts.assertEQ(res, gold_I);
10094
}
10195

@@ -113,7 +107,7 @@ public int test3(int value) {
113107
@Run(test = "test3")
114108
public void run3(RunInfo info) {
115109
int res = 0;
116-
for (int i = 1; i < 10000; i++) {
110+
for (int i = 1; i < 100; i++) {
117111
res |= test3(i);
118112
}
119113
Asserts.assertLTE(0, res);
@@ -133,7 +127,7 @@ public long test4(long value) {
133127
@Run(test = "test4")
134128
public void run4(RunInfo info) {
135129
long res = 0;
136-
for (long i = 1; i < 10000; i++) {
130+
for (long i = 1; i < 100; i++) {
137131
res |= test4(i);
138132
}
139133
Asserts.assertLTE(0L, res);
@@ -151,7 +145,7 @@ public long test5(long value) {
151145
@Run(test = "test5")
152146
public void run5(RunInfo info) {
153147
long res = 0;
154-
for (int i = -10000; i < 10000; i++) {
148+
for (int i = -100; i < 100; i++) {
155149
res |= test5((long)i);
156150
}
157151
Asserts.assertEQ(-1L, res);
@@ -169,7 +163,7 @@ public long test6(long value) {
169163
@Run(test = "test6")
170164
public void run6(RunInfo info) {
171165
long res = 0;
172-
for (int i = -10000; i < 10000; i++) {
166+
for (int i = -100; i < 100; i++) {
173167
res |= test6((long)i);
174168
}
175169
Asserts.assertLTE(0L, res);
@@ -188,7 +182,7 @@ public long test7(long value) {
188182
@Run(test = "test7")
189183
public void run7(RunInfo info) {
190184
long res = Long.MIN_VALUE;
191-
for (int i = -10000; i < 10000; i++) {
185+
for (int i = -100; i < 100; i++) {
192186
res = Long.max(test7((long)i), res);
193187
}
194188
Asserts.assertGTE(10000L, res);
@@ -206,7 +200,7 @@ public int test8(int value) {
206200
@Run(test = "test8")
207201
public void run8(RunInfo info) {
208202
int res = 0;
209-
for (int i = -10000; i < 10000; i++) {
203+
for (int i = -100; i < 100; i++) {
210204
res |= test8(i);
211205
}
212206
Asserts.assertEQ(-1, res);
@@ -224,7 +218,7 @@ public int test9(int value) {
224218
@Run(test = "test9")
225219
public void run9(RunInfo info) {
226220
int res = 0;
227-
for (int i = -10000; i < 10000; i++) {
221+
for (int i = -100; i < 100; i++) {
228222
res |= test9(i);
229223
}
230224
Asserts.assertLTE(0, res);
@@ -243,10 +237,10 @@ public int test10(int value) {
243237
@Run(test = "test10")
244238
public void run10(RunInfo info) {
245239
int res = Integer.MIN_VALUE;
246-
for (int i = -10000; i < 10000; i++) {
240+
for (int i = -100; i < 100; i++) {
247241
res = Integer.max(test10(i), res);
248242
}
249-
Asserts.assertGTE(10000, res);
243+
Asserts.assertGTE(100, res);
250244
}
251245

252246
@Test
@@ -260,7 +254,7 @@ public int test11(int value) {
260254
@Run(test = "test11")
261255
public void run11(RunInfo info) {
262256
int res = 0;
263-
for (int i = -10000; i < 10000; i++) {
257+
for (int i = -100; i < 100; i++) {
264258
res |= test11(i);
265259
}
266260
Asserts.assertEQ(0, res);
@@ -277,7 +271,7 @@ public long test12(long value) {
277271
@Run(test = "test12")
278272
public void run12(RunInfo info) {
279273
long res = 0;
280-
for (int i = -10000; i < 10000; i++) {
274+
for (int i = -100; i < 100; i++) {
281275
res |= test12(i);
282276
}
283277
Asserts.assertEQ(0L, res);
@@ -294,7 +288,7 @@ public int test13(int value) {
294288
@Run(test = "test13")
295289
public void run13(RunInfo info) {
296290
int res = 0;
297-
for (int i = -10000; i < 10000; i++) {
291+
for (int i = -100; i < 100; i++) {
298292
res |= test13(i);
299293
}
300294
Asserts.assertEQ(0, res);
@@ -311,7 +305,7 @@ public long test14(long value) {
311305
@Run(test = "test14")
312306
public void run14(RunInfo info) {
313307
long res = 0;
314-
for (int i = -10000; i < 10000; i++) {
308+
for (int i = -100; i < 100; i++) {
315309
res |= test14(i);
316310
}
317311
Asserts.assertEQ(0L, res);
@@ -327,10 +321,7 @@ public int test15(int src, int mask) {
327321

328322
@Run (test = "test15")
329323
public void run15(RunInfo info) {
330-
int res = 0;
331-
for (int i = 0; i < 10000; i++) {
332-
res |= test15(0, 0);
333-
}
324+
int res = test15(0, 0);
334325
Asserts.assertEQ(0, res);
335326
}
336327

@@ -408,7 +399,7 @@ public void run16(RunInfo info) {
408399
int actual = 0;
409400
int expected = 0;
410401

411-
for (int i = 0; i < 10000; i++) {
402+
for (int i = 0; i < 100; i++) {
412403
int arg1 = GEN_I.next();
413404
int arg2 = GEN_I.next();
414405

@@ -492,7 +483,7 @@ public void run17(RunInfo info) {
492483
int actual = 0;
493484
int expected = 0;
494485

495-
for (int i = 0; i < 10000; i++) {
486+
for (int i = 0; i < 100; i++) {
496487
int arg1 = GEN_I.next();
497488
int arg2 = GEN_I.next();
498489

@@ -576,7 +567,7 @@ public void run18(RunInfo info) {
576567
long actual = 0;
577568
long expected = 0;
578569

579-
for (int i = 0; i < 10000; i++) {
570+
for (int i = 0; i < 100; i++) {
580571
long arg1 = GEN_L.next();
581572
long arg2 = GEN_L.next();
582573

@@ -660,7 +651,7 @@ public void run19(RunInfo info) {
660651
long actual = 0;
661652
long expected = 0;
662653

663-
for (int i = 0; i < 10000; i++) {
654+
for (int i = 0; i < 100; i++) {
664655
long arg1 = GEN_L.next();
665656
long arg2 = GEN_L.next();
666657

0 commit comments

Comments
 (0)