Skip to content

Commit 70c7b1d

Browse files
committed
8250607: C2: Filter type in PhiNode::Value() for induction variables of trip-counted integer loops
Reviewed-by: chagedorn, thartmann
1 parent bd8693a commit 70c7b1d

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/hotspot/share/opto/cfgnode.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1105,9 +1105,9 @@ const Type* PhiNode::Value(PhaseGVN* phase) const {
11051105
if (bt != BoolTest::ne) {
11061106
if (stride_t->_hi < 0) { // Down-counter loop
11071107
swap(lo, hi);
1108-
return TypeInt::make(MIN2(lo->_lo, hi->_lo) , hi->_hi, 3);
1108+
return TypeInt::make(MIN2(lo->_lo, hi->_lo) , hi->_hi, 3)->filter_speculative(_type);
11091109
} else if (stride_t->_lo >= 0) {
1110-
return TypeInt::make(lo->_lo, MAX2(lo->_hi, hi->_hi), 3);
1110+
return TypeInt::make(lo->_lo, MAX2(lo->_hi, hi->_hi), 3)->filter_speculative(_type);
11111111
}
11121112
}
11131113
}

0 commit comments

Comments
 (0)