Commit 7175dc09 authored by whesse@chromium.org's avatar whesse@chromium.org

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
parent fc8f77e3
...@@ -900,6 +900,7 @@ void HRangeAnalysis::InferControlFlowRange(HTest* test, HBasicBlock* dest) { ...@@ -900,6 +900,7 @@ void HRangeAnalysis::InferControlFlowRange(HTest* test, HBasicBlock* dest) {
ASSERT((test->FirstSuccessor() == dest) == (test->SecondSuccessor() != dest)); ASSERT((test->FirstSuccessor() == dest) == (test->SecondSuccessor() != dest));
if (test->value()->IsCompare()) { if (test->value()->IsCompare()) {
HCompare* compare = HCompare::cast(test->value()); HCompare* compare = HCompare::cast(test->value());
if (compare->GetInputRepresentation().IsInteger32()) {
Token::Value op = compare->token(); Token::Value op = compare->token();
if (test->SecondSuccessor() == dest) { if (test->SecondSuccessor() == dest) {
op = Token::NegateCompareOp(op); op = Token::NegateCompareOp(op);
...@@ -908,6 +909,7 @@ void HRangeAnalysis::InferControlFlowRange(HTest* test, HBasicBlock* dest) { ...@@ -908,6 +909,7 @@ void HRangeAnalysis::InferControlFlowRange(HTest* test, HBasicBlock* dest) {
InferControlFlowRange(op, compare->left(), compare->right()); InferControlFlowRange(op, compare->left(), compare->right());
InferControlFlowRange(inverted_op, compare->right(), compare->left()); InferControlFlowRange(inverted_op, compare->right(), compare->left());
} }
}
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment