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 %Pointer = getelementptr inbounds [32 x i32], [32 x i32]* %AlignedBuffer, i64 0, i64 0
16 call void @callee(i32* %Pointer)
20 declare void @callee(i32*)
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
31 ; 32BIT: lwz 30, -16(1)
33 ; 64BIT-LABEL: .caller:
34 ; 64BIT: std 30, -24(1)
36 ; 64BIT: clrldi 0, 1, 59
37 ; 64BIT: subfic 0, 0, -288
38 ; 64BIT: stdux 1, 1, 0
39 ; 64BIT: addi 3, 1, 128
42 ; 64BIT: ld 30, -24(1)