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

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

Issue 1041633002: Revert of [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, 8 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()) { 1072 if (m.left().IsMinusZero() && m.right().IsFloat64RoundDown() &&
1073 if (m.right().IsFloat64RoundDown() && 1073 CanCover(m.node(), m.right().node())) {
1074 CanCover(m.node(), m.right().node())) { 1074 if (m.right().InputAt(0)->opcode() == IrOpcode::kFloat64Sub &&
1075 if (m.right().InputAt(0)->opcode() == IrOpcode::kFloat64Sub && 1075 CanCover(m.right().node(), m.right().InputAt(0))) {
1076 CanCover(m.right().node(), m.right().InputAt(0))) { 1076 Float64BinopMatcher mright0(m.right().InputAt(0));
1077 Float64BinopMatcher mright0(m.right().InputAt(0)); 1077 if (mright0.left().IsMinusZero()) {
1078 if (mright0.left().IsMinusZero()) { 1078 Emit(kArm64Float64RoundUp, g.DefineAsRegister(node),
1079 Emit(kArm64Float64RoundUp, g.DefineAsRegister(node), 1079 g.UseRegister(mright0.right().node()));
1080 g.UseRegister(mright0.right().node())); 1080 return;
1081 return;
1082 }
1083 } 1081 }
1084 } 1082 }
1085 Emit(kArm64Float64Neg, g.DefineAsRegister(node),
1086 g.UseRegister(m.right().node()));
1087 return;
1088 } 1083 }
1089 VisitRRRFloat64(this, kArm64Float64Sub, node); 1084 VisitRRRFloat64(this, kArm64Float64Sub, node);
1090 } 1085 }
1091 1086
1092 1087
1093 void InstructionSelector::VisitFloat64Mul(Node* node) { 1088 void InstructionSelector::VisitFloat64Mul(Node* node) {
1094 VisitRRRFloat64(this, kArm64Float64Mul, node); 1089 VisitRRRFloat64(this, kArm64Float64Mul, node);
1095 } 1090 }
1096 1091
1097 1092
(...skipping 566 matching lines...) Expand 10 before | Expand all | Expand 10 after
1664 MachineOperatorBuilder::kFloat64Max | 1659 MachineOperatorBuilder::kFloat64Max |
1665 MachineOperatorBuilder::kFloat64Min | 1660 MachineOperatorBuilder::kFloat64Min |
1666 MachineOperatorBuilder::kWord32ShiftIsSafe | 1661 MachineOperatorBuilder::kWord32ShiftIsSafe |
1667 MachineOperatorBuilder::kInt32DivIsSafe | 1662 MachineOperatorBuilder::kInt32DivIsSafe |
1668 MachineOperatorBuilder::kUint32DivIsSafe; 1663 MachineOperatorBuilder::kUint32DivIsSafe;
1669 } 1664 }
1670 1665
1671 } // namespace compiler 1666 } // namespace compiler
1672 } // namespace internal 1667 } // namespace internal
1673 } // namespace v8 1668 } // 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