Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(98)

Unified Diff: src/compiler/arm64/instruction-selector-arm64.cc

Issue 1433353006: [machine-operator-reducer] fix float truncation (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: arm64: do not merge 64bit shr/sar with 32bit op Created 5 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | src/compiler/opcodes.h » ('j') | src/compiler/opcodes.cc » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/compiler/arm64/instruction-selector-arm64.cc
diff --git a/src/compiler/arm64/instruction-selector-arm64.cc b/src/compiler/arm64/instruction-selector-arm64.cc
index 3149566a56f8fafd632c75ef29a55941e666fcee..45ce9175362e52139828867cacf15cca683268fd 100644
--- a/src/compiler/arm64/instruction-selector-arm64.cc
+++ b/src/compiler/arm64/instruction-selector-arm64.cc
@@ -148,17 +148,23 @@ bool TryMatchAnyShift(InstructionSelector* selector, Node* node,
if (input_node->InputCount() != 2) return false;
if (!g.IsIntegerConstant(input_node->InputAt(1))) return false;
+ // Shift right can't be grouped with 32-bit operation, because the data
+ // will be lost.
+ bool is_word_output = !IrOpcode::Is64(node->opcode());
titzer 2015/11/13 23:35:17 Can you move this condition inline (so that it is
fedor.indutny 2015/11/14 00:15:52 Acknowledged.
+
switch (input_node->opcode()) {
case IrOpcode::kWord32Shl:
case IrOpcode::kWord64Shl:
*opcode |= AddressingModeField::encode(kMode_Operand2_R_LSL_I);
return true;
- case IrOpcode::kWord32Shr:
case IrOpcode::kWord64Shr:
+ if (is_word_output) return false;
+ case IrOpcode::kWord32Shr:
*opcode |= AddressingModeField::encode(kMode_Operand2_R_LSR_I);
return true;
- case IrOpcode::kWord32Sar:
case IrOpcode::kWord64Sar:
+ if (is_word_output) return false;
+ case IrOpcode::kWord32Sar:
*opcode |= AddressingModeField::encode(kMode_Operand2_R_ASR_I);
return true;
case IrOpcode::kWord32Ror:
« no previous file with comments | « no previous file | src/compiler/opcodes.h » ('j') | src/compiler/opcodes.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698