File tree Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -2128,7 +2128,7 @@ Node *LoopLimitNode::Ideal(PhaseGVN *phase, bool can_reshape) {
21282128
21292129 const TypeInt* init_t = phase->type (in (Init) )->is_int ();
21302130 const TypeInt* limit_t = phase->type (in (Limit))->is_int ();
2131- int stride_p;
2131+ jlong stride_p;
21322132 jlong lim, ini;
21332133 julong max;
21342134 if (stride_con > 0 ) {
@@ -2137,10 +2137,10 @@ Node *LoopLimitNode::Ideal(PhaseGVN *phase, bool can_reshape) {
21372137 ini = init_t ->_lo ;
21382138 max = (julong)max_jint;
21392139 } else {
2140- stride_p = -stride_con;
2140+ stride_p = -(jlong) stride_con;
21412141 lim = init_t ->_hi ;
21422142 ini = limit_t ->_lo ;
2143- max = (julong)min_jint;
2143+ max = (julong)(juint) min_jint; // double cast to get 0x0000000080000000, not 0xffffffff80000000
21442144 }
21452145 julong range = lim - ini + stride_p;
21462146 if (range <= max) {
You can’t perform that action at this time.
0 commit comments