[SPARC] Fix stupid oversight in stack realignment support.
[oota-llvm.git] / lib / Target / Sparc / SparcSubtarget.cpp
index d69da409e428d5385dd8303bf9f51ab5aad89578..6bf8d41306263449b5e5499b7a0f43a3bc498296 100644 (file)
@@ -64,7 +64,7 @@ int SparcSubtarget::getAdjustedFrameSize(int frameSize) const {
     frameSize += 128;
     // Frames with calls must also reserve space for 6 outgoing arguments
     // whether they are used or not. LowerCall_64 takes care of that.
-    assert(frameSize % 16 == 0 && "Stack size not 16-byte aligned");
+    frameSize = RoundUpToAlignment(frameSize, 16);
   } else {
     // Emit the correct save instruction based on the number of bytes in
     // the frame. Minimum stack frame size according to V8 ABI is: