| Index: src/hydrogen-instructions.cc
|
| diff --git a/src/hydrogen-instructions.cc b/src/hydrogen-instructions.cc
|
| index 968bf48075c58acb9ced8232fbe745ff851166b7..c873c092fdd7ae50619a8a60f1f1d4f4e87fc733 100644
|
| --- a/src/hydrogen-instructions.cc
|
| +++ b/src/hydrogen-instructions.cc
|
| @@ -3635,10 +3635,10 @@ void HPhi::SimplifyConstantInputs() {
|
| Representation::Integer32());
|
| integer_input->InsertAfter(operand);
|
| SetOperandAt(i, integer_input);
|
| - } else if (operand == graph->GetConstantTrue()) {
|
| - SetOperandAt(i, graph->GetConstant1());
|
| - } else {
|
| - // This catches |false|, |undefined|, strings and objects.
|
| + } else if (operand->HasBooleanValue()) {
|
| + SetOperandAt(i, operand->BooleanValue() ? graph->GetConstant1()
|
| + : graph->GetConstant0());
|
| + } else if (operand->ImmortalImmovable()) {
|
| SetOperandAt(i, graph->GetConstant0());
|
| }
|
| }
|
|
|