9 * This code is distributed in the hope that it will be useful, but WITHOUT
10 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
11 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
12 * version 2 for more details (a copy is included in the LICENSE file that
13 * accompanied this code).
14 *
15 * You should have received a copy of the GNU General Public License version
16 * 2 along with this work; if not, write to the Free Software Foundation,
17 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
18 *
19 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
20 * or visit www.oracle.com if you need additional information or have any
21 * questions.
22 *
23 */
24
25 /**
26 * @test
27 * @bug 8146792
28 * @summary Predicate moved after partial peel may lead to broken graph
29 * @run main/othervm -XX:-TieredCompilation -XX:-BackgroundCompilation -XX:-UseOnStackReplacement -XX:CompileOnly=BadPredicateAfterPartialPeel::m -XX:CompileCommand=dontinline,BadPredicateAfterPartialPeel::not_inlined* -XX:CompileCommand=quiet BadPredicateAfterPartialPeel
30 *
31 */
32
33 public class BadPredicateAfterPartialPeel {
34
35 static void not_inlined1() {}
36 static void not_inlined4() {}
37
38 static int m_helper(int i, int i3, int i4) {
39 return i3 == 4 ? i4 : i;
40 }
41
42 static float[] array = new float[1000];
43 static int[] array2 = new int[1000];
44
45 boolean flag;
46 int j;
47
48 static void m(BadPredicateAfterPartialPeel o1, BadPredicateAfterPartialPeel o2, BadPredicateAfterPartialPeel o, int i4) {
49 int i1 = 1;
50
51 // To delay partial peeling to the loop opts pass right before CCP
52 int i2 = 0;
|
9 * This code is distributed in the hope that it will be useful, but WITHOUT
10 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
11 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
12 * version 2 for more details (a copy is included in the LICENSE file that
13 * accompanied this code).
14 *
15 * You should have received a copy of the GNU General Public License version
16 * 2 along with this work; if not, write to the Free Software Foundation,
17 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
18 *
19 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
20 * or visit www.oracle.com if you need additional information or have any
21 * questions.
22 *
23 */
24
25 /**
26 * @test
27 * @bug 8146792
28 * @summary Predicate moved after partial peel may lead to broken graph
29 * @run main/othervm -XX:-TieredCompilation -XX:-BackgroundCompilation
30 * -XX:-UseOnStackReplacement
31 * -XX:CompileCommand=compileonly,compiler.loopopts.BadPredicateAfterPartialPeel::m
32 * -XX:CompileCommand=dontinline,compiler.loopopts.BadPredicateAfterPartialPeel::not_inlined*
33 * -XX:CompileCommand=quiet
34 * compiler.loopopts.BadPredicateAfterPartialPeel
35 */
36
37 package compiler.loopopts;
38
39 public class BadPredicateAfterPartialPeel {
40
41 static void not_inlined1() {}
42 static void not_inlined4() {}
43
44 static int m_helper(int i, int i3, int i4) {
45 return i3 == 4 ? i4 : i;
46 }
47
48 static float[] array = new float[1000];
49 static int[] array2 = new int[1000];
50
51 boolean flag;
52 int j;
53
54 static void m(BadPredicateAfterPartialPeel o1, BadPredicateAfterPartialPeel o2, BadPredicateAfterPartialPeel o, int i4) {
55 int i1 = 1;
56
57 // To delay partial peeling to the loop opts pass right before CCP
58 int i2 = 0;
|