changeset 5887:f826faea93e0

8071731: Better scaling for C1 Reviewed-by: kvn, iveresov
author roland
date Fri, 03 Jul 2015 21:30:02 +0100
parents e22137065c4c
children ecdd49fa23ad
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	Fri Jul 03 16:46:09 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) {