Index: src/x64/lithium-x64.cc |
diff --git a/src/x64/lithium-x64.cc b/src/x64/lithium-x64.cc |
index 281589e32cc7f42f7992369df3755281b5a542dd..eec55972ffe73da2fa956cdf7c4271bd303d4072 100644 |
--- a/src/x64/lithium-x64.cc |
+++ b/src/x64/lithium-x64.cc |
@@ -2339,8 +2339,12 @@ LInstruction* LChunkBuilder::DoStoreNamedGeneric(HStoreNamedGeneric* instr) { |
LInstruction* LChunkBuilder::DoStringAdd(HStringAdd* instr) { |
LOperand* context = UseFixed(instr->context(), rsi); |
- LOperand* left = UseOrConstantAtStart(instr->left()); |
- LOperand* right = UseOrConstantAtStart(instr->right()); |
+ LOperand* left = FLAG_new_string_add |
+ ? UseFixed(instr->left(), rdx) |
+ : UseOrConstantAtStart(instr->left()); |
+ LOperand* right = FLAG_new_string_add |
+ ? UseFixed(instr->right(), rax) |
+ : UseOrConstantAtStart(instr->right()); |
return MarkAsCall( |
DefineFixed(new(zone()) LStringAdd(context, left, right), rax), instr); |
} |