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

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

Issue 1350223006: binary-operator-reducer: reduce mul+div(shift) (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: TruncateInt64ToFloat64 Created 5 years, 2 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
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 <algorithm> 5 #include <algorithm>
6 6
7 #include "src/base/adapters.h" 7 #include "src/base/adapters.h"
8 #include "src/compiler/instruction-selector-impl.h" 8 #include "src/compiler/instruction-selector-impl.h"
9 #include "src/compiler/node-matchers.h" 9 #include "src/compiler/node-matchers.h"
10 #include "src/compiler/node-properties.h" 10 #include "src/compiler/node-properties.h"
(...skipping 888 matching lines...) Expand 10 before | Expand all | Expand 10 after
899 break; 899 break;
900 } 900 }
901 default: 901 default:
902 break; 902 break;
903 } 903 }
904 } 904 }
905 Emit(kX64Movl, g.DefineAsRegister(node), g.Use(value)); 905 Emit(kX64Movl, g.DefineAsRegister(node), g.Use(value));
906 } 906 }
907 907
908 908
909 void InstructionSelector::VisitTruncateInt64ToFloat64(Node* node) {
910 X64OperandGenerator g(this);
911 Emit(kSSEInt64ToFloat64, g.DefineAsRegister(node), g.Use(node->InputAt(0)));
912 }
913
914
909 void InstructionSelector::VisitFloat32Add(Node* node) { 915 void InstructionSelector::VisitFloat32Add(Node* node) {
910 VisitFloatBinop(this, node, kAVXFloat32Add, kSSEFloat32Add); 916 VisitFloatBinop(this, node, kAVXFloat32Add, kSSEFloat32Add);
911 } 917 }
912 918
913 919
914 void InstructionSelector::VisitFloat32Sub(Node* node) { 920 void InstructionSelector::VisitFloat32Sub(Node* node) {
915 X64OperandGenerator g(this); 921 X64OperandGenerator g(this);
916 Float32BinopMatcher m(node); 922 Float32BinopMatcher m(node);
917 if (m.left().IsMinusZero()) { 923 if (m.left().IsMinusZero()) {
918 VisitFloatUnop(this, node, m.right().node(), kAVXFloat32Neg, 924 VisitFloatUnop(this, node, m.right().node(), kAVXFloat32Neg,
(...skipping 765 matching lines...) Expand 10 before | Expand all | Expand 10 after
1684 if (CpuFeatures::IsSupported(SSE4_1)) { 1690 if (CpuFeatures::IsSupported(SSE4_1)) {
1685 flags |= MachineOperatorBuilder::kFloat64RoundDown | 1691 flags |= MachineOperatorBuilder::kFloat64RoundDown |
1686 MachineOperatorBuilder::kFloat64RoundTruncate; 1692 MachineOperatorBuilder::kFloat64RoundTruncate;
1687 } 1693 }
1688 return flags; 1694 return flags;
1689 } 1695 }
1690 1696
1691 } // namespace compiler 1697 } // namespace compiler
1692 } // namespace internal 1698 } // namespace internal
1693 } // namespace v8 1699 } // namespace v8
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698