fix copy/paste oops.
[oota-llvm.git] / test / CodeGen / Thumb2 / 2010-04-15-DynAllocBug.ll
1 ; RUN: llc < %s -mtriple=thumbv7-apple-darwin -mcpu=cortex-a8 -O3 | FileCheck %s
2 ; rdar://7493908
3
4 ; Make sure the result of the first dynamic_alloc isn't copied back to sp more
5 ; than once. We'll deal with poor codegen later.
6
7 define arm_apcscc void @t() nounwind ssp {
8 entry:
9 ; CHECK: t:
10 ; CHECK: mov r0, sp
11 ; CHECK: bfc r0, #0, #3
12 ; CHECK: subs r0, #16
13 ; CHECK: mov sp, r0
14 ; Yes, this is stupid codegen, but it's correct.
15 ; CHECK: mov r0, sp
16 ; CHECK: bfc r0, #0, #3
17 ; CHECK: subs r0, #16
18 ; CHECK: mov sp, r0
19   %size = mul i32 8, 2
20   %vla_a = alloca i8, i32 %size, align 8
21   %vla_b = alloca i8, i32 %size, align 8
22   unreachable
23 }