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:
parent
fc8f77e398
commit
7175dc09ef
@ -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);
|
||||||
@ -909,6 +910,7 @@ void HRangeAnalysis::InferControlFlowRange(HTest* test, HBasicBlock* dest) {
|
|||||||
InferControlFlowRange(inverted_op, compare->right(), compare->left());
|
InferControlFlowRange(inverted_op, compare->right(), compare->left());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
// We know that value [op] other. Use this information to update the range on
|
// We know that value [op] other. Use this information to update the range on
|
||||||
|
Loading…
Reference in New Issue
Block a user