mirror of
https://github.com/RPCSX/llvm.git
synced 2024-11-26 21:20:37 +00:00
Fix a bug.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@37751 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
df82c93f2a
commit
0d7d3656f3
@ -519,8 +519,11 @@ bool IndVarSimplify::runOnLoop(Loop *L, LPPassManager &LPM) {
|
||||
DOUT << "INDVARS: New CanIV: " << *IndVar;
|
||||
|
||||
if (!isa<SCEVCouldNotCompute>(IterationCount)) {
|
||||
if (IterationCount->getType() != LargestType)
|
||||
if (IterationCount->getType()->getPrimitiveSizeInBits() <
|
||||
LargestType->getPrimitiveSizeInBits())
|
||||
IterationCount = SCEVZeroExtendExpr::get(IterationCount, LargestType);
|
||||
else if (IterationCount->getType() != LargestType)
|
||||
IterationCount = SCEVTruncateExpr::get(IterationCount, LargestType);
|
||||
if (Instruction *DI = LinearFunctionTestReplace(L, IterationCount,Rewriter))
|
||||
DeadInsts.insert(DI);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user