mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2026-04-25 21:18:19 +00:00
LSR shouldn't ever try to hack on integer IV's larger than 64-bits. Right now
it is not APInt clean, but even when it is it needs to be evaluated carefully to determine whether it is actually profitable. This fixes a crash on PR3806 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@67134 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -592,6 +592,12 @@ bool LoopStrengthReduce::AddUsersIfInteresting(Instruction *I, Loop *L,
|
||||
SmallPtrSet<Instruction*,16> &Processed) {
|
||||
if (!I->getType()->isInteger() && !isa<PointerType>(I->getType()))
|
||||
return false; // Void and FP expressions cannot be reduced.
|
||||
|
||||
// LSR is not APInt clean, do not touch integers bigger than 64-bits.
|
||||
if (I->getType()->isInteger() &&
|
||||
I->getType()->getPrimitiveSizeInBits() > 64)
|
||||
return false;
|
||||
|
||||
if (!Processed.insert(I))
|
||||
return true; // Instruction already handled.
|
||||
|
||||
|
||||
Reference in New Issue
Block a user