Crankshaft: Fix error in range analysis of compare operations.

Review URL: http://codereview.chromium.org/6658035

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@7130 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
This commit is contained in:
whesse@chromium.org 2011-03-10 13:34:56 +00:00
parent fc8f77e398
commit 7175dc09ef

View File

@ -900,13 +900,15 @@ void HRangeAnalysis::InferControlFlowRange(HTest* test, HBasicBlock* dest) {
ASSERT((test->FirstSuccessor() == dest) == (test->SecondSuccessor() != dest));
if (test->value()->IsCompare()) {
HCompare* compare = HCompare::cast(test->value());
Token::Value op = compare->token();
if (test->SecondSuccessor() == dest) {
op = Token::NegateCompareOp(op);
if (compare->GetInputRepresentation().IsInteger32()) {
Token::Value op = compare->token();
if (test->SecondSuccessor() == dest) {
op = Token::NegateCompareOp(op);
}
Token::Value inverted_op = Token::InvertCompareOp(op);
InferControlFlowRange(op, compare->left(), compare->right());
InferControlFlowRange(inverted_op, compare->right(), compare->left());
}
Token::Value inverted_op = Token::InvertCompareOp(op);
InferControlFlowRange(op, compare->left(), compare->right());
InferControlFlowRange(inverted_op, compare->right(), compare->left());
}
}