mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-01-14 16:33:28 +00:00
Don't attempt to handle unsized types in ScalarEvolution's GEP analyzer.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@71302 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
f045f80ba9
commit
c63a62735b
@ -1935,6 +1935,9 @@ SCEVHandle ScalarEvolution::createNodeForGEP(User *GEP) {
|
||||
|
||||
const Type *IntPtrTy = TD->getIntPtrType();
|
||||
Value *Base = GEP->getOperand(0);
|
||||
// Don't attempt to analyze GEPs over unsized objects.
|
||||
if (!cast<PointerType>(Base->getType())->getElementType()->isSized())
|
||||
return getUnknown(GEP);
|
||||
SCEVHandle TotalOffset = getIntegerSCEV(0, IntPtrTy);
|
||||
gep_type_iterator GTI = gep_type_begin(GEP);
|
||||
for (GetElementPtrInst::op_iterator I = next(GEP->op_begin()),
|
||||
|
Loading…
x
Reference in New Issue
Block a user