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

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

Issue 2220973002: [turbofan] Remove the FloatXXSubPreserveNan operators. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Reintroduce an optimization for arm. Created 4 years, 4 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-selector-arm64.cc ('k') | src/compiler/instruction-selector.cc » ('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/base/adapters.h" 5 #include "src/base/adapters.h"
6 #include "src/compiler/instruction-selector-impl.h" 6 #include "src/compiler/instruction-selector-impl.h"
7 #include "src/compiler/node-matchers.h" 7 #include "src/compiler/node-matchers.h"
8 #include "src/compiler/node-properties.h" 8 #include "src/compiler/node-properties.h"
9 9
10 namespace v8 { 10 namespace v8 {
(...skipping 911 matching lines...) Expand 10 before | Expand all | Expand 10 after
922 VisitRROFloat(this, node, kAVXFloat32Add, kSSEFloat32Add); 922 VisitRROFloat(this, node, kAVXFloat32Add, kSSEFloat32Add);
923 } 923 }
924 924
925 925
926 void InstructionSelector::VisitFloat64Add(Node* node) { 926 void InstructionSelector::VisitFloat64Add(Node* node) {
927 VisitRROFloat(this, node, kAVXFloat64Add, kSSEFloat64Add); 927 VisitRROFloat(this, node, kAVXFloat64Add, kSSEFloat64Add);
928 } 928 }
929 929
930 930
931 void InstructionSelector::VisitFloat32Sub(Node* node) { 931 void InstructionSelector::VisitFloat32Sub(Node* node) {
932 IA32OperandGenerator g(this);
933 Float32BinopMatcher m(node);
934 if (m.left().IsMinusZero()) {
935 VisitFloatUnop(this, node, m.right().node(), kAVXFloat32Neg,
936 kSSEFloat32Neg);
937 return;
938 }
939 VisitRROFloat(this, node, kAVXFloat32Sub, kSSEFloat32Sub);
940 }
941
942 void InstructionSelector::VisitFloat32SubPreserveNan(Node* node) {
943 VisitRROFloat(this, node, kAVXFloat32Sub, kSSEFloat32Sub); 932 VisitRROFloat(this, node, kAVXFloat32Sub, kSSEFloat32Sub);
944 } 933 }
945 934
946 void InstructionSelector::VisitFloat64Sub(Node* node) { 935 void InstructionSelector::VisitFloat64Sub(Node* node) {
947 IA32OperandGenerator g(this);
948 Float64BinopMatcher m(node);
949 if (m.left().IsMinusZero()) {
950 if (m.right().IsFloat64RoundDown() &&
951 CanCover(m.node(), m.right().node())) {
952 if (m.right().InputAt(0)->opcode() == IrOpcode::kFloat64Sub &&
953 CanCover(m.right().node(), m.right().InputAt(0))) {
954 Float64BinopMatcher mright0(m.right().InputAt(0));
955 if (mright0.left().IsMinusZero()) {
956 Emit(kSSEFloat64Round | MiscField::encode(kRoundUp),
957 g.DefineAsRegister(node), g.UseRegister(mright0.right().node()));
958 return;
959 }
960 }
961 }
962 VisitFloatUnop(this, node, m.right().node(), kAVXFloat64Neg,
963 kSSEFloat64Neg);
964 return;
965 }
966 VisitRROFloat(this, node, kAVXFloat64Sub, kSSEFloat64Sub); 936 VisitRROFloat(this, node, kAVXFloat64Sub, kSSEFloat64Sub);
967 } 937 }
968 938
969 void InstructionSelector::VisitFloat64SubPreserveNan(Node* node) {
970 VisitRROFloat(this, node, kAVXFloat64Sub, kSSEFloat64Sub);
971 }
972
973 void InstructionSelector::VisitFloat32Mul(Node* node) { 939 void InstructionSelector::VisitFloat32Mul(Node* node) {
974 VisitRROFloat(this, node, kAVXFloat32Mul, kSSEFloat32Mul); 940 VisitRROFloat(this, node, kAVXFloat32Mul, kSSEFloat32Mul);
975 } 941 }
976 942
977 943
978 void InstructionSelector::VisitFloat64Mul(Node* node) { 944 void InstructionSelector::VisitFloat64Mul(Node* node) {
979 VisitRROFloat(this, node, kAVXFloat64Mul, kSSEFloat64Mul); 945 VisitRROFloat(this, node, kAVXFloat64Mul, kSSEFloat64Mul);
980 } 946 }
981 947
982 948
(...skipping 742 matching lines...) Expand 10 before | Expand all | Expand 10 after
1725 // static 1691 // static
1726 MachineOperatorBuilder::AlignmentRequirements 1692 MachineOperatorBuilder::AlignmentRequirements
1727 InstructionSelector::AlignmentRequirements() { 1693 InstructionSelector::AlignmentRequirements() {
1728 return MachineOperatorBuilder::AlignmentRequirements:: 1694 return MachineOperatorBuilder::AlignmentRequirements::
1729 FullUnalignedAccessSupport(); 1695 FullUnalignedAccessSupport();
1730 } 1696 }
1731 1697
1732 } // namespace compiler 1698 } // namespace compiler
1733 } // namespace internal 1699 } // namespace internal
1734 } // namespace v8 1700 } // namespace v8
OLDNEW
« no previous file with comments | « src/compiler/arm64/instruction-selector-arm64.cc ('k') | src/compiler/instruction-selector.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698