Changes in directory llvm/lib/CodeGen:
PrologEpilogInserter.cpp updated: 1.60 -> 1.61 --- Log message: TargetRegisterClass specifies the desired spill alignment. However, it cannot be honored if stack alignment is smaller. --- Diffs of the changes: (+6 -1) PrologEpilogInserter.cpp | 7 ++++++- 1 files changed, 6 insertions(+), 1 deletion(-) Index: llvm/lib/CodeGen/PrologEpilogInserter.cpp diff -u llvm/lib/CodeGen/PrologEpilogInserter.cpp:1.60 llvm/lib/CodeGen/PrologEpilogInserter.cpp:1.61 --- llvm/lib/CodeGen/PrologEpilogInserter.cpp:1.60 Wed Sep 27 19:10:27 2006 +++ llvm/lib/CodeGen/PrologEpilogInserter.cpp Thu Sep 28 13:52:32 2006 @@ -190,7 +190,12 @@ int FrameIdx; if (FixedSlot == FixedSpillSlots+NumFixedSpillSlots) { // Nope, just spill it anywhere convenient. - FrameIdx = FFI->CreateStackObject(RC->getSize(), RC->getAlignment()); + unsigned Align = RC->getAlignment(); + unsigned StackAlign = TFI->getStackAlignment(); + // We may not be able to sastify the desired alignment specification of + // the TargetRegisterClass if the stack alignment is smaller. Use the min. + Align = std::min(Align, StackAlign); + FrameIdx = FFI->CreateStackObject(RC->getSize(), Align); if ((unsigned)FrameIdx < MinCSFrameIndex) MinCSFrameIndex = FrameIdx; if ((unsigned)FrameIdx > MaxCSFrameIndex) MaxCSFrameIndex = FrameIdx; } else { _______________________________________________ llvm-commits mailing list llvm-commits@cs.uiuc.edu http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits