• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1; RUN: llc < %s -march=ppc32 | FileCheck %s -check-prefix=PPC32-NOFP
2; RUN: llc < %s -march=ppc32 -disable-fp-elim | FileCheck %s -check-prefix=PPC32-FP
3
4; RUN: llc < %s -march=ppc64 | FileCheck %s -check-prefix=PPC64-NOFP
5; RUN: llc < %s -march=ppc64 -disable-fp-elim | FileCheck %s -check-prefix=PPC64-FP
6
7
8target triple = "powerpc-apple-darwin8"
9
10define i32* @f1() nounwind {
11        %tmp = alloca i32, i32 8191             ; <i32*> [#uses=1]
12        ret i32* %tmp
13}
14
15; PPC32-NOFP: _f1:
16; PPC32-NOFP: 	lis r0, -1
17; PPC32-NOFP: 	ori r0, r0, 32736
18; PPC32-NOFP: 	stwux r1, r1, r0
19; PPC32-NOFP: 	addi r3, r1, 36
20; PPC32-NOFP: 	lwz r1, 0(r1)
21; PPC32-NOFP: 	blr
22
23
24; PPC32-FP: _f1:
25; PPC32-FP:	lis r0, -1
26; PPC32-FP:	stw r31, -4(r1)
27; PPC32-FP:	ori r0, r0, 32736
28; PPC32-FP:	stwux r1, r1, r0
29; PPC32-FP:	mr r31, r1
30; PPC32-FP:	addi r3, r31, 32
31; PPC32-FP:	lwz r1, 0(r1)
32; PPC32-FP:	lwz r31, -4(r1)
33; PPC32-FP:	blr
34
35
36; PPC64-NOFP: _f1:
37; PPC64-NOFP: 	lis r0, -1
38; PPC64-NOFP: 	ori r0, r0, 32720
39; PPC64-NOFP: 	stdux r1, r1, r0
40; PPC64-NOFP: 	addi r3, r1, 52
41; PPC64-NOFP: 	ld r1, 0(r1)
42; PPC64-NOFP: 	blr
43
44
45; PPC64-FP: _f1:
46; PPC64-FP:	lis r0, -1
47; PPC64-FP:	std r31, -8(r1)
48; PPC64-FP:	ori r0, r0, 32704
49; PPC64-FP:	stdux r1, r1, r0
50; PPC64-FP:	mr r31, r1
51; PPC64-FP:	addi r3, r31, 60
52; PPC64-FP:	ld r1, 0(r1)
53; PPC64-FP:	ld r31, -8(r1)
54; PPC64-FP:	blr
55