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

Side by Side Diff: src/compiler/simplified-lowering.cc

Issue 2087803005: [turbofan] Fix bug in CheckTaggedSigned lowering. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 4 years, 6 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 "src/compiler/simplified-lowering.h" 5 #include "src/compiler/simplified-lowering.h"
6 6
7 #include <limits> 7 #include <limits>
8 8
9 #include "src/address-map.h" 9 #include "src/address-map.h"
10 #include "src/base/bits.h" 10 #include "src/base/bits.h"
(...skipping 677 matching lines...) Expand 10 before | Expand all | Expand 10 after
688 DCHECK_EQ(2, node->op()->ValueInputCount()); 688 DCHECK_EQ(2, node->op()->ValueInputCount());
689 return GetUpperBound(node->InputAt(0))->Is(type) && 689 return GetUpperBound(node->InputAt(0))->Is(type) &&
690 GetUpperBound(node->InputAt(1))->Is(type); 690 GetUpperBound(node->InputAt(1))->Is(type);
691 } 691 }
692 692
693 void ConvertInput(Node* node, int index, UseInfo use) { 693 void ConvertInput(Node* node, int index, UseInfo use) {
694 Node* input = node->InputAt(index); 694 Node* input = node->InputAt(index);
695 // In the change phase, insert a change before the use if necessary. 695 // In the change phase, insert a change before the use if necessary.
696 if (use.representation() == MachineRepresentation::kNone) 696 if (use.representation() == MachineRepresentation::kNone)
697 return; // No input requirement on the use. 697 return; // No input requirement on the use.
698 DCHECK_NOT_NULL(input);
698 NodeInfo* input_info = GetInfo(input); 699 NodeInfo* input_info = GetInfo(input);
699 MachineRepresentation input_rep = input_info->representation(); 700 MachineRepresentation input_rep = input_info->representation();
700 if (input_rep != use.representation() || 701 if (input_rep != use.representation() ||
701 use.type_check() != TypeCheckKind::kNone) { 702 use.type_check() != TypeCheckKind::kNone) {
702 // Output representation doesn't match usage. 703 // Output representation doesn't match usage.
703 TRACE(" change: #%d:%s(@%d #%d:%s) ", node->id(), node->op()->mnemonic(), 704 TRACE(" change: #%d:%s(@%d #%d:%s) ", node->id(), node->op()->mnemonic(),
704 index, input->id(), input->op()->mnemonic()); 705 index, input->id(), input->op()->mnemonic());
705 TRACE(" from "); 706 TRACE(" from ");
706 PrintOutputInfo(input_info); 707 PrintOutputInfo(input_info);
707 TRACE(" to "); 708 TRACE(" to ");
(...skipping 963 matching lines...) Expand 10 before | Expand all | Expand 10 after
1671 DeferReplacement(node, node->InputAt(0)); 1672 DeferReplacement(node, node->InputAt(0));
1672 } 1673 }
1673 } 1674 }
1674 return; 1675 return;
1675 } 1676 }
1676 case IrOpcode::kCheckTaggedSigned: { 1677 case IrOpcode::kCheckTaggedSigned: {
1677 if (SmiValuesAre32Bits() && truncation.TruncatesToWord32()) { 1678 if (SmiValuesAre32Bits() && truncation.TruncatesToWord32()) {
1678 // TODO(jarin,bmeurer): Add CheckedSignedSmallAsWord32? 1679 // TODO(jarin,bmeurer): Add CheckedSignedSmallAsWord32?
1679 VisitUnop(node, UseInfo::CheckedSigned32AsWord32(), 1680 VisitUnop(node, UseInfo::CheckedSigned32AsWord32(),
1680 MachineRepresentation::kWord32); 1681 MachineRepresentation::kWord32);
1681 DeferReplacement(node, node->InputAt(0)); 1682 if (lower()) DeferReplacement(node, node->InputAt(0));
1682 } else { 1683 } else {
1683 VisitUnop(node, UseInfo::AnyTagged(), MachineRepresentation::kTagged); 1684 VisitUnop(node, UseInfo::AnyTagged(), MachineRepresentation::kTagged);
1684 if (lower()) { 1685 if (lower()) {
1685 if (InputIs(node, Type::TaggedSigned())) { 1686 if (InputIs(node, Type::TaggedSigned())) {
1686 DeferReplacement(node, node->InputAt(0)); 1687 DeferReplacement(node, node->InputAt(0));
1687 } 1688 }
1688 } 1689 }
1689 } 1690 }
1690 return; 1691 return;
1691 } 1692 }
(...skipping 1367 matching lines...) Expand 10 before | Expand all | Expand 10 after
3059 isolate(), graph()->zone(), callable.descriptor(), 0, flags, 3060 isolate(), graph()->zone(), callable.descriptor(), 0, flags,
3060 Operator::kNoProperties); 3061 Operator::kNoProperties);
3061 to_number_operator_.set(common()->Call(desc)); 3062 to_number_operator_.set(common()->Call(desc));
3062 } 3063 }
3063 return to_number_operator_.get(); 3064 return to_number_operator_.get();
3064 } 3065 }
3065 3066
3066 } // namespace compiler 3067 } // namespace compiler
3067 } // namespace internal 3068 } // namespace internal
3068 } // namespace v8 3069 } // 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