mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-01-01 00:33:09 +00:00
Use recently added getTruncateOrZeroExtend method to make the code shorter.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@52251 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
818ae72d04
commit
900872186d
@ -522,11 +522,7 @@ bool IndVarSimplify::runOnLoop(Loop *L, LPPassManager &LPM) {
|
||||
DOUT << "INDVARS: New CanIV: " << *IndVar;
|
||||
|
||||
if (!isa<SCEVCouldNotCompute>(IterationCount)) {
|
||||
if (IterationCount->getType()->getPrimitiveSizeInBits() <
|
||||
LargestType->getPrimitiveSizeInBits())
|
||||
IterationCount = SE->getZeroExtendExpr(IterationCount, LargestType);
|
||||
else if (IterationCount->getType() != LargestType)
|
||||
IterationCount = SE->getTruncateExpr(IterationCount, LargestType);
|
||||
IterationCount = SE->getTruncateOrZeroExtend(IterationCount, LargestType);
|
||||
if (Instruction *DI = LinearFunctionTestReplace(L, IterationCount,Rewriter))
|
||||
DeadInsts.insert(DI);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user