mirror of
https://github.com/openjdk/jdk.git
synced 2026-04-21 12:20:29 +00:00
8378966: C2: PhaseIdealLoop::pin_nodes_dependent_on must not be called with nullptr
Reviewed-by: chagedorn, aseoane
This commit is contained in:
parent
b418cbcdd4
commit
c3c59413be
@ -1307,7 +1307,14 @@ Node* PhaseIdealLoop::place_outside_loop(Node* useblock, IdealLoopTree* loop) co
|
||||
|
||||
|
||||
bool PhaseIdealLoop::identical_backtoback_ifs(Node *n) {
|
||||
if (!n->is_If() || n->is_BaseCountedLoopEnd()) {
|
||||
if (!n->is_If()) {
|
||||
return false;
|
||||
}
|
||||
if (n->outcnt() != n->as_If()->required_outcnt()) {
|
||||
assert(false, "malformed IfNode with %d outputs", n->outcnt());
|
||||
return false;
|
||||
}
|
||||
if (n->is_BaseCountedLoopEnd()) {
|
||||
return false;
|
||||
}
|
||||
if (!n->in(0)->is_Region()) {
|
||||
@ -1433,7 +1440,10 @@ void PhaseIdealLoop::split_if_with_blocks_post(Node *n) {
|
||||
|
||||
// Check some safety conditions
|
||||
if (iff->is_If()) { // Classic split-if?
|
||||
if (iff->in(0) != n_ctrl) {
|
||||
if (iff->outcnt() != iff->as_If()->required_outcnt()) {
|
||||
assert(false, "malformed IfNode with %d outputs", iff->outcnt());
|
||||
return;
|
||||
} else if (iff->in(0) != n_ctrl) {
|
||||
return; // Compare must be in same blk as if
|
||||
}
|
||||
} else if (iff->is_CMove()) { // Trying to split-up a CMOVE
|
||||
|
||||
@ -704,6 +704,9 @@ void PhaseIdealLoop::do_split_if(Node* iff, RegionNode** new_false_region, Regio
|
||||
new_true = ifpx;
|
||||
}
|
||||
}
|
||||
assert(new_false != nullptr, "iff is malformed");
|
||||
assert(new_true != nullptr, "iff is malformed");
|
||||
|
||||
_igvn.remove_dead_node(new_iff, PhaseIterGVN::NodeOrigin::Speculative);
|
||||
// Lazy replace IDOM info with the region's dominator
|
||||
replace_node_and_forward_ctrl(iff, region_dom);
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user