diff options
author | Bruno Cardoso Lopes <bruno.cardoso@gmail.com> | 2008-06-03 08:46:59 +0000 |
---|---|---|
committer | Bruno Cardoso Lopes <bruno.cardoso@gmail.com> | 2008-06-03 08:46:59 +0000 |
commit | 2dd8fdc78ac020ed308f6ba6efd9c4507a6c6517 (patch) | |
tree | e4e5d92dceb0ead5523a5268e2ad0853b3ddf169 /llvm/lib | |
parent | 097826643b8b22ce40304604103de11caf87d146 (diff) | |
download | bcm5719-llvm-2dd8fdc78ac020ed308f6ba6efd9c4507a6c6517.tar.gz bcm5719-llvm-2dd8fdc78ac020ed308f6ba6efd9c4507a6c6517.zip |
Fixed bug in bad behavior in calculateFrameObjectOffsets,
the solution commited is different from the previous patch to
avoid int and unsigned comparison
llvm-svn: 51899
Diffstat (limited to 'llvm/lib')
-rw-r--r-- | llvm/lib/CodeGen/PrologEpilogInserter.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/llvm/lib/CodeGen/PrologEpilogInserter.cpp b/llvm/lib/CodeGen/PrologEpilogInserter.cpp index fda08bc29f6..c52da321c1e 100644 --- a/llvm/lib/CodeGen/PrologEpilogInserter.cpp +++ b/llvm/lib/CodeGen/PrologEpilogInserter.cpp @@ -362,7 +362,8 @@ void PEI::calculateFrameObjectOffsets(MachineFunction &Fn) { 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. |