brintos

brintos / llvm-project-archived public Read only

0
0
Text · 1.5 KiB · 5e66e5e Raw
47 lines · plain
1; RUN: llc -mcpu=pwr7 -mattr=-altivec -verify-machineinstrs \2; RUN:   -mtriple=powerpc-unknown-aix < %s  | FileCheck %s --check-prefix 32BIT3 4; RUN: llc -mcpu=pwr7 -mattr=-altivec -verify-machineinstrs \5; RUN:   -mtriple=powerpc64-unknown-aix < %s | FileCheck %s --check-prefix 64BIT6 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 stack12;   pointer.13 14define float @caller(float %f) {15  %AlignedBuffer = alloca [32 x i32], align 3216  call void @callee(ptr %AlignedBuffer)17  ret float %f18}19 20declare void @callee(ptr)21 22; 32BIT-LABEL: .caller:23; 32BIT:         stw 30, -16(1)24; 32BIT:         mr 30, 125; 32BIT:         clrlwi  0, 1, 2726; 32BIT:         subfic 0, 0, -22427; 32BIT:         stwux 1, 1, 028; 32BIT:         addi 3, 1, 6429; 32BIT:         stw 31, -12(30)30; 32BIT:         bl .callee31; 32BIT:         lwz 31, -12(30)32; 32BIT:         mr 1, 3033; 32BIT:         lwz 30, -16(1)34 35; 64BIT-LABEL: .caller:36; 64BIT:         std 30, -24(1)37; 64BIT:         mr 30, 138; 64BIT:         clrldi  0, 1, 5939; 64BIT:         subfic 0, 0, -28840; 64BIT:         stdux 1, 1, 041; 64BIT:         addi 3, 1, 12842; 64BIT:         std 31, -16(30)43; 64BIT:         bl .callee44; 64BIT:         ld 31, -16(30)45; 64BIT:         mr 1, 3046; 64BIT:         ld 30, -24(1)47