]> granicus.if.org Git - clang/commit
[CodeGen] Provide an appropriate alignment for dynamic allocas
authorDavid Majnemer <david.majnemer@gmail.com>
Thu, 27 Oct 2016 17:18:24 +0000 (17:18 +0000)
committerDavid Majnemer <david.majnemer@gmail.com>
Thu, 27 Oct 2016 17:18:24 +0000 (17:18 +0000)
commit977531dd061b37a20ac260ee3db2a3a6187dac70
treebf66b808365d942ad84d0e5cefb6d934c344d343
parent6743f5132229c0e62f841e87b1b17a9a0c48bb29
[CodeGen] Provide an appropriate alignment for dynamic allocas

GCC documents __builtin_alloca as aligning the storage to at least
__BIGGEST_ALIGNMENT__.

MSVC documents essentially the same for the x64 ABI:
https://msdn.microsoft.com/en-us/library/x9sx5da1.aspx

The 32-bit ABI follows the same rule: it emits a call to _alloca_probe_16

Differential Revision: https://reviews.llvm.org/D24378

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@285316 91177308-0d34-0410-b5e6-96231b3b80d8
lib/CodeGen/CGBuiltin.cpp
test/CodeGen/builtins-ms.c