Index: src/compiler/instruction-selector.cc |
diff --git a/src/compiler/instruction-selector.cc b/src/compiler/instruction-selector.cc |
index 3447c9408aa62f7e0373021f44cd2358a781dc49..8f774f7aae24708a62bc0fdd3faeb865e27ff81c 100644 |
--- a/src/compiler/instruction-selector.cc |
+++ b/src/compiler/instruction-selector.cc |
@@ -508,6 +508,9 @@ void InstructionSelector::VisitControl(BasicBlock* block) { |
CheckNoPhis(tbranch); |
CheckNoPhis(fbranch); |
if (tbranch == fbranch) return VisitGoto(tbranch); |
+ // Treat special Branch(Always, IfTrue, IfFalse) as Goto(IfTrue). |
+ Node* const condition = input->InputAt(0); |
+ if (condition->opcode() == IrOpcode::kAlways) return VisitGoto(tbranch); |
return VisitBranch(input, tbranch, fbranch); |
} |
case BasicBlock::kReturn: { |
@@ -541,8 +544,8 @@ MachineType InstructionSelector::GetMachineType(Node* node) { |
case IrOpcode::kIfTrue: |
case IrOpcode::kIfFalse: |
case IrOpcode::kEffectPhi: |
+ case IrOpcode::kEffectSet: |
case IrOpcode::kMerge: |
- case IrOpcode::kTerminate: |
// No code needed for these graph artifacts. |
return kMachNone; |
case IrOpcode::kFinish: |