mirror of
https://github.com/openjdk/jdk.git
synced 2026-05-11 05:59:52 +00:00
8235584: UseProfiledLoopPredicate fails with assert(_phase->get_loop(c) == loop) failed: have to be in the same loop
Reviewed-by: thartmann, neliasso
This commit is contained in:
parent
e3eb6dbd1f
commit
995fae6d4b
@ -1389,8 +1389,9 @@ bool PhaseIdealLoop::loop_predication_impl(IdealLoopTree *loop) {
|
||||
// an early loop exit. Try them with profile data.
|
||||
while (if_proj_list.size() > 0) {
|
||||
Node* proj = if_proj_list.pop();
|
||||
float f = pf.to(proj);
|
||||
if (proj->as_Proj()->is_uncommon_trap_if_pattern(Deoptimization::Reason_none) &&
|
||||
pf.to(proj) * loop_trip_cnt >= 1) {
|
||||
f * loop_trip_cnt >= 1) {
|
||||
hoisted = loop_predication_impl_helper(loop, proj->as_Proj(), profile_predicate_proj, cl, zero, invar, Deoptimization::Reason_profile_predicate) | hoisted;
|
||||
}
|
||||
}
|
||||
|
||||
@ -946,19 +946,19 @@ Node *LoopNode::Ideal(PhaseGVN *phase, bool can_reshape) {
|
||||
|
||||
#ifdef ASSERT
|
||||
void LoopNode::verify_strip_mined(int expect_skeleton) const {
|
||||
if (!is_valid_counted_loop()) {
|
||||
return; // Skip malformed counted loop
|
||||
}
|
||||
const OuterStripMinedLoopNode* outer = NULL;
|
||||
const CountedLoopNode* inner = NULL;
|
||||
if (is_strip_mined()) {
|
||||
if (!is_valid_counted_loop()) {
|
||||
return; // Skip malformed counted loop
|
||||
}
|
||||
assert(is_CountedLoop(), "no Loop should be marked strip mined");
|
||||
inner = as_CountedLoop();
|
||||
outer = inner->in(LoopNode::EntryControl)->as_OuterStripMinedLoop();
|
||||
} else if (is_OuterStripMinedLoop()) {
|
||||
outer = this->as_OuterStripMinedLoop();
|
||||
inner = outer->unique_ctrl_out()->as_CountedLoop();
|
||||
assert(inner->is_valid_counted_loop(), "OuterStripMinedLoop should have been removed");
|
||||
assert(inner->is_valid_counted_loop() && inner->is_strip_mined(), "OuterStripMinedLoop should have been removed");
|
||||
assert(!is_strip_mined(), "outer loop shouldn't be marked strip mined");
|
||||
}
|
||||
if (inner != NULL || outer != NULL) {
|
||||
@ -1240,7 +1240,7 @@ Node* CountedLoopNode::match_incr_with_optional_truncation(
|
||||
}
|
||||
|
||||
LoopNode* CountedLoopNode::skip_strip_mined(int expect_skeleton) {
|
||||
if (is_strip_mined()) {
|
||||
if (is_strip_mined() && is_valid_counted_loop()) {
|
||||
verify_strip_mined(expect_skeleton);
|
||||
return in(EntryControl)->as_Loop();
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user