1 ; RUN: llc -mcpu=pwr7 -mattr=-altivec -verify-machineinstrs \
2 ; RUN: -mtriple=powerpc-unknown-aix < %s | FileCheck %s --check-prefix 32BIT
4 ; RUN: llc -mcpu=pwr7 -mattr=-altivec -verify-machineinstrs \
5 ; RUN: -mtriple=powerpc64-unknown-aix < %s | FileCheck %s --check-prefix 64BIT
7 ; Use an overaligned buffer to force base-pointer usage. Test verifies:
8 ; - base pointer register (r30) is saved/defined/restored.
9 ; - frame pointer register (r31) is saved/defined/restored.
10 ; - stack frame is allocated with correct alignment.
11 ; - Address of %AlignedBuffer is calculated based off offset from the stack
14 define float @caller(float %f) {
15 %AlignedBuffer = alloca [32 x i32], align 32
16 call void @callee(ptr %AlignedBuffer)
20 declare void @callee(ptr)
22 ; 32BIT-LABEL: .caller:
23 ; 32BIT: stw 30, -16(1)
25 ; 32BIT: clrlwi 0, 1, 27
26 ; 32BIT: subfic 0, 0, -224
27 ; 32BIT: stwux 1, 1, 0
28 ; 32BIT: addi 3, 1, 64
29 ; 32BIT: stw 31, -12(30)
31 ; 32BIT: lwz 31, -12(30)
33 ; 32BIT: lwz 30, -16(1)
35 ; 64BIT-LABEL: .caller:
36 ; 64BIT: std 30, -24(1)
38 ; 64BIT: clrldi 0, 1, 59
39 ; 64BIT: subfic 0, 0, -288
40 ; 64BIT: stdux 1, 1, 0
41 ; 64BIT: addi 3, 1, 128
42 ; 64BIT: std 31, -16(30)
44 ; 64BIT: ld 31, -16(30)
46 ; 64BIT: ld 30, -24(1)