Frames-dyn-alloca.ll
3.27 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
; RUN: llc < %s -mtriple=powerpc-unknown-linux-gnu | FileCheck %s -check-prefix=PPC32-LINUX
; RUN: llc < %s -mtriple=powerpc64-unknown-linux-gnu | FileCheck %s -check-prefix=PPC64-LINUX
; RUN: llc < %s -mtriple=powerpc-unknown-linux-gnu -frame-pointer=all | FileCheck %s -check-prefix=PPC32-LINUX
; RUN: llc < %s -mtriple=powerpc64-unknown-linux-gnu -frame-pointer=all | FileCheck %s -check-prefix=PPC64-LINUX
; RUN: llc < %s -mtriple=powerpc-unknown-linux-gnu | FileCheck %s -check-prefix=PPC32-LINUX
; RUN: llc < %s -mcpu=pwr4 -mattr=-altivec -verify-machineinstrs \
; RUN: -mtriple=powerpc-ibm-aix-xcoff | FileCheck %s -check-prefix=PPC32-AIX
; RUN: llc < %s -mcpu=pwr4 -mattr=-altivec -verify-machineinstrs \
; RUN: -mtriple=powerpc-ibm-aix-xcoff -frame-pointer=all | FileCheck %s \
; RUN: -check-prefix=PPC32-AIX
; RUN: llc < %s -mcpu=pwr4 -mattr=-altivec -verify-machineinstrs \
; RUN: -mtriple=powerpc64-ibm-aix-xcoff | FileCheck %s -check-prefix=PPC64-AIX
; RUN: llc < %s -mcpu=pwr4 -mattr=-altivec -verify-machineinstrs \
; RUN: -mtriple=powerpc64-ibm-aix-xcoff -frame-pointer=all | FileCheck %s \
; RUN: -check-prefix=PPC64-AIX
define i32* @f1(i32 %n) nounwind {
%tmp = alloca i32, i32 %n ; <i32*> [#uses=1]
ret i32* %tmp
}
; PPC32-LINUX-LABEL: f1
; PPC32-LINUX: stwu 1, -32(1)
; PPC32-LINUX-NEXT: slwi 3, 3, 2
; PPC32-LINUX-NEXT: addi 3, 3, 15
; PPC32-LINUX-NEXT: stw 31, 28(1)
; PPC32-LINUX-NEXT: mr 31, 1
; PPC32-LINUX-NEXT: rlwinm 3, 3, 0, 0, 27
; PPC32-LINUX-NEXT: neg 3, 3
; PPC32-LINUX-NEXT: addi 4, 31, 32
; PPC32-LINUX-NEXT: stwux 4, 1, 3
; PPC32-LINUX-NEXT: lwz 31, 0(1)
; PPC32-LINUX-NEXT: addi 3, 1, 16
; PPC32-LINUX-NEXT: lwz 0, -4(31)
; PPC32-LINUX-NEXT: mr 1, 31
; PPC32-LINUX-NEXT: mr 31, 0
; PPC32-LINUX-NEXT: blr
; PPC64-LINUX-LABEL: f1
; PPC64-LINUX: std 31, -8(1)
; PPC64-LINUX-NEXT: stdu 1, -64(1)
; PPC64-LINUX-NEXT: rldic 3, 3, 2, 30
; PPC64-LINUX-NEXT: mr 31, 1
; PPC64-LINUX-NEXT: addi 3, 3, 15
; PPC64-LINUX-NEXT: rldicl 3, 3, 60, 4
; PPC64-LINUX-NEXT: addi 4, 31, 64
; PPC64-LINUX-NEXT: rldicl 3, 3, 4, 29
; PPC64-LINUX-NEXT: neg 3, 3
; PPC64-LINUX-NEXT: stdux 4, 1, 3
; The linkage area is always put on the top of the stack.
; PPC64-LINUX-NEXT: addi 3, 1, 48
; PPC64-LINUX-NEXT: ld 1, 0(1)
; PPC64-LINUX-NEXT: ld 31, -8(1)
; PPC64-LINUX-NEXT: blr
; PPC32-AIX-LABEL: f1
; PPC32-AIX: stw 31, -4(1)
; PPC32-AIX-NEXT: stwu 1, -48(1)
; PPC32-AIX-NEXT: slwi 3, 3, 2
; PPC32-AIX-NEXT: mr 31, 1
; PPC32-AIX-NEXT: addi 3, 3, 15
; PPC32-AIX-NEXT: addi 4, 31, 48
; PPC32-AIX-NEXT: rlwinm 3, 3, 0, 0, 27
; PPC32-AIX-NEXT: neg 3, 3
; PPC32-AIX-NEXT: stwux 4, 1, 3
; The linkage area is always put on the top of the stack.
; PPC32-AIX-NEXT: addi 3, 1, 32
; PPC32-AIX-NEXT: lwz 1, 0(1)
; PPC32-AIX-NEXT: lwz 31, -4(1)
; PPC32-AIX-NEXT: blr
; PPC64-AIX-LABEL: f1
; PPC64-AIX: std 31, -8(1)
; PPC64-AIX-NEXT: stdu 1, -64(1)
; PPC64-AIX-NEXT: rldic 3, 3, 2, 30
; PPC64-AIX-NEXT: mr 31, 1
; PPC64-AIX-NEXT: addi 3, 3, 15
; PPC64-AIX-NEXT: addi 4, 31, 64
; PPC64-AIX-NEXT: rldicl 3, 3, 60, 4
; PPC64-AIX-NEXT: rldicl 3, 3, 4, 29
; PPC64-AIX-NEXT: neg 3, 3
; PPC64-AIX-NEXT: stdux 4, 1, 3
; The linkage area is always put on the top of the stack.
; PPC64-AIX-NEXT: addi 3, 1, 48
; PPC64-AIX-NEXT: ld 1, 0(1)
; PPC64-AIX-NEXT: ld 31, -8(1)
; PPC64-AIX-NEXT: blr