diff options
author | Reid Kleckner <reid@kleckner.net> | 2014-01-17 23:58:17 +0000 |
---|---|---|
committer | Reid Kleckner <reid@kleckner.net> | 2014-01-17 23:58:17 +0000 |
commit | 3cbfa1617f0d935d68bf519afb5720df066849c2 (patch) | |
tree | bbd9321083451c055f56f050fe08c56d5a35d9f6 /test/Assembler | |
parent | 01d9f5972a0d7b0d88f815e6f7424f5f7b5bdb04 (diff) | |
download | llvm-3cbfa1617f0d935d68bf519afb5720df066849c2.tar.gz llvm-3cbfa1617f0d935d68bf519afb5720df066849c2.tar.bz2 llvm-3cbfa1617f0d935d68bf519afb5720df066849c2.tar.xz |
Add an inalloca flag to allocas
Summary:
The only current use of this flag is to mark the alloca as dynamic, even
if its in the entry block. The stack adjustment for the alloca can
never be folded into the prologue because the call may clear it and it
has to be allocated at the top of the stack.
Reviewers: majnemer
CC: llvm-commits
Differential Revision: http://llvm-reviews.chandlerc.com/D2571
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@199525 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/Assembler')
-rw-r--r-- | test/Assembler/inalloca.ll | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/test/Assembler/inalloca.ll b/test/Assembler/inalloca.ll new file mode 100644 index 0000000000..94fac26265 --- /dev/null +++ b/test/Assembler/inalloca.ll @@ -0,0 +1,16 @@ +; RUN: llvm-as %s -o /dev/null + +define void @a() { +entry: + %0 = alloca i32, inalloca + %1 = alloca [2 x i32], inalloca + %2 = alloca i32, inalloca, i32 2 + %3 = alloca i32, inalloca, i32 2, align 16 + %4 = alloca i32, inalloca, i32 2, align 16, !foo !0 + %5 = alloca i32, i32 2, align 16, !foo !0 + %6 = alloca i32, i32 2, align 16 + ret void +} + +!0 = metadata !{i32 662302, null} +!foo = !{ !0 } |