mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2024-11-01 15:11:24 +00:00
SCEVComplexityCompare's new code was missing SCEVUDivExpr. Implement
the SCEVUDivExpr case. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@71173 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
1978426a94
commit
a6b35e201f
@ -502,6 +502,20 @@ namespace {
|
||||
return LC->getNumOperands() < RC->getNumOperands();
|
||||
}
|
||||
|
||||
// Lexicographically compare udiv expressions.
|
||||
if (const SCEVUDivExpr *LC = dyn_cast<SCEVUDivExpr>(LHS)) {
|
||||
const SCEVUDivExpr *RC = cast<SCEVUDivExpr>(RHS);
|
||||
if (operator()(LC->getLHS(), RC->getLHS()))
|
||||
return true;
|
||||
if (operator()(RC->getLHS(), LC->getLHS()))
|
||||
return false;
|
||||
if (operator()(LC->getRHS(), RC->getRHS()))
|
||||
return true;
|
||||
if (operator()(RC->getRHS(), LC->getRHS()))
|
||||
return false;
|
||||
return false;
|
||||
}
|
||||
|
||||
// Compare cast expressions by operand.
|
||||
if (const SCEVCastExpr *LC = dyn_cast<SCEVCastExpr>(LHS)) {
|
||||
const SCEVCastExpr *RC = cast<SCEVCastExpr>(RHS);
|
||||
|
Loading…
Reference in New Issue
Block a user