@@ -946,19 +946,19 @@ Node *LoopNode::Ideal(PhaseGVN *phase, bool can_reshape) {
946
946
947
947
#ifdef ASSERT
948
948
void LoopNode::verify_strip_mined (int expect_skeleton) const {
949
- if (!is_valid_counted_loop ()) {
950
- return ; // Skip malformed counted loop
951
- }
952
949
const OuterStripMinedLoopNode* outer = NULL ;
953
950
const CountedLoopNode* inner = NULL ;
954
951
if (is_strip_mined ()) {
952
+ if (!is_valid_counted_loop ()) {
953
+ return ; // Skip malformed counted loop
954
+ }
955
955
assert (is_CountedLoop (), " no Loop should be marked strip mined" );
956
956
inner = as_CountedLoop ();
957
957
outer = inner->in (LoopNode::EntryControl)->as_OuterStripMinedLoop ();
958
958
} else if (is_OuterStripMinedLoop ()) {
959
959
outer = this ->as_OuterStripMinedLoop ();
960
960
inner = outer->unique_ctrl_out ()->as_CountedLoop ();
961
- assert (inner->is_valid_counted_loop (), " OuterStripMinedLoop should have been removed" );
961
+ assert (inner->is_valid_counted_loop () && inner-> is_strip_mined () , " OuterStripMinedLoop should have been removed" );
962
962
assert (!is_strip_mined (), " outer loop shouldn't be marked strip mined" );
963
963
}
964
964
if (inner != NULL || outer != NULL ) {
@@ -1240,7 +1240,7 @@ Node* CountedLoopNode::match_incr_with_optional_truncation(
1240
1240
}
1241
1241
1242
1242
LoopNode* CountedLoopNode::skip_strip_mined (int expect_skeleton) {
1243
- if (is_strip_mined ()) {
1243
+ if (is_strip_mined () && is_valid_counted_loop () ) {
1244
1244
verify_strip_mined (expect_skeleton);
1245
1245
return in (EntryControl)->as_Loop ();
1246
1246
}
0 commit comments