[PATCH] D12337: [Codegen] Ensure stack is properly aligned for call argument initialization

Jeroen Ketema via llvm-commits llvm-commits at lists.llvm.org
Wed Aug 26 15:57:36 PDT 2015


jketema added inline comments.

================
Comment at: include/llvm/CodeGen/CallingConvLower.h:274-276
@@ -272,3 +273,5 @@
 
-  unsigned getNextStackOffset() const { return StackOffset; }
+  unsigned getNextStackOffset() const {
+    return RoundUpToAlignment(StackOffset, MaxStackArgAlign);
+  }
 
----------------
In the case of variadic arguments: can't we run into the same problems? If one of the arguments in the pack is a <4 x float> vector, then wouldn't there be cases where the X86 code generator uses and an movaps instruction to load the vector into one of the XMM registers? Or will it always used movups in that case?

And similar for reserved stack frames?


http://reviews.llvm.org/D12337





More information about the llvm-commits mailing list