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

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

Issue 1764013002: [turbofan] do not emit 2 operations for int64 add with overflow (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 4 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 | « no previous file | no next file » | 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 <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 672 matching lines...) Expand 10 before | Expand all | Expand 10 after
683 683
684 684
685 void InstructionSelector::VisitInt64Add(Node* node) { 685 void InstructionSelector::VisitInt64Add(Node* node) {
686 VisitBinop(this, node, kX64Add); 686 VisitBinop(this, node, kX64Add);
687 } 687 }
688 688
689 689
690 void InstructionSelector::VisitInt64AddWithOverflow(Node* node) { 690 void InstructionSelector::VisitInt64AddWithOverflow(Node* node) {
691 if (Node* ovf = NodeProperties::FindProjection(node, 1)) { 691 if (Node* ovf = NodeProperties::FindProjection(node, 1)) {
692 FlagsContinuation cont = FlagsContinuation::ForSet(kOverflow, ovf); 692 FlagsContinuation cont = FlagsContinuation::ForSet(kOverflow, ovf);
693 VisitBinop(this, node, kX64Add, &cont); 693 return VisitBinop(this, node, kX64Add, &cont);
694 } 694 }
695 FlagsContinuation cont; 695 FlagsContinuation cont;
696 VisitBinop(this, node, kX64Add, &cont); 696 VisitBinop(this, node, kX64Add, &cont);
697 } 697 }
698 698
699 699
700 void InstructionSelector::VisitInt32Sub(Node* node) { 700 void InstructionSelector::VisitInt32Sub(Node* node) {
701 X64OperandGenerator g(this); 701 X64OperandGenerator g(this);
702 Int32BinopMatcher m(node); 702 Int32BinopMatcher m(node);
703 if (m.left().Is(0)) { 703 if (m.left().Is(0)) {
(...skipping 1224 matching lines...) Expand 10 before | Expand all | Expand 10 after
1928 MachineOperatorBuilder::kFloat64RoundTruncate | 1928 MachineOperatorBuilder::kFloat64RoundTruncate |
1929 MachineOperatorBuilder::kFloat32RoundTiesEven | 1929 MachineOperatorBuilder::kFloat32RoundTiesEven |
1930 MachineOperatorBuilder::kFloat64RoundTiesEven; 1930 MachineOperatorBuilder::kFloat64RoundTiesEven;
1931 } 1931 }
1932 return flags; 1932 return flags;
1933 } 1933 }
1934 1934
1935 } // namespace compiler 1935 } // namespace compiler
1936 } // namespace internal 1936 } // namespace internal
1937 } // namespace v8 1937 } // namespace v8
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698