# HG changeset patch # User roland # Date 1435955402 -3600 # Node ID f9edc77edd3c3e4821ee7229a49907c458558a73 # Parent 73fd325ff54e6a83623f55e31d7ba27016197956 8071731: Better scaling for C1 Reviewed-by: kvn, iveresov diff -r 73fd325ff54e -r f9edc77edd3c src/share/vm/c1/c1_LIRGenerator.cpp --- a/src/share/vm/c1/c1_LIRGenerator.cpp Sat Jul 18 00:45:31 2015 +0100 +++ b/src/share/vm/c1/c1_LIRGenerator.cpp Fri Jul 03 21:30:02 2015 +0100 @@ -2154,7 +2154,15 @@ #ifdef _LP64 } #endif - __ shift_left(index_op, log2_scale, index_op); + LIR_Opr tmp = new_pointer_register(); + if (TwoOperandLIRForm) { + __ move(index_op, tmp); + index_op = tmp; + } + __ shift_left(index_op, log2_scale, tmp); + if (!TwoOperandLIRForm) { + index_op = tmp; + } } #ifdef _LP64 else if(!index_op->is_illegal() && index_op->type() == T_INT) {