changeset 5842:f9edc77edd3c

8071731: Better scaling for C1 Reviewed-by: kvn, iveresov
author roland
date Fri, 03 Jul 2015 21:30:02 +0100
parents 73fd325ff54e
children d095415c0700
files src/share/vm/c1/c1_LIRGenerator.cpp
diffstat 1 files changed, 9 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- 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) {