mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-07-29 10:25:12 +00:00
fix PR4848 an infinite loop when indexing down through a recursive gep
and we get the original pointer type. This doesn't mean that we're at the first pointer being indexed. Correct the predicate. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@80762 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -172,7 +172,7 @@ static Constant *SymbolicallyEvaluateGEP(Constant* const* Ops, unsigned NumOps,
|
||||
do {
|
||||
if (const SequentialType *ATy = dyn_cast<SequentialType>(Ty)) {
|
||||
// The only pointer indexing we'll do is on the first index of the GEP.
|
||||
if (isa<PointerType>(ATy) && ATy != Ptr->getType())
|
||||
if (isa<PointerType>(ATy) && !NewIdxs.empty())
|
||||
break;
|
||||
// Determine which element of the array the offset points into.
|
||||
APInt ElemSize(BitWidth, TD->getTypeAllocSize(ATy->getElementType()));
|
||||
|
Reference in New Issue
Block a user