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 ; - stack frame is allocated with correct alignment.
10 ; - Address of %AlignedBuffer is calculated based off offset from the stack
13 define float @caller(float %f) {
14 %AlignedBuffer = alloca [32 x i32], align 32
15 call void @callee(ptr %AlignedBuffer)
19 declare void @callee(ptr)
21 ; 32BIT-LABEL: .caller:
22 ; 32BIT: stw 30, -16(1)
24 ; 32BIT: clrlwi 0, 1, 27
25 ; 32BIT: subfic 0, 0, -224
26 ; 32BIT: stwux 1, 1, 0
27 ; 32BIT: addi 3, 1, 64
30 ; 32BIT: lwz 30, -16(1)
32 ; 64BIT-LABEL: .caller:
33 ; 64BIT: std 30, -24(1)
35 ; 64BIT: clrldi 0, 1, 59
36 ; 64BIT: subfic 0, 0, -288
37 ; 64BIT: stdux 1, 1, 0
38 ; 64BIT: addi 3, 1, 128
41 ; 64BIT: ld 30, -24(1)