8305073: Fix VerifyLoopOptimizations - step 2 - verify idom
Reviewed-by: chagedorn, thartmann, kvn
This commit is contained in:
parent
80d7de7074
commit
26227a6ff8
src/hotspot/share/opto
test/hotspot/jtreg/compiler/loopopts
@ -4713,24 +4713,18 @@ bool PhaseIdealLoop::verify_idom(Node* n, const PhaseIdealLoop* phase_verify) co
|
||||
return false; // fail
|
||||
}
|
||||
|
||||
// Broken part of VerifyLoopOptimizations (C)
|
||||
// Reason:
|
||||
// Idom not always set correctly, for example BUG in
|
||||
// PhaseIdealLoop::create_new_if_for_predicate
|
||||
// at "set_idom(rgn, nrdom, dom_depth(rgn));"
|
||||
/*
|
||||
Node *id = idom_no_update(n);
|
||||
if( id != loop_verify->idom_no_update(n) ) {
|
||||
tty->print("Unequals idoms for: ");
|
||||
Node* id = idom_no_update(n);
|
||||
Node* id_verify = phase_verify->idom_no_update(n);
|
||||
if (id != id_verify) {
|
||||
tty->print("Mismatching idom for node: ");
|
||||
n->dump();
|
||||
if( fail++ > 10 ) return;
|
||||
tty->print("We have it as: ");
|
||||
tty->print(" We have idom: ");
|
||||
id->dump();
|
||||
tty->print("Verify thinks: ");
|
||||
loop_verify->idom_no_update(n)->dump();
|
||||
tty->print(" Verify has idom: ");
|
||||
id_verify->dump();
|
||||
tty->cr();
|
||||
return false; // fail
|
||||
}
|
||||
*/
|
||||
return true; // pass
|
||||
}
|
||||
|
||||
|
@ -0,0 +1,37 @@
|
||||
/*
|
||||
* Copyright (c) 2023, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
* under the terms of the GNU General Public License version 2 only, as
|
||||
* published by the Free Software Foundation.
|
||||
*
|
||||
* This code is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||
* version 2 for more details (a copy is included in the LICENSE file that
|
||||
* accompanied this code).
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License version
|
||||
* 2 along with this work; if not, write to the Free Software Foundation,
|
||||
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||
*
|
||||
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
|
||||
* or visit www.oracle.com if you need additional information or have any
|
||||
* questions.
|
||||
*/
|
||||
|
||||
/*
|
||||
* @test
|
||||
* @bug 8308084 8305073
|
||||
* @requires vm.debug == true & vm.flavor == "server"
|
||||
* @summary Run with -Xcomp to test -XX:+VerifyLoopOptimizations in debug builds.
|
||||
*
|
||||
* @run main/othervm/timeout=300 -Xcomp -XX:+VerifyLoopOptimizations compiler.loopopts.TestVerifyLoopOptimizations
|
||||
*/
|
||||
package compiler.loopopts;
|
||||
|
||||
public class TestVerifyLoopOptimizations {
|
||||
public static void main(String[] args) {
|
||||
}
|
||||
}
|
Loading…
x
Reference in New Issue
Block a user