diff options
author | Chris Lattner <sabre@nondot.org> | 2005-04-09 06:27:14 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2005-04-09 06:27:14 +0000 |
commit | 67ac5f459e6ced8e921b4b04a74ffb75a93cfa95 (patch) | |
tree | cbc4e2abd4c6d8230dfe5d33b600fb00c8cfd130 | |
parent | 2f65f8e72457e66c547272f007a8ba8fba4a9d8c (diff) |
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
-rw-r--r-- | lib/Target/SparcV9/SparcV9BurgISel.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/Target/SparcV9/SparcV9BurgISel.cpp b/lib/Target/SparcV9/SparcV9BurgISel.cpp index f7dcb680cd..ca8b5b9845 100644 --- a/lib/Target/SparcV9/SparcV9BurgISel.cpp +++ b/lib/Target/SparcV9/SparcV9BurgISel.cpp @@ -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; |