--- a/hotspot/src/share/vm/opto/loopTransform.cpp Mon Dec 28 23:11:01 2015 -0800
+++ b/hotspot/src/share/vm/opto/loopTransform.cpp Mon Dec 21 16:58:29 2015 +0000
@@ -1399,8 +1399,8 @@
limit = new Opaque2Node( C, limit );
register_new_node( limit, opaq_ctrl );
}
- if (stride_con > 0 && ((limit_type->_lo - stride_con) < limit_type->_lo) ||
- stride_con < 0 && ((limit_type->_hi - stride_con) > limit_type->_hi)) {
+ if (stride_con > 0 && (java_subtract(limit_type->_lo, stride_con) < limit_type->_lo) ||
+ stride_con < 0 && (java_subtract(limit_type->_hi, stride_con) > limit_type->_hi)) {
// No underflow.
new_limit = new SubINode(limit, stride);
} else {