1; RUN: llc -verify-machineinstrs < %s -mtriple=powerpc-unknown-linux-gnu | \ 2; RUN: FileCheck %s -check-prefix=PPC32-LINUX-NOFP 3 4; RUN: llc -verify-machineinstrs < %s -mtriple=powerpc-unknown-linux-gnu \ 5; RUN: -frame-pointer=all | FileCheck %s -check-prefix=PPC32-LINUX-FP 6 7; RUN: llc -verify-machineinstrs < %s -mtriple=powerpc64-unknown-linux-gnu | \ 8; RUN: FileCheck %s -check-prefix=PPC64-LINUX-NOFP 9 10; RUN: llc -verify-machineinstrs < %s -mtriple=powerpc64-unknown-linux-gnu \ 11; RUN: -frame-pointer=all | FileCheck %s -check-prefix=PPC64-LINUX-FP 12 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 16 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 20 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 24 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 28 29define i32* @frame_small() { 30 %tmp = alloca i32, i32 95 31 ret i32* %tmp 32} 33 34; The linkage area, if there is one, is still on the top of the stack after 35; `alloca` space. 36 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 42 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 50; PPC32-LINUX-FP: blr 51 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 57 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) 65; PPC64-LINUX-FP: blr 66 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 72 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 81 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 87 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 96