forked from OSchip/llvm-project
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 llvm-svn: 21174
This commit is contained in:
parent
3aa6ec0dda
commit
888c5fdcc2
|
@ -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…
Reference in New Issue