Path: blob/master/test/hotspot/jtreg/compiler/loopopts/TestAddPChainWithDifferentBase.java
64478 views
/*1* Copyright (c) 2021, Red Hat, Inc. All rights reserved.2* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.3*4* This code is free software; you can redistribute it and/or modify it5* under the terms of the GNU General Public License version 2 only, as6* published by the Free Software Foundation.7*8* This code is distributed in the hope that it will be useful, but WITHOUT9* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or10* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License11* version 2 for more details (a copy is included in the LICENSE file that12* accompanied this code).13*14* You should have received a copy of the GNU General Public License version15* 2 along with this work; if not, write to the Free Software Foundation,16* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.17*18* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA19* or visit www.oracle.com if you need additional information or have any20* questions.21*/2223/**24* @test25* @bug 826798826* @summary C2: assert(!addp->is_AddP() || addp->in(AddPNode::Base)->is_top() || addp->in(AddPNode::Base) == n->in(AddPNode::Base)) failed: Base pointers must match (addp 1301)27*28* @run main/othervm -Xcomp -XX:CompileOnly=TestAddPChainWithDifferentBase TestAddPChainWithDifferentBase29*30*/3132public class TestAddPChainWithDifferentBase {33static int x;34static int iArrFld[] = new int[400];3536public static void main(String[] strArr) {37test();38}3940static void test() {41int i6, i7 = 9, i8, i9 = 138;4243for (i6 = 7; i6 > 1; i6 -= 3) {44for (i8 = i6; i8 < 4; i8++) {45try {46iArrFld[i8] = (52691 / i8);47i7 = (iArrFld[i8 + 1] % i9);48i7 = (412419036 / iArrFld[i8]);49} catch (ArithmeticException a_e) {50}51i9 += 13;52}53}54x = i7;55}56}575859