mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-01-19 04:32:19 +00:00
Fix CodeGen/SparcV9/2005-05-09-GEP-Crash.ll a crash on some specfp program
lets hope this doesn't break other programs with induced entropy git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@21174 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
2f65f8e724
commit
67ac5f459e
@ -1738,7 +1738,7 @@ static Value *GetGEPInstArgs(InstructionNode *gepNode,
|
||||
// in this and any preceding GetElemPtr instructions.
|
||||
bool foldedGEPs = false;
|
||||
bool leadingNonZeroIdx = gepI && ! IsZero(*gepI->idx_begin());
|
||||
if (allConstantIndices)
|
||||
if (allConstantIndices && !leadingNonZeroIdx)
|
||||
if (Value* newPtr = FoldGetElemChain(ptrChild, idxVec, leadingNonZeroIdx)) {
|
||||
ptrVal = newPtr;
|
||||
foldedGEPs = true;
|
||||
|
Loading…
x
Reference in New Issue
Block a user