aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorGravatar Roberto CastaƱeda Lozano <roberto.castaneda.lozano@oracle.com> 2021-04-09 12:10:00 +0200
committerGravatar Roberto CastaƱeda Lozano <roberto.castaneda.lozano@oracle.com> 2021-04-09 12:10:00 +0200
commit808451defaf73f0f06f6d125b041093a3daaae69 (patch)
treebcb9d9be89039da40ef99c4e7f62be2a9534af39
parent54ec8a0b9633a61bf47221db9188d55fb3cdb312 (diff)
downloadjdk-pr/3303.tar.gz
jdk-pr/3303.zip
Complete projection assertions with basic checkspr/3303
-rw-r--r--src/hotspot/share/opto/block.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/hotspot/share/opto/block.cpp b/src/hotspot/share/opto/block.cpp
index cd852bb671f..d4227df0b4f 100644
--- a/src/hotspot/share/opto/block.cpp
+++ b/src/hotspot/share/opto/block.cpp
@@ -1273,8 +1273,10 @@ void PhaseCFG::verify() const {
}
}
if (n->is_Proj()) {
+ assert(j >= 1, "a projection cannot be the first instruction in a block");
Node* pred = block->get_node(j - 1);
Node* parent = n->in(0);
+ assert(parent != NULL, "projections must have a parent");
assert(pred == parent || (pred->is_Proj() && pred->in(0) == parent),
"projections must follow their parents or other sibling projections");
}