Chromium Code Reviews| Index: src/hydrogen.cc |
| diff --git a/src/hydrogen.cc b/src/hydrogen.cc |
| index 09e3fe9c47310195bc269cc6fa55da7dd9c44acf..3c439825f4103d4041f0bdf2971e29da0321cf76 100644 |
| --- a/src/hydrogen.cc |
| +++ b/src/hydrogen.cc |
| @@ -3852,7 +3852,8 @@ bool Uint32Analysis::CheckPhiOperands(HPhi* phi) { |
| if (!operand->CheckFlag(HInstruction::kUint32)) { |
| // Lazyly mark constants that fit into uint32 range with kUint32 flag. |
| if (operand->IsConstant() && |
| - HConstant::cast(operand)->IsUint32()) { |
| + HConstant::cast(operand)->HasInteger32Value() && |
| + HConstant::cast(operand)->Integer32Value() >= 0) { |
|
Sven Panne
2013/04/18 09:46:23
operand->IsInteger32Constant() && operarand->GetIn
|
| operand->SetFlag(HInstruction::kUint32); |
| continue; |
| } |
| @@ -8622,9 +8623,7 @@ bool HOptimizedGraphBuilder::TryInlineBuiltinMethodCall( |
| } else if (exponent == 2.0) { |
| result = HMul::New(zone(), context, left, left); |
| } |
| - } else if (right->IsConstant() && |
| - HConstant::cast(right)->HasInteger32Value() && |
| - HConstant::cast(right)->Integer32Value() == 2) { |
| + } else if (right->EqualsInteger32Constant(2)) { |
| result = HMul::New(zone(), context, left, left); |
| } |