1.1 --- a/src/share/vm/c1/c1_LIRGenerator.cpp Thu Feb 27 05:40:59 2020 +0000 1.2 +++ b/src/share/vm/c1/c1_LIRGenerator.cpp Thu Feb 27 05:58:53 2020 +0000 1.3 @@ -539,11 +539,11 @@ 1.4 1.5 case Bytecodes::_imul: 1.6 { 1.7 - bool did_strength_reduce = false; 1.8 + bool did_strength_reduce = false; 1.9 1.10 if (right->is_constant()) { 1.11 - int c = right->as_jint(); 1.12 - if (is_power_of_2(c)) { 1.13 + jint c = right->as_jint(); 1.14 + if (c > 0 && is_power_of_2(c)) { 1.15 // do not need tmp here 1.16 __ shift_left(left_op, exact_log2(c), result_op); 1.17 did_strength_reduce = true;