author | tpivovarova |
Tue, 12 Jul 2016 18:24:48 +0300 | |
changeset 40059 | c2304140ed64 |
parent 35594 | cc13089c6327 |
permissions | -rw-r--r-- |
34168
dbdc6907b55d
8141624: Limit calculation of pre loop during super word optimization is wrong
kvn
parents:
diff
changeset
|
1 |
/* |
35594 | 2 |
* Copyright (c) 2015 SAP SE. All rights reserved. |
34168
dbdc6907b55d
8141624: Limit calculation of pre loop during super word optimization is wrong
kvn
parents:
diff
changeset
|
3 |
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. |
dbdc6907b55d
8141624: Limit calculation of pre loop during super word optimization is wrong
kvn
parents:
diff
changeset
|
4 |
* |
dbdc6907b55d
8141624: Limit calculation of pre loop during super word optimization is wrong
kvn
parents:
diff
changeset
|
5 |
* This code is free software; you can redistribute it and/or modify it |
dbdc6907b55d
8141624: Limit calculation of pre loop during super word optimization is wrong
kvn
parents:
diff
changeset
|
6 |
* under the terms of the GNU General Public License version 2 only, as |
dbdc6907b55d
8141624: Limit calculation of pre loop during super word optimization is wrong
kvn
parents:
diff
changeset
|
7 |
* published by the Free Software Foundation. |
dbdc6907b55d
8141624: Limit calculation of pre loop during super word optimization is wrong
kvn
parents:
diff
changeset
|
8 |
* |
dbdc6907b55d
8141624: Limit calculation of pre loop during super word optimization is wrong
kvn
parents:
diff
changeset
|
9 |
* This code is distributed in the hope that it will be useful, but WITHOUT |
dbdc6907b55d
8141624: Limit calculation of pre loop during super word optimization is wrong
kvn
parents:
diff
changeset
|
10 |
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or |
dbdc6907b55d
8141624: Limit calculation of pre loop during super word optimization is wrong
kvn
parents:
diff
changeset
|
11 |
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License |
dbdc6907b55d
8141624: Limit calculation of pre loop during super word optimization is wrong
kvn
parents:
diff
changeset
|
12 |
* version 2 for more details (a copy is included in the LICENSE file that |
dbdc6907b55d
8141624: Limit calculation of pre loop during super word optimization is wrong
kvn
parents:
diff
changeset
|
13 |
* accompanied this code). |
dbdc6907b55d
8141624: Limit calculation of pre loop during super word optimization is wrong
kvn
parents:
diff
changeset
|
14 |
* |
dbdc6907b55d
8141624: Limit calculation of pre loop during super word optimization is wrong
kvn
parents:
diff
changeset
|
15 |
* You should have received a copy of the GNU General Public License version |
dbdc6907b55d
8141624: Limit calculation of pre loop during super word optimization is wrong
kvn
parents:
diff
changeset
|
16 |
* 2 along with this work; if not, write to the Free Software Foundation, |
dbdc6907b55d
8141624: Limit calculation of pre loop during super word optimization is wrong
kvn
parents:
diff
changeset
|
17 |
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. |
dbdc6907b55d
8141624: Limit calculation of pre loop during super word optimization is wrong
kvn
parents:
diff
changeset
|
18 |
* |
dbdc6907b55d
8141624: Limit calculation of pre loop during super word optimization is wrong
kvn
parents:
diff
changeset
|
19 |
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA |
dbdc6907b55d
8141624: Limit calculation of pre loop during super word optimization is wrong
kvn
parents:
diff
changeset
|
20 |
* or visit www.oracle.com if you need additional information or have any |
dbdc6907b55d
8141624: Limit calculation of pre loop during super word optimization is wrong
kvn
parents:
diff
changeset
|
21 |
* questions. |
dbdc6907b55d
8141624: Limit calculation of pre loop during super word optimization is wrong
kvn
parents:
diff
changeset
|
22 |
*/ |
dbdc6907b55d
8141624: Limit calculation of pre loop during super word optimization is wrong
kvn
parents:
diff
changeset
|
23 |
|
dbdc6907b55d
8141624: Limit calculation of pre loop during super word optimization is wrong
kvn
parents:
diff
changeset
|
24 |
/* |
dbdc6907b55d
8141624: Limit calculation of pre loop during super word optimization is wrong
kvn
parents:
diff
changeset
|
25 |
* @test |
dbdc6907b55d
8141624: Limit calculation of pre loop during super word optimization is wrong
kvn
parents:
diff
changeset
|
26 |
* @bug 8141624 |
dbdc6907b55d
8141624: Limit calculation of pre loop during super word optimization is wrong
kvn
parents:
diff
changeset
|
27 |
* @summary Limit calculation of pre loop during super word optimization is wrong |
40059 | 28 |
* @run main/othervm compiler.loopopts.superword.TestBestAlign |
34168
dbdc6907b55d
8141624: Limit calculation of pre loop during super word optimization is wrong
kvn
parents:
diff
changeset
|
29 |
* @author gunter.haug@sap.com |
dbdc6907b55d
8141624: Limit calculation of pre loop during super word optimization is wrong
kvn
parents:
diff
changeset
|
30 |
*/ |
dbdc6907b55d
8141624: Limit calculation of pre loop during super word optimization is wrong
kvn
parents:
diff
changeset
|
31 |
|
40059 | 32 |
package compiler.loopopts.superword; |
33 |
||
34168
dbdc6907b55d
8141624: Limit calculation of pre loop during super word optimization is wrong
kvn
parents:
diff
changeset
|
34 |
public class TestBestAlign { |
dbdc6907b55d
8141624: Limit calculation of pre loop during super word optimization is wrong
kvn
parents:
diff
changeset
|
35 |
|
dbdc6907b55d
8141624: Limit calculation of pre loop during super word optimization is wrong
kvn
parents:
diff
changeset
|
36 |
static final int initVal = -1; |
dbdc6907b55d
8141624: Limit calculation of pre loop during super word optimization is wrong
kvn
parents:
diff
changeset
|
37 |
static int intArray []; |
dbdc6907b55d
8141624: Limit calculation of pre loop during super word optimization is wrong
kvn
parents:
diff
changeset
|
38 |
static boolean boolArray[]; |
dbdc6907b55d
8141624: Limit calculation of pre loop during super word optimization is wrong
kvn
parents:
diff
changeset
|
39 |
static int limit; |
dbdc6907b55d
8141624: Limit calculation of pre loop during super word optimization is wrong
kvn
parents:
diff
changeset
|
40 |
static public void clear() { |
dbdc6907b55d
8141624: Limit calculation of pre loop during super word optimization is wrong
kvn
parents:
diff
changeset
|
41 |
for (int i = 0; i < limit; i++) { |
dbdc6907b55d
8141624: Limit calculation of pre loop during super word optimization is wrong
kvn
parents:
diff
changeset
|
42 |
boolArray[1] = true; |
dbdc6907b55d
8141624: Limit calculation of pre loop during super word optimization is wrong
kvn
parents:
diff
changeset
|
43 |
intArray[i] = initVal; |
dbdc6907b55d
8141624: Limit calculation of pre loop during super word optimization is wrong
kvn
parents:
diff
changeset
|
44 |
boolArray[2] = true; |
dbdc6907b55d
8141624: Limit calculation of pre loop during super word optimization is wrong
kvn
parents:
diff
changeset
|
45 |
} |
dbdc6907b55d
8141624: Limit calculation of pre loop during super word optimization is wrong
kvn
parents:
diff
changeset
|
46 |
} |
dbdc6907b55d
8141624: Limit calculation of pre loop during super word optimization is wrong
kvn
parents:
diff
changeset
|
47 |
|
dbdc6907b55d
8141624: Limit calculation of pre loop during super word optimization is wrong
kvn
parents:
diff
changeset
|
48 |
public static void main(String argv[]) throws Exception { |
dbdc6907b55d
8141624: Limit calculation of pre loop during super word optimization is wrong
kvn
parents:
diff
changeset
|
49 |
limit = 64; |
dbdc6907b55d
8141624: Limit calculation of pre loop during super word optimization is wrong
kvn
parents:
diff
changeset
|
50 |
boolArray = new boolean[8]; |
dbdc6907b55d
8141624: Limit calculation of pre loop during super word optimization is wrong
kvn
parents:
diff
changeset
|
51 |
intArray = new int[limit + 4]; |
dbdc6907b55d
8141624: Limit calculation of pre loop during super word optimization is wrong
kvn
parents:
diff
changeset
|
52 |
for (int i = 0; i < 10000000; ++i) { |
dbdc6907b55d
8141624: Limit calculation of pre loop during super word optimization is wrong
kvn
parents:
diff
changeset
|
53 |
if(i % 1000000 == 0) |
dbdc6907b55d
8141624: Limit calculation of pre loop during super word optimization is wrong
kvn
parents:
diff
changeset
|
54 |
System.out.println(i); |
dbdc6907b55d
8141624: Limit calculation of pre loop during super word optimization is wrong
kvn
parents:
diff
changeset
|
55 |
clear(); |
dbdc6907b55d
8141624: Limit calculation of pre loop during super word optimization is wrong
kvn
parents:
diff
changeset
|
56 |
} |
dbdc6907b55d
8141624: Limit calculation of pre loop during super word optimization is wrong
kvn
parents:
diff
changeset
|
57 |
} |
dbdc6907b55d
8141624: Limit calculation of pre loop during super word optimization is wrong
kvn
parents:
diff
changeset
|
58 |
} |