mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2025-01-04 01:51:31 +00:00
Don't attempt to handle unsized types in ScalarEvolution's GEP analyzer.
llvm-svn: 71302
This commit is contained in:
parent
06b0d3879e
commit
3de703ce43
@ -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…
Reference in New Issue
Block a user