Index: src/hydrogen-instructions.cc |
diff --git a/src/hydrogen-instructions.cc b/src/hydrogen-instructions.cc |
index 22a7586a9996047708ae5c69edd242cc3839f550..495a435f9ef2bb8ec59e52b298cad2b8d8b3dc70 100644 |
--- a/src/hydrogen-instructions.cc |
+++ b/src/hydrogen-instructions.cc |
@@ -3303,6 +3303,21 @@ void HCompareHoleAndBranch::InferRepresentation( |
} |
+bool HCompareNumericAndBranch::KnownSuccessorBlock(HBasicBlock** block) { |
+ if (left() == right() && |
+ left()->representation().IsSmiOrInteger32()) { |
+ *block = (token() == Token::EQ || |
+ token() == Token::EQ_STRICT || |
+ token() == Token::LTE || |
+ token() == Token::GTE) |
+ ? FirstSuccessor() : SecondSuccessor(); |
+ return true; |
+ } |
+ *block = NULL; |
+ return false; |
+} |
+ |
+ |
bool HCompareMinusZeroAndBranch::KnownSuccessorBlock(HBasicBlock** block) { |
if (FLAG_fold_constants && value()->IsConstant()) { |
HConstant* constant = HConstant::cast(value()); |