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 d5f066b78b9d283d3140a1ee1999cc5903848c3b..7e47632d4f39177459c0f94607402a0ea6c03c3c 100644 |
--- a/src/compiler/arm64/instruction-selector-arm64.cc |
+++ b/src/compiler/arm64/instruction-selector-arm64.cc |
@@ -1237,8 +1237,20 @@ void InstructionSelector::VisitChangeFloat64ToUint32(Node* node) { |
} |
-void InstructionSelector::VisitTruncateFloat32ToInt64(Node* node) { |
- VisitRR(this, kArm64Float32ToInt64, node); |
+void InstructionSelector::VisitTryTruncateFloat32ToInt64(Node* node) { |
+ Arm64OperandGenerator g(this); |
+ |
+ InstructionOperand inputs[] = {g.UseRegister(node->InputAt(0))}; |
+ InstructionOperand outputs[2]; |
+ size_t output_count = 0; |
+ outputs[output_count++] = g.DefineAsRegister(node); |
+ |
+ Node* success_output = NodeProperties::FindProjection(node, 1); |
+ if (success_output) { |
+ outputs[output_count++] = g.DefineAsRegister(success_output); |
+ } |
+ |
+ Emit(kArm64Float32ToInt64, output_count, outputs, 1, inputs); |
} |