1484a36b9SSean Fertile; RUN: llc -mcpu=pwr7 -mattr=-altivec -verify-machineinstrs \ 2484a36b9SSean Fertile; RUN: -mtriple=powerpc-unknown-aix < %s | FileCheck %s --check-prefix 32BIT 3484a36b9SSean Fertile 4484a36b9SSean Fertile; RUN: llc -mcpu=pwr7 -mattr=-altivec -verify-machineinstrs \ 5484a36b9SSean Fertile; RUN: -mtriple=powerpc64-unknown-aix < %s | FileCheck %s --check-prefix 64BIT 6484a36b9SSean Fertile 7484a36b9SSean Fertile; Use an overaligned buffer to force base-pointer usage. Test verifies: 8484a36b9SSean Fertile; - base pointer register (r30) is saved/defined/restored. 9484a36b9SSean Fertile; - stack frame is allocated with correct alignment. 10484a36b9SSean Fertile; - Address of %AlignedBuffer is calculated based off offset from the stack 11484a36b9SSean Fertile; pointer. 12484a36b9SSean Fertile 13fecc27dbSSean Fertiledefine float @caller(float %f) { 14484a36b9SSean Fertile %AlignedBuffer = alloca [32 x i32], align 32 15484a36b9SSean Fertile %Pointer = getelementptr inbounds [32 x i32], [32 x i32]* %AlignedBuffer, i64 0, i64 0 16484a36b9SSean Fertile call void @callee(i32* %Pointer) 17fecc27dbSSean Fertile ret float %f 18484a36b9SSean Fertile} 19484a36b9SSean Fertile 20484a36b9SSean Fertiledeclare void @callee(i32*) 21484a36b9SSean Fertile 22484a36b9SSean Fertile; 32BIT-LABEL: .caller: 23fecc27dbSSean Fertile; 32BIT: stw 30, -16(1) 24484a36b9SSean Fertile; 32BIT: mr 30, 1 25484a36b9SSean Fertile; 32BIT: clrlwi 0, 1, 27 26484a36b9SSean Fertile; 32BIT: subfic 0, 0, -224 27484a36b9SSean Fertile; 32BIT: stwux 1, 1, 0 28484a36b9SSean Fertile; 32BIT: addi 3, 1, 64 29484a36b9SSean Fertile; 32BIT: bl .callee 30*ba1202a1SNemanja Ivanovic; 32BIT: mr 1, 30 31fecc27dbSSean Fertile; 32BIT: lwz 30, -16(1) 32484a36b9SSean Fertile 33484a36b9SSean Fertile; 64BIT-LABEL: .caller: 34fecc27dbSSean Fertile; 64BIT: std 30, -24(1) 35484a36b9SSean Fertile; 64BIT: mr 30, 1 36484a36b9SSean Fertile; 64BIT: clrldi 0, 1, 59 37484a36b9SSean Fertile; 64BIT: subfic 0, 0, -288 38484a36b9SSean Fertile; 64BIT: stdux 1, 1, 0 39484a36b9SSean Fertile; 64BIT: addi 3, 1, 128 40484a36b9SSean Fertile; 64BIT: bl .callee 41*ba1202a1SNemanja Ivanovic; 64BIT: mr 1, 30 42fecc27dbSSean Fertile; 64BIT: ld 30, -24(1) 43