[llvm-commits] CVS: llvm/lib/Target/SparcV9/SparcV9BurgISel.cpp

Chris Lattner lattner at cs.uiuc.edu
Fri Apr 8 23:27:27 PDT 2005



Changes in directory llvm/lib/Target/SparcV9:

SparcV9BurgISel.cpp updated: 1.15 -> 1.16
---
Log message:

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


---
Diffs of the changes:  (+1 -1)

 SparcV9BurgISel.cpp |    2 +-
 1 files changed, 1 insertion(+), 1 deletion(-)


Index: llvm/lib/Target/SparcV9/SparcV9BurgISel.cpp
diff -u llvm/lib/Target/SparcV9/SparcV9BurgISel.cpp:1.15 llvm/lib/Target/SparcV9/SparcV9BurgISel.cpp:1.16
--- llvm/lib/Target/SparcV9/SparcV9BurgISel.cpp:1.15	Sun Jan 23 19:40:18 2005
+++ llvm/lib/Target/SparcV9/SparcV9BurgISel.cpp	Sat Apr  9 01:27:14 2005
@@ -1738,7 +1738,7 @@
   // 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;






More information about the llvm-commits mailing list