1 ; RUN: llc -mtriple=ppc64-- -ppc-always-use-base-pointer < %s | FileCheck %s --check-prefix CHECK --check-prefix PPC64
2 ; RUN: llc -ppc-always-use-base-pointer -relocation-model=static < %s | FileCheck %s --check-prefix CHECK --check-prefix PPC32
3 ; RUN: llc -ppc-always-use-base-pointer -relocation-model=pic < %s | FileCheck %s --check-prefix CHECK --check-prefix PPC32PIC
7 ; Check for saving/restoring frame pointer (X31) and base pointer (X30)
10 ; PPC64: std 30, -16(1)
12 ; PPC64: ld 30, -16(1)
14 ; Check for saving/restoring frame pointer (R31) and base pointer (R30)
16 ; PPC32: stwux 1, 1, 0
17 ; PPC32; addic 0, 0, -4
18 ; PPC32: stwx 31, 0, 0
19 ; PPC32: addic 0, 0, -4
20 ; PPC32: stwx 30, 0, 0
21 ; The restore sequence:
23 ; PPC32: addic 30, 0, 8
24 ; PPC32: lwz 0, -4(31)
25 ; PPC32: lwz 30, -8(31)
29 ; Check for saving/restoring frame pointer (R31) and base pointer (R29)
30 ; on ppc32/pic. This is mostly the same as without pic, except that base
32 ; PPC32PIC: stwux 1, 1, 0
33 ; PPC32PIC; addic 0, 0, -4
34 ; PPC32PIC: stwx 31, 0, 0
35 ; PPC32PIC: addic 0, 0, -8
36 ; PPC32PIC: stwx 29, 0, 0
37 ; The restore sequence:
38 ; PPC32PIC: lwz 31, 0(1)
39 ; PPC32PIC: addic 29, 0, 12
40 ; PPC32PIC: lwz 0, -4(31)
41 ; PPC32PIC: lwz 29, -12(31)
46 target datalayout = "E-m:e-p:32:32-i64:64-n32"
47 target triple = "powerpc-unknown-freebsd"
49 define i64 @fred() local_unnamed_addr #0 {
54 attributes #0 = { norecurse readnone nounwind sspstrong "no-frame-pointer-elim"="true" "target-cpu"="ppc" }