// Finish.
-typedef InstructionSelectorTestWithParam<MachineType>
- InstructionSelectorFinishTest;
-
-
-TARGET_TEST_P(InstructionSelectorFinishTest, Parameter) {
- const MachineType type = GetParam();
- StreamBuilder m(this, type, type);
+TARGET_TEST_F(InstructionSelectorTest, Parameter) {
+ StreamBuilder m(this, kMachAnyTagged, kMachAnyTagged);
Node* param = m.Parameter(0);
Node* finish = m.NewNode(m.common()->Finish(1), param, m.graph()->start());
m.Return(finish);
}
-TARGET_TEST_P(InstructionSelectorFinishTest, PropagateDoubleness) {
- const MachineType type = GetParam();
- StreamBuilder m(this, type, type);
- Node* param = m.Parameter(0);
- Node* finish = m.NewNode(m.common()->Finish(1), param, m.graph()->start());
- m.Return(finish);
- Stream s = m.Build(kAllInstructions);
- EXPECT_EQ(s.IsDouble(param->id()), s.IsDouble(finish->id()));
-}
-
-
-TARGET_TEST_P(InstructionSelectorFinishTest, PropagateReferenceness) {
- const MachineType type = GetParam();
- StreamBuilder m(this, type, type);
- Node* param = m.Parameter(0);
- Node* finish = m.NewNode(m.common()->Finish(1), param, m.graph()->start());
- m.Return(finish);
- Stream s = m.Build(kAllInstructions);
- EXPECT_EQ(s.IsReference(param->id()), s.IsReference(finish->id()));
-}
-
-
-INSTANTIATE_TEST_CASE_P(InstructionSelectorTest, InstructionSelectorFinishTest,
- ::testing::Values(kMachFloat64, kMachInt8, kMachUint8,
- kMachInt16, kMachUint16, kMachInt32,
- kMachUint32, kMachInt64, kMachUint64,
- kMachPtr, kMachAnyTagged));
-
-
// -----------------------------------------------------------------------------
-// Finish.
+// Phi.
typedef InstructionSelectorTestWithParam<MachineType>
DCHECK(!IsReference(node));
sequence()->MarkAsDouble(node->id());
- // Propagate "doubleness" throughout Finish/Phi nodes.
+ // Propagate "doubleness" throughout Phi nodes.
for (UseIter i = node->uses().begin(); i != node->uses().end(); ++i) {
Node* user = *i;
switch (user->opcode()) {
- case IrOpcode::kFinish:
case IrOpcode::kPhi:
if (IsDouble(user)) continue;
MarkAsDouble(user);
DCHECK(!IsDouble(node));
sequence()->MarkAsReference(node->id());
- // Propagate "referenceness" throughout Finish/Phi nodes.
+ // Propagate "referenceness" throughout Phi nodes.
for (UseIter i = node->uses().begin(); i != node->uses().end(); ++i) {
Node* user = *i;
switch (user->opcode()) {
- case IrOpcode::kFinish:
case IrOpcode::kPhi:
if (IsReference(user)) continue;
MarkAsReference(user);
// No code needed for these graph artifacts.
return;
case IrOpcode::kFinish:
- return VisitFinish(node);
+ return MarkAsReference(node), VisitFinish(node);
case IrOpcode::kParameter: {
LinkageLocation location =
linkage()->GetParameterLocation(OpParameter<int>(node));