blob: 7c51b67aeecbed0c0826ab7b9ac2f47677d2ef2f [file] [log] [blame]
Bill Schmidt65396822013-02-26 21:28:57 +00001; RUN: llc -mtriple="powerpc-unknown-linux-gnu" < %s | FileCheck %s --check-prefix=PPC32
2; RUN: llc -mtriple="powerpc64-unknown-linux-gnu" < %s | FileCheck %s --check-prefix=PPC64
3; PR15332
4
5define void @regalloc() nounwind {
6entry:
7 %0 = add i32 1, 2
8 ret void
9}
Stephen Lin8b2b8a12013-07-14 06:24:09 +000010; PPC32-LABEL: regalloc:
Bill Schmidt65396822013-02-26 21:28:57 +000011; PPC32-NOT: stwu 1, -{{[0-9]+}}(1)
12; PPC32: blr
13
Stephen Lin8b2b8a12013-07-14 06:24:09 +000014; PPC64-LABEL: regalloc:
Bill Schmidt65396822013-02-26 21:28:57 +000015; PPC64-NOT: stdu 1, -{{[0-9]+}}(1)
16; PPC64: blr
17
18define void @smallstack() nounwind {
19entry:
20 %0 = alloca i8, i32 4
21 ret void
22}
Stephen Lin8b2b8a12013-07-14 06:24:09 +000023; PPC32-LABEL: smallstack:
Bill Schmidt65396822013-02-26 21:28:57 +000024; PPC32: stwu 1, -16(1)
25
Stephen Lin8b2b8a12013-07-14 06:24:09 +000026; PPC64-LABEL: smallstack:
Bill Schmidt65396822013-02-26 21:28:57 +000027; PPC64-NOT: stdu 1, -{{[0-9]+}}(1)
28; PPC64: blr
29
30define void @bigstack() nounwind {
31entry:
32 %0 = alloca i8, i32 230
33 ret void
34}
Stephen Lin8b2b8a12013-07-14 06:24:09 +000035; PPC32-LABEL: bigstack:
Bill Schmidt65396822013-02-26 21:28:57 +000036; PPC32: stwu 1, -240(1)
37
Stephen Lin8b2b8a12013-07-14 06:24:09 +000038; PPC64-LABEL: bigstack:
Bill Schmidt65396822013-02-26 21:28:57 +000039; PPC64: stdu 1, -352(1)