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

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

Issue 2962503002: [turbofan] Fix an assertion in representation selection for BooleanNot. (Closed)
Patch Set: Relax the check even more. Created 3 years, 5 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 | test/mjsunit/compiler/regress-736567.js » ('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/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 1551 matching lines...) Expand 10 before | Expand all | Expand 10 after
1562 NodeInfo* input_info = GetInfo(node->InputAt(0)); 1562 NodeInfo* input_info = GetInfo(node->InputAt(0));
1563 if (input_info->representation() == MachineRepresentation::kBit) { 1563 if (input_info->representation() == MachineRepresentation::kBit) {
1564 // BooleanNot(x: kRepBit) => Word32Equal(x, #0) 1564 // BooleanNot(x: kRepBit) => Word32Equal(x, #0)
1565 node->AppendInput(jsgraph_->zone(), jsgraph_->Int32Constant(0)); 1565 node->AppendInput(jsgraph_->zone(), jsgraph_->Int32Constant(0));
1566 NodeProperties::ChangeOp(node, lowering->machine()->Word32Equal()); 1566 NodeProperties::ChangeOp(node, lowering->machine()->Word32Equal());
1567 } else if (CanBeTaggedPointer(input_info->representation())) { 1567 } else if (CanBeTaggedPointer(input_info->representation())) {
1568 // BooleanNot(x: kRepTagged) => WordEqual(x, #false) 1568 // BooleanNot(x: kRepTagged) => WordEqual(x, #false)
1569 node->AppendInput(jsgraph_->zone(), jsgraph_->FalseConstant()); 1569 node->AppendInput(jsgraph_->zone(), jsgraph_->FalseConstant());
1570 NodeProperties::ChangeOp(node, lowering->machine()->WordEqual()); 1570 NodeProperties::ChangeOp(node, lowering->machine()->WordEqual());
1571 } else { 1571 } else {
1572 DCHECK_EQ(MachineRepresentation::kNone, 1572 DCHECK(!TypeOf(node->InputAt(0))->IsInhabited());
1573 input_info->representation());
1574 DeferReplacement(node, lowering->jsgraph()->Int32Constant(0)); 1573 DeferReplacement(node, lowering->jsgraph()->Int32Constant(0));
1575 } 1574 }
1576 } else { 1575 } else {
1577 // No input representation requirement; adapt during lowering. 1576 // No input representation requirement; adapt during lowering.
1578 ProcessInput(node, 0, UseInfo::AnyTruncatingToBool()); 1577 ProcessInput(node, 0, UseInfo::AnyTruncatingToBool());
1579 SetOutput(node, MachineRepresentation::kBit); 1578 SetOutput(node, MachineRepresentation::kBit);
1580 } 1579 }
1581 return; 1580 return;
1582 } 1581 }
1583 case IrOpcode::kNumberEqual: { 1582 case IrOpcode::kNumberEqual: {
(...skipping 2163 matching lines...) Expand 10 before | Expand all | Expand 10 after
3747 isolate(), graph()->zone(), callable.descriptor(), 0, flags, 3746 isolate(), graph()->zone(), callable.descriptor(), 0, flags,
3748 Operator::kNoProperties); 3747 Operator::kNoProperties);
3749 to_number_operator_.set(common()->Call(desc)); 3748 to_number_operator_.set(common()->Call(desc));
3750 } 3749 }
3751 return to_number_operator_.get(); 3750 return to_number_operator_.get();
3752 } 3751 }
3753 3752
3754 } // namespace compiler 3753 } // namespace compiler
3755 } // namespace internal 3754 } // namespace internal
3756 } // namespace v8 3755 } // namespace v8
OLDNEW
« no previous file with comments | « no previous file | test/mjsunit/compiler/regress-736567.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698