1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2025-01-31 20:51:52 +01:00
llvm-mirror/test/CodeGen/PowerPC/aix-framepointer-save-restore.ll
Sean Fertile 42dd72a403 [PowerPC][AIX] Update save/restore offset for frame and base pointers.
General purpose registers 30 and 31 are handled differently when they are
reserved as the base-pointer and frame-pointer respectively. This fixes the
offset of their fixed-stack objects when there are fpr calle-saved registers.

Differential Revision: https://reviews.llvm.org/D85850
2020-09-01 14:13:05 -04:00

28 lines
671 B
LLVM

; RUN: llc -verify-machineinstrs < %s -mcpu=pwr4 -mattr=-altivec \
; RUN: -mtriple=powerpc-ibm-aix-xcoff | \
; RUN: FileCheck %s -check-prefix=AIX32
; RUN: llc -verify-machineinstrs < %s -mcpu=pwr4 -mattr=-altivec \
; RUN: -mtriple=powerpc64-ibm-aix-xcoff | \
; RUN: FileCheck %s -check-prefixes=AIX64
declare void @clobber(i32*)
define dso_local float @frameptr_only(i32 %n, float %f) {
entry:
%0 = alloca i32, i32 %n
call void @clobber(i32* %0)
ret float %f
}
; AIX32: stw 31, -12(1)
; AIX32: stwu 1, -80(1)
; AIX32: lwz 1, 0(1)
; AIX32: lwz 31, -12(1)
; AIX64: std 31, -16(1)
; AIX64: stdu 1, -144(1)
; AIX64: ld 1, 0(1)
; AIX64: ld 31, -16(1)