xref: /llvm-project/llvm/test/CodeGen/PowerPC/aix-framepointer-save-restore.ll (revision fecc27db11105478c999d9ae71ea281b14be6b6a)
1; RUN: llc -verify-machineinstrs < %s -mcpu=pwr4 -mattr=-altivec \
2; RUN:     -mtriple=powerpc-ibm-aix-xcoff | \
3; RUN:   FileCheck %s -check-prefix=AIX32
4
5; RUN: llc -verify-machineinstrs < %s -mcpu=pwr4 -mattr=-altivec \
6; RUN:     -mtriple=powerpc64-ibm-aix-xcoff | \
7; RUN:   FileCheck %s -check-prefixes=AIX64
8
9declare void @clobber(i32*)
10
11define dso_local float @frameptr_only(i32 %n, float %f) {
12entry:
13  %0 = alloca i32, i32 %n
14  call void @clobber(i32* %0)
15  ret float %f
16}
17
18; AIX32: stw 31, -12(1)
19; AIX32: stwu 1, -80(1)
20; AIX32: lwz 1, 0(1)
21; AIX32: lwz 31, -12(1)
22
23; AIX64: std 31, -16(1)
24; AIX64: stdu 1, -144(1)
25; AIX64: ld 1, 0(1)
26; AIX64: ld 31, -16(1)
27
28