1 ; RUN: llc -verify-machineinstrs < %s -mtriple=powerpc-unknown-linux-gnu | \
2 ; RUN: FileCheck %s -check-prefix=PPC32-LINUX-NOFP
4 ; RUN: llc -verify-machineinstrs < %s -mtriple=powerpc-unknown-linux-gnu \
5 ; RUN: -frame-pointer=all | FileCheck %s -check-prefix=PPC32-LINUX-FP
7 ; RUN: llc -verify-machineinstrs < %s -mtriple=powerpc64-unknown-linux-gnu | \
8 ; RUN: FileCheck %s -check-prefix=PPC64-LINUX-NOFP
10 ; RUN: llc -verify-machineinstrs < %s -mtriple=powerpc64-unknown-linux-gnu \
11 ; RUN: -frame-pointer=all | FileCheck %s -check-prefix=PPC64-LINUX-FP
13 ; RUN: llc -verify-machineinstrs < %s -mcpu=pwr4 -mattr=-altivec \
14 ; RUN: -mtriple=powerpc-ibm-aix-xcoff | FileCheck %s \
15 ; RUN: -check-prefix=PPC32-AIX-NOFP
17 ; RUN: llc -verify-machineinstrs < %s -mcpu=pwr4 -mattr=-altivec \
18 ; RUN: -mtriple=powerpc-ibm-aix-xcoff -frame-pointer=all | FileCheck %s \
19 ; RUN: -check-prefix=PPC32-AIX-FP
21 ; RUN: llc -verify-machineinstrs < %s -mcpu=pwr4 -mattr=-altivec \
22 ; RUN: -mtriple=powerpc64-ibm-aix-xcoff | FileCheck %s \
23 ; RUN: -check-prefix=PPC64-AIX-NOFP
25 ; RUN: llc -verify-machineinstrs < %s -mcpu=pwr4 -mattr=-altivec \
26 ; RUN: -mtriple=powerpc64-ibm-aix-xcoff -frame-pointer=all | FileCheck %s \
27 ; RUN: -check-prefix=PPC64-AIX-FP
29 define ptr @frame_small() {
30 %tmp = alloca i32, i32 95
34 ; The linkage area, if there is one, is still on the top of the stack after
37 ; PPC32-LINUX-NOFP-LABEL: frame_small
38 ; PPC32-LINUX-NOFP: stwu 1, -400(1)
39 ; PPC32-LINUX-NOFP: addi 3, 1, 20
40 ; PPC32-LINUX-NOFP: addi 1, 1, 400
41 ; PPC32-LINUX-NOFP: blr
43 ; PPC32-LINUX-FP-LABEL: frame_small
44 ; PPC32-LINUX-FP: stwu 1, -400(1)
45 ; PPC32-LINUX-FP: stw 31, 396(1)
46 ; PPC32-LINUX-FP: mr 31, 1
47 ; PPC32-LINUX-FP: addi 3, 31, 16
48 ; PPC32-LINUX-FP: lwz 31, 396(1)
49 ; PPC32-LINUX-FP: addi 1, 1, 400
52 ; PPC64-LINUX-NOFP-LABEL: frame_small
53 ; PPC64-LINUX-NOFP: stdu 1, -432(1)
54 ; PPC64-LINUX-NOFP: addi 3, 1, 52
55 ; PPC64-LINUX-NOFP: addi 1, 1, 432
56 ; PPC64-LINUX-NOFP: blr
58 ; PPC64-LINUX-FP-LABEL: frame_small
59 ; PPC64-LINUX-FP: std 31, -8(1)
60 ; PPC64-LINUX-FP: stdu 1, -448(1)
61 ; PPC64-LINUX-FP: mr 31, 1
62 ; PPC64-LINUX-FP: addi 3, 31, 60
63 ; PPC64-LINUX-FP: addi 1, 1, 448
64 ; PPC64-LINUX-FP: ld 31, -8(1)
67 ; PPC32-AIX-NOFP-LABEL: frame_small
68 ; PPC32-AIX-NOFP: stwu 1, -416(1)
69 ; PPC32-AIX-NOFP-NEXT: addi 3, 1, 36
70 ; PPC32-AIX-NOFP-NEXT: addi 1, 1, 416
71 ; PPC32-AIX-NOFP-NEXT: blr
73 ; PPC32-AIX-FP-LABEL: frame_small
74 ; PPC32-AIX-FP: stw 31, -4(1)
75 ; PPC32-AIX-FP-NEXT: stwu 1, -416(1)
76 ; PPC32-AIX-FP-NEXT: mr 31, 1
77 ; PPC32-AIX-FP-NEXT: addi 3, 31, 32
78 ; PPC32-AIX-FP-NEXT: addi 1, 1, 416
79 ; PPC32-AIX-FP-NEXT: lwz 31, -4(1)
80 ; PPC32-AIX-FP-NEXT: blr
82 ; PPC64-AIX-NOFP-LABEL: frame_small
83 ; PPC64-AIX-NOFP: stdu 1, -432(1)
84 ; PPC64-AIX-NOFP-NEXT: addi 3, 1, 52
85 ; PPC64-AIX-NOFP-NEXT: addi 1, 1, 432
86 ; PPC64-AIX-NOFP-NEXT: blr
88 ; PPC64-AIX-FP-LABEL: frame_small
89 ; PPC64-AIX-FP: std 31, -8(1)
90 ; PPC64-AIX-FP-NEXT: stdu 1, -448(1)
91 ; PPC64-AIX-FP-NEXT: mr 31, 1
92 ; PPC64-AIX-FP-NEXT: addi 3, 31, 60
93 ; PPC64-AIX-FP-NEXT: addi 1, 1, 448
94 ; PPC64-AIX-FP-NEXT: ld 31, -8(1)
95 ; PPC64-AIX-FP-NEXT: blr