mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-08-09 11:25:55 +00:00
SCEVAddExpr::get() of an empty list is invalid.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@22724 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -608,7 +608,10 @@ RemoveCommonExpressionsFromUseBases(std::vector<BasedUser> &Uses) {
|
|||||||
for (unsigned j = 0, e = AE->getNumOperands(); j != e; ++j)
|
for (unsigned j = 0, e = AE->getNumOperands(); j != e; ++j)
|
||||||
if (!SubExpressionUseCounts.count(AE->getOperand(j)))
|
if (!SubExpressionUseCounts.count(AE->getOperand(j)))
|
||||||
NewOps.push_back(AE->getOperand(j));
|
NewOps.push_back(AE->getOperand(j));
|
||||||
Uses[i].Base = SCEVAddExpr::get(NewOps);
|
if (NewOps.size() == 0)
|
||||||
|
Uses[i].Base = Zero;
|
||||||
|
else
|
||||||
|
Uses[i].Base = SCEVAddExpr::get(NewOps);
|
||||||
} else {
|
} else {
|
||||||
// If the base is zero (which is common), return zero now, there are no
|
// If the base is zero (which is common), return zero now, there are no
|
||||||
// CSEs we can find.
|
// CSEs we can find.
|
||||||
|
Reference in New Issue
Block a user