[llvm-commits] [llvm] r51899 - /llvm/trunk/lib/CodeGen/PrologEpilogInserter.cpp

Bruno Cardoso Lopes bruno.cardoso at gmail.com
Tue Jun 3 01:47:00 PDT 2008


Author: bruno
Date: Tue Jun  3 03:46:59 2008
New Revision: 51899

URL: http://llvm.org/viewvc/llvm-project?rev=51899&view=rev
Log:
Fixed bug in bad behavior in calculateFrameObjectOffsets,
the solution commited is different from the previous patch to
avoid int and unsigned comparison

Modified:
    llvm/trunk/lib/CodeGen/PrologEpilogInserter.cpp

Modified: llvm/trunk/lib/CodeGen/PrologEpilogInserter.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/PrologEpilogInserter.cpp?rev=51899&r1=51898&r2=51899&view=diff

==============================================================================
--- llvm/trunk/lib/CodeGen/PrologEpilogInserter.cpp (original)
+++ llvm/trunk/lib/CodeGen/PrologEpilogInserter.cpp Tue Jun  3 03:46:59 2008
@@ -362,7 +362,8 @@
       FFI->setObjectOffset(i, -Offset);        // Set the computed offset
     }
   } else {
-    for (unsigned i = MaxCSFrameIndex; i >= MinCSFrameIndex; --i) {
+    int MaxCSFI = MaxCSFrameIndex, MinCSFI = MinCSFrameIndex;
+    for (int i = MaxCSFI; i >= MinCSFI ; --i) {
       unsigned Align = FFI->getObjectAlignment(i);
       // If the alignment of this object is greater than that of the stack, then
       // increase the stack alignment to match.





More information about the llvm-commits mailing list