blob: 2246de35e03cda77091f8420fb3805597a1af56a [file] [log] [blame]
Evan Cheng0ea7d212010-04-15 18:42:28 +00001; 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
Rafael Espindola1e819662010-06-17 15:18:27 +00007define void @t() nounwind ssp {
Evan Cheng0ea7d212010-04-15 18:42:28 +00008entry:
9; CHECK: t:
Evan Cheng0ea7d212010-04-15 18:42:28 +000010 %size = mul i32 8, 2
Jim Grosbach65482b12010-09-03 18:37:12 +000011; CHECK: subs r0, #16
12; CHECK: mov sp, r0
Evan Cheng0ea7d212010-04-15 18:42:28 +000013 %vla_a = alloca i8, i32 %size, align 8
Jim Grosbach65482b12010-09-03 18:37:12 +000014; CHECK: subs r0, #16
15; CHECK: mov sp, r0
Evan Cheng0ea7d212010-04-15 18:42:28 +000016 %vla_b = alloca i8, i32 %size, align 8
17 unreachable
18}