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

Side by Side Diff: src/compiler/arm64/instruction-selector-arm64.cc

Issue 1013743006: [turbofan][arm64] Match fneg for -0.0 - x pattern. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 5 years, 9 months 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 unified diff | Download patch
« no previous file with comments | « src/compiler/arm64/instruction-codes-arm64.h ('k') | src/compiler/instruction-codes.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2014 the V8 project authors. All rights reserved. 1 // Copyright 2014 the V8 project authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "src/compiler/instruction-selector-impl.h" 5 #include "src/compiler/instruction-selector-impl.h"
6 #include "src/compiler/node-matchers.h" 6 #include "src/compiler/node-matchers.h"
7 #include "src/compiler/node-properties.h" 7 #include "src/compiler/node-properties.h"
8 8
9 namespace v8 { 9 namespace v8 {
10 namespace internal { 10 namespace internal {
(...skipping 1051 matching lines...) Expand 10 before | Expand all | Expand 10 after
1062 1062
1063 1063
1064 void InstructionSelector::VisitFloat64Add(Node* node) { 1064 void InstructionSelector::VisitFloat64Add(Node* node) {
1065 VisitRRRFloat64(this, kArm64Float64Add, node); 1065 VisitRRRFloat64(this, kArm64Float64Add, node);
1066 } 1066 }
1067 1067
1068 1068
1069 void InstructionSelector::VisitFloat64Sub(Node* node) { 1069 void InstructionSelector::VisitFloat64Sub(Node* node) {
1070 Arm64OperandGenerator g(this); 1070 Arm64OperandGenerator g(this);
1071 Float64BinopMatcher m(node); 1071 Float64BinopMatcher m(node);
1072 if (m.left().IsMinusZero() && m.right().IsFloat64RoundDown() && 1072 if (m.left().IsMinusZero()) {
1073 CanCover(m.node(), m.right().node())) { 1073 if (m.right().IsFloat64RoundDown() &&
1074 if (m.right().InputAt(0)->opcode() == IrOpcode::kFloat64Sub && 1074 CanCover(m.node(), m.right().node())) {
1075 CanCover(m.right().node(), m.right().InputAt(0))) { 1075 if (m.right().InputAt(0)->opcode() == IrOpcode::kFloat64Sub &&
1076 Float64BinopMatcher mright0(m.right().InputAt(0)); 1076 CanCover(m.right().node(), m.right().InputAt(0))) {
1077 if (mright0.left().IsMinusZero()) { 1077 Float64BinopMatcher mright0(m.right().InputAt(0));
1078 Emit(kArm64Float64RoundUp, g.DefineAsRegister(node), 1078 if (mright0.left().IsMinusZero()) {
1079 g.UseRegister(mright0.right().node())); 1079 Emit(kArm64Float64RoundUp, g.DefineAsRegister(node),
1080 return; 1080 g.UseRegister(mright0.right().node()));
1081 return;
1082 }
1081 } 1083 }
1082 } 1084 }
1085 Emit(kArm64Float64Neg, g.DefineAsRegister(node),
1086 g.UseRegister(m.right().node()));
1087 return;
1083 } 1088 }
1084 VisitRRRFloat64(this, kArm64Float64Sub, node); 1089 VisitRRRFloat64(this, kArm64Float64Sub, node);
1085 } 1090 }
1086 1091
1087 1092
1088 void InstructionSelector::VisitFloat64Mul(Node* node) { 1093 void InstructionSelector::VisitFloat64Mul(Node* node) {
1089 VisitRRRFloat64(this, kArm64Float64Mul, node); 1094 VisitRRRFloat64(this, kArm64Float64Mul, node);
1090 } 1095 }
1091 1096
1092 1097
(...skipping 566 matching lines...) Expand 10 before | Expand all | Expand 10 after
1659 MachineOperatorBuilder::kFloat64Max | 1664 MachineOperatorBuilder::kFloat64Max |
1660 MachineOperatorBuilder::kFloat64Min | 1665 MachineOperatorBuilder::kFloat64Min |
1661 MachineOperatorBuilder::kWord32ShiftIsSafe | 1666 MachineOperatorBuilder::kWord32ShiftIsSafe |
1662 MachineOperatorBuilder::kInt32DivIsSafe | 1667 MachineOperatorBuilder::kInt32DivIsSafe |
1663 MachineOperatorBuilder::kUint32DivIsSafe; 1668 MachineOperatorBuilder::kUint32DivIsSafe;
1664 } 1669 }
1665 1670
1666 } // namespace compiler 1671 } // namespace compiler
1667 } // namespace internal 1672 } // namespace internal
1668 } // namespace v8 1673 } // namespace v8
OLDNEW
« no previous file with comments | « src/compiler/arm64/instruction-codes-arm64.h ('k') | src/compiler/instruction-codes.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698