xref: /aosp_15_r20/external/llvm/test/CodeGen/PowerPC/Frames-alloca.ll (revision 9880d6810fe72a1726cb53787c6711e909410d58)
1*9880d681SAndroid Build Coastguard Worker; RUN: llc < %s -march=ppc32 -mtriple=powerpc-apple-darwin8 | FileCheck %s -check-prefix=CHECK-PPC32
2*9880d681SAndroid Build Coastguard Worker; RUN: llc < %s -march=ppc64 -mtriple=powerpc-apple-darwin8 | FileCheck %s -check-prefix=CHECK-PPC64
3*9880d681SAndroid Build Coastguard Worker; RUN: llc < %s -march=ppc32 -mtriple=powerpc-apple-darwin8 -disable-fp-elim | FileCheck %s -check-prefix=CHECK-PPC32-NOFP
4*9880d681SAndroid Build Coastguard Worker; RUN: llc < %s -march=ppc64 -mtriple=powerpc-apple-darwin8 -disable-fp-elim | FileCheck %s -check-prefix=CHECK-PPC64-NOFP
5*9880d681SAndroid Build Coastguard Worker; RUN: llc < %s -march=ppc32 -mtriple=powerpc-apple-darwin8 | FileCheck %s -check-prefix=CHECK-PPC32
6*9880d681SAndroid Build Coastguard Worker; RUN: llc < %s -march=ppc32 -mtriple=powerpc-apple-darwin8 | FileCheck %s -check-prefix=CHECK-PPC32-RS
7*9880d681SAndroid Build Coastguard Worker; RUN: llc < %s -march=ppc32 -mtriple=powerpc-apple-darwin8 -disable-fp-elim | FileCheck %s -check-prefix=CHECK-PPC32-RS-NOFP
8*9880d681SAndroid Build Coastguard Worker
9*9880d681SAndroid Build Coastguard Worker; CHECK-PPC32: stw r31, -4(r1)
10*9880d681SAndroid Build Coastguard Worker; CHECK-PPC32: lwz r1, 0(r1)
11*9880d681SAndroid Build Coastguard Worker; CHECK-PPC32: lwz r31, -4(r1)
12*9880d681SAndroid Build Coastguard Worker; CHECK-PPC32-NOFP: stw r31, -4(r1)
13*9880d681SAndroid Build Coastguard Worker; CHECK-PPC32-NOFP: lwz r1, 0(r1)
14*9880d681SAndroid Build Coastguard Worker; CHECK-PPC32-NOFP: lwz r31, -4(r1)
15*9880d681SAndroid Build Coastguard Worker; CHECK-PPC32-RS: stwu r1, -48(r1)
16*9880d681SAndroid Build Coastguard Worker; CHECK-PPC32-RS-NOFP: stwu r1, -48(r1)
17*9880d681SAndroid Build Coastguard Worker
18*9880d681SAndroid Build Coastguard Worker; CHECK-PPC64: std r31, -8(r1)
19*9880d681SAndroid Build Coastguard Worker; CHECK-PPC64: stdu r1, -64(r1)
20*9880d681SAndroid Build Coastguard Worker; CHECK-PPC64: ld r1, 0(r1)
21*9880d681SAndroid Build Coastguard Worker; CHECK-PPC64: ld r31, -8(r1)
22*9880d681SAndroid Build Coastguard Worker; CHECK-PPC64-NOFP: std r31, -8(r1)
23*9880d681SAndroid Build Coastguard Worker; CHECK-PPC64-NOFP: stdu r1, -64(r1)
24*9880d681SAndroid Build Coastguard Worker; CHECK-PPC64-NOFP: ld r1, 0(r1)
25*9880d681SAndroid Build Coastguard Worker; CHECK-PPC64-NOFP: ld r31, -8(r1)
26*9880d681SAndroid Build Coastguard Worker
27*9880d681SAndroid Build Coastguard Workerdefine i32* @f1(i32 %n) nounwind {
28*9880d681SAndroid Build Coastguard Worker	%tmp = alloca i32, i32 %n		; <i32*> [#uses=1]
29*9880d681SAndroid Build Coastguard Worker	ret i32* %tmp
30*9880d681SAndroid Build Coastguard Worker}
31