summaryrefslogtreecommitdiffstats
path: root/llvm/test/CodeGen/MIR/X86/variable-sized-stack-object-size-error.mir
diff options
context:
space:
mode:
authorAlex Lorenz <arphaman@gmail.com>2015-07-14 00:26:26 +0000
committerAlex Lorenz <arphaman@gmail.com>2015-07-14 00:26:26 +0000
commit418f3ec17db24bcfc5737131dde5de556111bc32 (patch)
treeb30aba74e0f7a6b6c963633a8cea4948829e9756 /llvm/test/CodeGen/MIR/X86/variable-sized-stack-object-size-error.mir
parentce18a187f71a67125395181e821340b27d8fbdd9 (diff)
downloadbcm5719-llvm-418f3ec17db24bcfc5737131dde5de556111bc32.tar.gz
bcm5719-llvm-418f3ec17db24bcfc5737131dde5de556111bc32.zip
MIR Serialization: Serialize the variable sized stack objects.
llvm-svn: 242095
Diffstat (limited to 'llvm/test/CodeGen/MIR/X86/variable-sized-stack-object-size-error.mir')
-rw-r--r--llvm/test/CodeGen/MIR/X86/variable-sized-stack-object-size-error.mir36
1 files changed, 36 insertions, 0 deletions
diff --git a/llvm/test/CodeGen/MIR/X86/variable-sized-stack-object-size-error.mir b/llvm/test/CodeGen/MIR/X86/variable-sized-stack-object-size-error.mir
new file mode 100644
index 00000000000..8e50c52f5e1
--- /dev/null
+++ b/llvm/test/CodeGen/MIR/X86/variable-sized-stack-object-size-error.mir
@@ -0,0 +1,36 @@
+# RUN: not llc -march=x86-64 -start-after branch-folder -stop-after branch-folder -o /dev/null %s 2>&1 | FileCheck %s
+--- |
+
+ define i32 @test(i32 %a) {
+ entry:
+ %b = alloca i32
+ %x = alloca i64
+ %y = alloca i32, i32 %a
+ store i32 %a, i32* %b
+ store i64 2, i64* %x
+ %c = load i32, i32* %b
+ ret i32 %c
+ }
+
+...
+---
+name: test
+frameInfo:
+ stackSize: 24
+ offsetAdjustment: -16
+ maxAlignment: 8
+ adjustsStack: true
+stack:
+ - { id: 0, offset: -20, size: 4, alignment: 4 }
+ - { id: 1, offset: -32, size: 8, alignment: 8 }
+ # CHECK: [[@LINE+1]]:55: unknown key 'size'
+ - { id: 2, type: variable-sized, offset: -32, size: 42, alignment: 1 }
+body:
+ - id: 0
+ name: entry
+ instructions:
+ - 'MOV32mr %rsp, 1, _, -4, _, %edi'
+ - 'MOV64mi32 %rsp, 1, _, -16, _, 2'
+ - '%eax = MOV32rm %rsp, 1, _, -4, _'
+ - 'RETQ %eax'
+...
OpenPOWER on IntegriCloud