xref: /llvm-project/llvm/test/CodeGen/PowerPC/aix-cc-abi-mir.ll (revision 67eb05b2928ea707761bb040e6eb824f4ca9ef3a)
1; NOTE: Assertions have been autogenerated by utils/update_mir_test_checks.py UTC_ARGS: --version 4
2; RUN: llc -mtriple powerpc-ibm-aix-xcoff -mcpu=ppc -stop-after=machine-cp -verify-machineinstrs < %s | \
3; RUN: FileCheck --check-prefix=32BIT %s
4
5; RUN: llc -mtriple powerpc64-ibm-aix-xcoff -mcpu=ppc -stop-after=machine-cp -verify-machineinstrs < %s | \
6; RUN: FileCheck --check-prefix=64BIT %s
7
8define void @call_test_chars() {
9  ; 32BIT-LABEL: name: call_test_chars
10  ; 32BIT: bb.0.entry:
11  ; 32BIT-NEXT:   ADJCALLSTACKDOWN 56, 0, implicit-def dead $r1, implicit $r1
12  ; 32BIT-NEXT:   $r3 = LI 97
13  ; 32BIT-NEXT:   $r4 = LI 97
14  ; 32BIT-NEXT:   $r5 = LI 97
15  ; 32BIT-NEXT:   $r6 = LI 97
16  ; 32BIT-NEXT:   BL_NOP <mcsymbol .test_chars>, csr_aix32, implicit-def dead $lr, implicit $rm, implicit killed $r3, implicit killed $r4, implicit killed $r5, implicit killed $r6, implicit $r2, implicit-def $r1, implicit-def dead $r3
17  ; 32BIT-NEXT:   ADJCALLSTACKUP 56, 0, implicit-def dead $r1, implicit $r1
18  ; 32BIT-NEXT:   BLR implicit $lr, implicit $rm
19  ;
20  ; 64BIT-LABEL: name: call_test_chars
21  ; 64BIT: bb.0.entry:
22  ; 64BIT-NEXT:   ADJCALLSTACKDOWN 112, 0, implicit-def dead $r1, implicit $r1
23  ; 64BIT-NEXT:   $x3 = LI8 97
24  ; 64BIT-NEXT:   $x4 = LI8 97
25  ; 64BIT-NEXT:   $x5 = LI8 97
26  ; 64BIT-NEXT:   $x6 = LI8 97
27  ; 64BIT-NEXT:   BL8_NOP <mcsymbol .test_chars>, csr_ppc64, implicit-def dead $lr8, implicit $rm, implicit killed $x3, implicit killed $x4, implicit killed $x5, implicit killed $x6, implicit $x2, implicit-def $r1, implicit-def dead $x3
28  ; 64BIT-NEXT:   ADJCALLSTACKUP 112, 0, implicit-def dead $r1, implicit $r1
29  ; 64BIT-NEXT:   BLR8 implicit $lr8, implicit $rm
30entry:
31  call i8 @test_chars(i8 signext 97, i8 signext 97, i8 signext 97, i8 signext 97)
32  ret void
33}
34
35define signext i8 @test_chars(i8 signext %c1, i8 signext %c2, i8 signext %c3, i8 signext %c4) {
36  ; 32BIT-LABEL: name: test_chars
37  ; 32BIT: bb.0.entry:
38  ; 32BIT-NEXT:   liveins: $r3, $r4, $r5, $r6
39  ; 32BIT-NEXT: {{  $}}
40  ; 32BIT-NEXT:   renamable $r3 = ADD4 killed renamable $r3, killed renamable $r4
41  ; 32BIT-NEXT:   renamable $r3 = ADD4 killed renamable $r3, killed renamable $r5
42  ; 32BIT-NEXT:   renamable $r3 = ADD4 killed renamable $r3, killed renamable $r6
43  ; 32BIT-NEXT:   renamable $r3 = EXTSB killed renamable $r3
44  ; 32BIT-NEXT:   BLR implicit $lr, implicit $rm, implicit $r3
45  ;
46  ; 64BIT-LABEL: name: test_chars
47  ; 64BIT: bb.0.entry:
48  ; 64BIT-NEXT:   liveins: $x3, $x4, $x5, $x6
49  ; 64BIT-NEXT: {{  $}}
50  ; 64BIT-NEXT:   renamable $r3 = ADD4 renamable $r3, renamable $r4, implicit killed $x4, implicit killed $x3
51  ; 64BIT-NEXT:   renamable $r3 = ADD4 killed renamable $r3, renamable $r5, implicit killed $x5
52  ; 64BIT-NEXT:   renamable $r3 = ADD4 killed renamable $r3, renamable $r6, implicit killed $x6, implicit-def $x3
53  ; 64BIT-NEXT:   renamable $x3 = EXTSB8 killed renamable $x3
54  ; 64BIT-NEXT:   BLR8 implicit $lr8, implicit $rm, implicit $x3
55entry:
56  %conv = sext i8 %c1 to i32
57  %conv1 = sext i8 %c2 to i32
58  %add = add nsw i32 %conv, %conv1
59  %conv2 = sext i8 %c3 to i32
60  %add3 = add nsw i32 %add, %conv2
61  %conv4 = sext i8 %c4 to i32
62  %add5 = add nsw i32 %add3, %conv4
63  %conv6 = trunc i32 %add5 to i8
64  ret i8 %conv6
65}
66
67define void @call_test_chars_mix() {
68  ; 32BIT-LABEL: name: call_test_chars_mix
69  ; 32BIT: bb.0.entry:
70  ; 32BIT-NEXT:   ADJCALLSTACKDOWN 56, 0, implicit-def dead $r1, implicit $r1
71  ; 32BIT-NEXT:   $r3 = LI 97
72  ; 32BIT-NEXT:   $r4 = LI 225
73  ; 32BIT-NEXT:   $r5 = LI 97
74  ; 32BIT-NEXT:   $r6 = LI -31
75  ; 32BIT-NEXT:   BL_NOP <mcsymbol .test_chars_mix>, csr_aix32, implicit-def dead $lr, implicit $rm, implicit killed $r3, implicit killed $r4, implicit killed $r5, implicit killed $r6, implicit $r2, implicit-def $r1, implicit-def dead $r3
76  ; 32BIT-NEXT:   ADJCALLSTACKUP 56, 0, implicit-def dead $r1, implicit $r1
77  ; 32BIT-NEXT:   BLR implicit $lr, implicit $rm
78  ;
79  ; 64BIT-LABEL: name: call_test_chars_mix
80  ; 64BIT: bb.0.entry:
81  ; 64BIT-NEXT:   ADJCALLSTACKDOWN 112, 0, implicit-def dead $r1, implicit $r1
82  ; 64BIT-NEXT:   $x3 = LI8 97
83  ; 64BIT-NEXT:   $x4 = LI8 225
84  ; 64BIT-NEXT:   $x5 = LI8 97
85  ; 64BIT-NEXT:   $x6 = LI8 -31
86  ; 64BIT-NEXT:   BL8_NOP <mcsymbol .test_chars_mix>, csr_ppc64, implicit-def dead $lr8, implicit $rm, implicit killed $x3, implicit killed $x4, implicit killed $x5, implicit killed $x6, implicit $x2, implicit-def $r1, implicit-def dead $x3
87  ; 64BIT-NEXT:   ADJCALLSTACKUP 112, 0, implicit-def dead $r1, implicit $r1
88  ; 64BIT-NEXT:   BLR8 implicit $lr8, implicit $rm
89entry:
90  call i8 @test_chars_mix(i8 signext 97, i8 zeroext -31, i8 zeroext 97, i8 signext -31)
91  ret void
92}
93
94define signext i8 @test_chars_mix(i8 signext %c1, i8 zeroext %c2, i8 zeroext %c3, i8 signext %c4) {
95  ; 32BIT-LABEL: name: test_chars_mix
96  ; 32BIT: bb.0.entry:
97  ; 32BIT-NEXT:   liveins: $r3, $r4, $r5, $r6
98  ; 32BIT-NEXT: {{  $}}
99  ; 32BIT-NEXT:   renamable $r3 = ADD4 killed renamable $r3, killed renamable $r4
100  ; 32BIT-NEXT:   renamable $r3 = ADD4 killed renamable $r3, killed renamable $r5
101  ; 32BIT-NEXT:   renamable $r3 = ADD4 killed renamable $r3, killed renamable $r6
102  ; 32BIT-NEXT:   renamable $r3 = EXTSB killed renamable $r3
103  ; 32BIT-NEXT:   BLR implicit $lr, implicit $rm, implicit $r3
104  ;
105  ; 64BIT-LABEL: name: test_chars_mix
106  ; 64BIT: bb.0.entry:
107  ; 64BIT-NEXT:   liveins: $x3, $x4, $x5, $x6
108  ; 64BIT-NEXT: {{  $}}
109  ; 64BIT-NEXT:   renamable $r3 = ADD4 renamable $r3, renamable $r4, implicit killed $x4, implicit killed $x3
110  ; 64BIT-NEXT:   renamable $r3 = ADD4 killed renamable $r3, renamable $r5, implicit killed $x5
111  ; 64BIT-NEXT:   renamable $r3 = ADD4 killed renamable $r3, renamable $r6, implicit killed $x6, implicit-def $x3
112  ; 64BIT-NEXT:   renamable $x3 = EXTSB8 killed renamable $x3
113  ; 64BIT-NEXT:   BLR8 implicit $lr8, implicit $rm, implicit $x3
114entry:
115  %conv = sext i8 %c1 to i32
116  %conv1 = zext i8 %c2 to i32
117  %add = add nsw i32 %conv, %conv1
118  %conv2 = zext i8 %c3 to i32
119  %add3 = add nsw i32 %add, %conv2
120  %conv4 = sext i8 %c4 to i32
121  %add5 = add nsw i32 %add3, %conv4
122  %conv6 = trunc i32 %add5 to i8
123  ret i8 %conv6
124}
125
126@global_i1 = global i8 0, align 1
127
128define  void @test_i1(i1 %b)  {
129  ; 32BIT-LABEL: name: test_i1
130  ; 32BIT: bb.0.entry:
131  ; 32BIT-NEXT:   liveins: $r3
132  ; 32BIT-NEXT: {{  $}}
133  ; 32BIT-NEXT:   renamable $r4 = LWZtoc @global_i1, $r2 :: (load (s32) from got)
134  ; 32BIT-NEXT:   renamable $r3 = RLWINM killed renamable $r3, 0, 31, 31
135  ; 32BIT-NEXT:   STB killed renamable $r3, 0, killed renamable $r4 :: (store (s8) into @global_i1)
136  ; 32BIT-NEXT:   BLR implicit $lr, implicit $rm
137  ;
138  ; 64BIT-LABEL: name: test_i1
139  ; 64BIT: bb.0.entry:
140  ; 64BIT-NEXT:   liveins: $x3
141  ; 64BIT-NEXT: {{  $}}
142  ; 64BIT-NEXT:   renamable $x4 = LDtoc @global_i1, $x2 :: (load (s64) from got)
143  ; 64BIT-NEXT:   renamable $r3 = RLWINM renamable $r3, 0, 31, 31, implicit killed $x3
144  ; 64BIT-NEXT:   STB killed renamable $r3, 0, killed renamable $x4 :: (store (s8) into @global_i1)
145  ; 64BIT-NEXT:   BLR8 implicit $lr8, implicit $rm
146  entry:
147   %frombool = zext i1 %b to i8
148   store i8 %frombool, ptr @global_i1, align 1
149   ret void
150}
151
152define void @call_test_i1() {
153  ; 32BIT-LABEL: name: call_test_i1
154  ; 32BIT: bb.0.entry:
155  ; 32BIT-NEXT:   ADJCALLSTACKDOWN 56, 0, implicit-def dead $r1, implicit $r1
156  ; 32BIT-NEXT:   $r3 = LI 1
157  ; 32BIT-NEXT:   BL_NOP <mcsymbol .test_i1>, csr_aix32, implicit-def dead $lr, implicit $rm, implicit killed $r3, implicit $r2, implicit-def $r1
158  ; 32BIT-NEXT:   ADJCALLSTACKUP 56, 0, implicit-def dead $r1, implicit $r1
159  ; 32BIT-NEXT:   BLR implicit $lr, implicit $rm
160  ;
161  ; 64BIT-LABEL: name: call_test_i1
162  ; 64BIT: bb.0.entry:
163  ; 64BIT-NEXT:   ADJCALLSTACKDOWN 112, 0, implicit-def dead $r1, implicit $r1
164  ; 64BIT-NEXT:   $x3 = LI8 1
165  ; 64BIT-NEXT:   BL8_NOP <mcsymbol .test_i1>, csr_ppc64, implicit-def dead $lr8, implicit $rm, implicit killed $x3, implicit $x2, implicit-def $r1
166  ; 64BIT-NEXT:   ADJCALLSTACKUP 112, 0, implicit-def dead $r1, implicit $r1
167  ; 64BIT-NEXT:   BLR8 implicit $lr8, implicit $rm
168entry:
169  call void @test_i1(i1 1)
170  ret void
171}
172
173define void @test_i1zext(i1 zeroext %b) {
174  ; 32BIT-LABEL: name: test_i1zext
175  ; 32BIT: bb.0.entry:
176  ; 32BIT-NEXT:   liveins: $r3
177  ; 32BIT-NEXT: {{  $}}
178  ; 32BIT-NEXT:   renamable $r4 = LWZtoc @global_i1, $r2 :: (load (s32) from got)
179  ; 32BIT-NEXT:   STB killed renamable $r3, 0, killed renamable $r4 :: (store (s8) into @global_i1)
180  ; 32BIT-NEXT:   BLR implicit $lr, implicit $rm
181  ;
182  ; 64BIT-LABEL: name: test_i1zext
183  ; 64BIT: bb.0.entry:
184  ; 64BIT-NEXT:   liveins: $x3
185  ; 64BIT-NEXT: {{  $}}
186  ; 64BIT-NEXT:   renamable $x4 = LDtoc @global_i1, $x2 :: (load (s64) from got)
187  ; 64BIT-NEXT:   STB8 killed renamable $x3, 0, killed renamable $x4 :: (store (s8) into @global_i1)
188  ; 64BIT-NEXT:   BLR8 implicit $lr8, implicit $rm
189  entry:
190    %frombool = zext i1 %b to i8
191    store i8 %frombool, ptr @global_i1, align 1
192    ret void
193  }
194
195define i32 @test_ints(i32 signext %a, i32 zeroext %b, i32 zeroext %c, i32 signext %d, i32 signext %e, i32 signext %f, i32 signext %g, i32 signext %h) {
196  ; 32BIT-LABEL: name: test_ints
197  ; 32BIT: bb.0.entry:
198  ; 32BIT-NEXT:   liveins: $r3, $r4, $r5, $r6, $r7, $r8, $r9, $r10
199  ; 32BIT-NEXT: {{  $}}
200  ; 32BIT-NEXT:   renamable $r3 = ADD4 killed renamable $r3, killed renamable $r4
201  ; 32BIT-NEXT:   renamable $r3 = ADD4 killed renamable $r3, killed renamable $r5
202  ; 32BIT-NEXT:   renamable $r3 = ADD4 killed renamable $r3, killed renamable $r6
203  ; 32BIT-NEXT:   renamable $r3 = ADD4 killed renamable $r3, killed renamable $r7
204  ; 32BIT-NEXT:   renamable $r3 = ADD4 killed renamable $r3, killed renamable $r8
205  ; 32BIT-NEXT:   renamable $r3 = ADD4 killed renamable $r3, killed renamable $r9
206  ; 32BIT-NEXT:   renamable $r3 = ADD4 killed renamable $r3, killed renamable $r10
207  ; 32BIT-NEXT:   BLR implicit $lr, implicit $rm, implicit $r3
208  ;
209  ; 64BIT-LABEL: name: test_ints
210  ; 64BIT: bb.0.entry:
211  ; 64BIT-NEXT:   liveins: $x3, $x4, $x5, $x6, $x7, $x8, $x9, $x10
212  ; 64BIT-NEXT: {{  $}}
213  ; 64BIT-NEXT:   renamable $r3 = ADD4 renamable $r3, renamable $r4, implicit killed $x4, implicit killed $x3
214  ; 64BIT-NEXT:   renamable $r3 = ADD4 killed renamable $r3, renamable $r5, implicit killed $x5
215  ; 64BIT-NEXT:   renamable $r3 = ADD4 killed renamable $r3, renamable $r6, implicit killed $x6
216  ; 64BIT-NEXT:   renamable $r3 = ADD4 killed renamable $r3, renamable $r7, implicit killed $x7
217  ; 64BIT-NEXT:   renamable $r3 = ADD4 killed renamable $r3, renamable $r8, implicit killed $x8
218  ; 64BIT-NEXT:   renamable $r3 = ADD4 killed renamable $r3, renamable $r9, implicit killed $x9
219  ; 64BIT-NEXT:   renamable $r3 = ADD4 killed renamable $r3, renamable $r10, implicit killed $x10, implicit-def $x3
220  ; 64BIT-NEXT:   BLR8 implicit $lr8, implicit $rm, implicit $x3
221entry:
222    %add = add i32 %a, %b
223    %add1 = add i32 %add, %c
224    %add2 = add i32 %add1, %d
225    %add3 = add i32 %add2, %e
226    %add4 = add i32 %add3, %f
227    %add5 = add i32 %add4, %g
228    %add6 = add i32 %add5, %h
229    ret i32 %add6
230}
231
232define void @call_test_ints() {
233  ; 32BIT-LABEL: name: call_test_ints
234  ; 32BIT: bb.0.entry:
235  ; 32BIT-NEXT:   ADJCALLSTACKDOWN 56, 0, implicit-def dead $r1, implicit $r1
236  ; 32BIT-NEXT:   $r3 = LI 1
237  ; 32BIT-NEXT:   $r4 = LI 1
238  ; 32BIT-NEXT:   $r5 = LIS 32768
239  ; 32BIT-NEXT:   $r6 = LIS 32768
240  ; 32BIT-NEXT:   $r7 = LI 1
241  ; 32BIT-NEXT:   $r8 = LI 1
242  ; 32BIT-NEXT:   $r9 = LI 1
243  ; 32BIT-NEXT:   $r10 = LI 1
244  ; 32BIT-NEXT:   BL_NOP <mcsymbol .test_ints>, csr_aix32, implicit-def dead $lr, implicit $rm, implicit killed $r3, implicit killed $r4, implicit killed $r5, implicit killed $r6, implicit killed $r7, implicit killed $r8, implicit killed $r9, implicit killed $r10, implicit $r2, implicit-def $r1, implicit-def dead $r3
245  ; 32BIT-NEXT:   ADJCALLSTACKUP 56, 0, implicit-def dead $r1, implicit $r1
246  ; 32BIT-NEXT:   BLR implicit $lr, implicit $rm
247  ;
248  ; 64BIT-LABEL: name: call_test_ints
249  ; 64BIT: bb.0.entry:
250  ; 64BIT-NEXT:   ADJCALLSTACKDOWN 112, 0, implicit-def dead $r1, implicit $r1
251  ; 64BIT-NEXT:   renamable $x3 = LI8 1
252  ; 64BIT-NEXT:   renamable $x5 = RLDIC killed renamable $x3, 31, 32
253  ; 64BIT-NEXT:   $x3 = LI8 1
254  ; 64BIT-NEXT:   $x4 = LI8 1
255  ; 64BIT-NEXT:   $x6 = LIS8 32768
256  ; 64BIT-NEXT:   $x7 = LI8 1
257  ; 64BIT-NEXT:   $x8 = LI8 1
258  ; 64BIT-NEXT:   $x9 = LI8 1
259  ; 64BIT-NEXT:   $x10 = LI8 1
260  ; 64BIT-NEXT:   BL8_NOP <mcsymbol .test_ints>, csr_ppc64, implicit-def dead $lr8, implicit $rm, implicit $x3, implicit killed $x4, implicit $x5, implicit killed $x6, implicit killed $x7, implicit killed $x8, implicit killed $x9, implicit killed $x10, implicit $x2, implicit-def $r1, implicit-def dead $x3
261  ; 64BIT-NEXT:   ADJCALLSTACKUP 112, 0, implicit-def dead $r1, implicit $r1
262  ; 64BIT-NEXT:   BLR8 implicit $lr8, implicit $rm
263entry:
264  call i32 @test_ints(i32 signext 1, i32 zeroext 1, i32 zeroext 2147483648, i32 signext -2147483648, i32 signext 1, i32 signext 1, i32 signext 1, i32 signext 1)
265  ret void
266}
267
268define void @call_test_i64() {
269  ; 32BIT-LABEL: name: call_test_i64
270  ; 32BIT: bb.0.entry:
271  ; 32BIT-NEXT:   ADJCALLSTACKDOWN 56, 0, implicit-def dead $r1, implicit $r1
272  ; 32BIT-NEXT:   $r3 = LI 0
273  ; 32BIT-NEXT:   $r4 = LI 1
274  ; 32BIT-NEXT:   $r5 = LI 0
275  ; 32BIT-NEXT:   $r6 = LI 2
276  ; 32BIT-NEXT:   $r7 = LI 0
277  ; 32BIT-NEXT:   $r8 = LI 3
278  ; 32BIT-NEXT:   $r9 = LI 0
279  ; 32BIT-NEXT:   $r10 = LI 4
280  ; 32BIT-NEXT:   BL_NOP <mcsymbol .test_i64>, csr_aix32, implicit-def dead $lr, implicit $rm, implicit killed $r3, implicit killed $r4, implicit killed $r5, implicit killed $r6, implicit killed $r7, implicit killed $r8, implicit killed $r9, implicit killed $r10, implicit $r2, implicit-def $r1, implicit-def dead $r3, implicit-def dead $r4
281  ; 32BIT-NEXT:   ADJCALLSTACKUP 56, 0, implicit-def dead $r1, implicit $r1
282  ; 32BIT-NEXT:   BLR implicit $lr, implicit $rm
283  ;
284  ; 64BIT-LABEL: name: call_test_i64
285  ; 64BIT: bb.0.entry:
286  ; 64BIT-NEXT:   ADJCALLSTACKDOWN 112, 0, implicit-def dead $r1, implicit $r1
287  ; 64BIT-NEXT:   $x3 = LI8 1
288  ; 64BIT-NEXT:   $x4 = LI8 2
289  ; 64BIT-NEXT:   $x5 = LI8 3
290  ; 64BIT-NEXT:   $x6 = LI8 4
291  ; 64BIT-NEXT:   BL8_NOP <mcsymbol .test_i64>, csr_ppc64, implicit-def dead $lr8, implicit $rm, implicit killed $x3, implicit killed $x4, implicit killed $x5, implicit killed $x6, implicit $x2, implicit-def $r1, implicit-def dead $x3
292  ; 64BIT-NEXT:   ADJCALLSTACKUP 112, 0, implicit-def dead $r1, implicit $r1
293  ; 64BIT-NEXT:   BLR8 implicit $lr8, implicit $rm
294entry:
295  call i64 @test_i64(i64 1, i64 2, i64 3, i64 4)
296  ret void
297}
298
299define i64 @test_i64(i64 %a, i64 %b, i64 %c, i64 %d) {
300  ; 32BIT-LABEL: name: test_i64
301  ; 32BIT: bb.0.entry:
302  ; 32BIT-NEXT:   liveins: $r3, $r4, $r5, $r6, $r7, $r8, $r9, $r10
303  ; 32BIT-NEXT: {{  $}}
304  ; 32BIT-NEXT:   renamable $r4 = ADDC killed renamable $r4, killed renamable $r6, implicit-def $carry
305  ; 32BIT-NEXT:   renamable $r3 = ADDE killed renamable $r3, killed renamable $r5, implicit-def dead $carry, implicit killed $carry
306  ; 32BIT-NEXT:   renamable $r4 = ADDC killed renamable $r4, killed renamable $r8, implicit-def $carry
307  ; 32BIT-NEXT:   renamable $r3 = ADDE killed renamable $r3, killed renamable $r7, implicit-def dead $carry, implicit killed $carry
308  ; 32BIT-NEXT:   renamable $r4 = ADDC killed renamable $r4, killed renamable $r10, implicit-def $carry
309  ; 32BIT-NEXT:   renamable $r3 = ADDE killed renamable $r3, killed renamable $r9, implicit-def dead $carry, implicit killed $carry
310  ; 32BIT-NEXT:   BLR implicit $lr, implicit $rm, implicit $r3, implicit $r4
311  ;
312  ; 64BIT-LABEL: name: test_i64
313  ; 64BIT: bb.0.entry:
314  ; 64BIT-NEXT:   liveins: $x3, $x4, $x5, $x6
315  ; 64BIT-NEXT: {{  $}}
316  ; 64BIT-NEXT:   renamable $x3 = nsw ADD8 killed renamable $x3, killed renamable $x4
317  ; 64BIT-NEXT:   renamable $x3 = nsw ADD8 killed renamable $x3, killed renamable $x5
318  ; 64BIT-NEXT:   renamable $x3 = nsw ADD8 killed renamable $x3, killed renamable $x6
319  ; 64BIT-NEXT:   BLR8 implicit $lr8, implicit $rm, implicit $x3
320entry:
321  %add = add nsw i64 %a, %b
322  %add1 = add nsw i64 %add, %c
323  %add2 = add nsw i64 %add1, %d
324  ret i64 %add2
325}
326
327define void @call_test_int_ptr() {
328  ; 32BIT-LABEL: name: call_test_int_ptr
329  ; 32BIT: bb.0.entry:
330  ; 32BIT-NEXT:   renamable $r3 = LI 0
331  ; 32BIT-NEXT:   STW killed renamable $r3, 0, %stack.0.b :: (store (s32) into %ir.b)
332  ; 32BIT-NEXT:   ADJCALLSTACKDOWN 56, 0, implicit-def dead $r1, implicit $r1
333  ; 32BIT-NEXT:   renamable $r3 = ADDI %stack.0.b, 0
334  ; 32BIT-NEXT:   BL_NOP <mcsymbol .test_int_ptr>, csr_aix32, implicit-def dead $lr, implicit $rm, implicit $r3, implicit $r2, implicit-def $r1
335  ; 32BIT-NEXT:   ADJCALLSTACKUP 56, 0, implicit-def dead $r1, implicit $r1
336  ; 32BIT-NEXT:   BLR implicit $lr, implicit $rm
337  ;
338  ; 64BIT-LABEL: name: call_test_int_ptr
339  ; 64BIT: bb.0.entry:
340  ; 64BIT-NEXT:   renamable $x3 = LI8 0
341  ; 64BIT-NEXT:   STW8 killed renamable $x3, 0, %stack.0.b :: (store (s32) into %ir.b)
342  ; 64BIT-NEXT:   ADJCALLSTACKDOWN 112, 0, implicit-def dead $r1, implicit $r1
343  ; 64BIT-NEXT:   renamable $x3 = ADDI8 %stack.0.b, 0
344  ; 64BIT-NEXT:   BL8_NOP <mcsymbol .test_int_ptr>, csr_ppc64, implicit-def dead $lr8, implicit $rm, implicit $x3, implicit $x2, implicit-def $r1
345  ; 64BIT-NEXT:   ADJCALLSTACKUP 112, 0, implicit-def dead $r1, implicit $r1
346  ; 64BIT-NEXT:   BLR8 implicit $lr8, implicit $rm
347entry:
348  %b = alloca i32, align 4
349  store i32 0, ptr %b, align 4
350  call void @test_int_ptr(ptr %b)
351  ret void
352}
353
354define void @test_int_ptr(ptr %a) {
355  ; 32BIT-LABEL: name: test_int_ptr
356  ; 32BIT: bb.0.entry:
357  ; 32BIT-NEXT:   liveins: $r3
358  ; 32BIT-NEXT: {{  $}}
359  ; 32BIT-NEXT:   STW killed renamable $r3, 0, %stack.0.a.addr :: (store (s32) into %ir.a.addr, align 8)
360  ; 32BIT-NEXT:   BLR implicit $lr, implicit $rm
361  ;
362  ; 64BIT-LABEL: name: test_int_ptr
363  ; 64BIT: bb.0.entry:
364  ; 64BIT-NEXT:   liveins: $x3
365  ; 64BIT-NEXT: {{  $}}
366  ; 64BIT-NEXT:   STD killed renamable $x3, 0, %stack.0.a.addr :: (store (s64) into %ir.a.addr)
367  ; 64BIT-NEXT:   BLR8 implicit $lr8, implicit $rm
368entry:
369  %a.addr = alloca ptr, align 8
370  store ptr %a, ptr %a.addr, align 8
371  ret void
372}
373
374define i32 @caller(i32 %i)  {
375  ; 32BIT-LABEL: name: caller
376  ; 32BIT: bb.0.entry:
377  ; 32BIT-NEXT:   liveins: $r3
378  ; 32BIT-NEXT: {{  $}}
379  ; 32BIT-NEXT:   STW renamable $r3, 0, %stack.0.i.addr :: (store (s32) into %ir.i.addr)
380  ; 32BIT-NEXT:   renamable $r3 = CNTLZW killed renamable $r3
381  ; 32BIT-NEXT:   renamable $r3 = NOR killed renamable $r3, renamable $r3
382  ; 32BIT-NEXT:   renamable $r3 = RLWINM killed renamable $r3, 27, 31, 31
383  ; 32BIT-NEXT:   STB renamable $r3, 0, %stack.1.b :: (store (s8) into %ir.b)
384  ; 32BIT-NEXT:   ADJCALLSTACKDOWN 56, 0, implicit-def dead $r1, implicit $r1
385  ; 32BIT-NEXT:   BL_NOP <mcsymbol .call_test_bool[PR]>, csr_aix32, implicit-def dead $lr, implicit $rm, implicit $r3, implicit $r2, implicit-def $r1, implicit-def $r3
386  ; 32BIT-NEXT:   ADJCALLSTACKUP 56, 0, implicit-def dead $r1, implicit $r1
387  ; 32BIT-NEXT:   BLR implicit $lr, implicit $rm, implicit $r3
388  ;
389  ; 64BIT-LABEL: name: caller
390  ; 64BIT: bb.0.entry:
391  ; 64BIT-NEXT:   liveins: $x3
392  ; 64BIT-NEXT: {{  $}}
393  ; 64BIT-NEXT:   STW renamable $r3, 0, %stack.0.i.addr :: (store (s32) into %ir.i.addr)
394  ; 64BIT-NEXT:   renamable $r3 = CNTLZW renamable $r3, implicit killed $x3
395  ; 64BIT-NEXT:   renamable $r3 = RLWINM killed renamable $r3, 27, 5, 31
396  ; 64BIT-NEXT:   renamable $r3 = XORI killed renamable $r3, 1, implicit-def $x3
397  ; 64BIT-NEXT:   STB renamable $r3, 0, %stack.1.b :: (store (s8) into %ir.b)
398  ; 64BIT-NEXT:   ADJCALLSTACKDOWN 112, 0, implicit-def dead $r1, implicit $r1
399  ; 64BIT-NEXT:   BL8_NOP <mcsymbol .call_test_bool[PR]>, csr_ppc64, implicit-def dead $lr8, implicit $rm, implicit $x3, implicit $x2, implicit-def $r1, implicit-def $x3
400  ; 64BIT-NEXT:   ADJCALLSTACKUP 112, 0, implicit-def dead $r1, implicit $r1
401  ; 64BIT-NEXT:   BLR8 implicit $lr8, implicit $rm, implicit $x3
402entry:
403  %i.addr = alloca i32, align 4
404  %b = alloca i8, align 1
405  store i32 %i, ptr %i.addr, align 4
406  %0 = load i32, ptr %i.addr, align 4
407  %cmp = icmp ne i32 %0, 0
408  %frombool = zext i1 %cmp to i8
409  store i8 %frombool, ptr %b, align 1
410  %1 = load i8, ptr %b, align 1
411  %tobool = trunc i8 %1 to i1
412  %call = call i32 @call_test_bool(i1 zeroext %tobool)
413  ret i32 %call
414}
415
416declare i32 @call_test_bool(i1 zeroext)
417
418@f1 = global float 0.000000e+00, align 4
419@d1 = global double 0.000000e+00, align 8
420
421define void @call_test_floats() {
422  ; 32BIT-LABEL: name: call_test_floats
423  ; 32BIT: bb.0.entry:
424  ; 32BIT-NEXT:   renamable $r3 = LWZtoc @f1, $r2 :: (load (s32) from got)
425  ; 32BIT-NEXT:   renamable $f1 = LFS 0, killed renamable $r3 :: (dereferenceable load (s32) from @f1)
426  ; 32BIT-NEXT:   ADJCALLSTACKDOWN 56, 0, implicit-def dead $r1, implicit $r1
427  ; 32BIT-NEXT:   $f2 = COPY renamable $f1
428  ; 32BIT-NEXT:   $f3 = COPY renamable $f1
429  ; 32BIT-NEXT:   BL_NOP <mcsymbol .test_floats>, csr_aix32, implicit-def dead $lr, implicit $rm, implicit $f1, implicit killed $f2, implicit killed $f3, implicit $r2, implicit-def $r1, implicit-def dead $f1
430  ; 32BIT-NEXT:   ADJCALLSTACKUP 56, 0, implicit-def dead $r1, implicit $r1
431  ; 32BIT-NEXT:   BLR implicit $lr, implicit $rm
432  ;
433  ; 64BIT-LABEL: name: call_test_floats
434  ; 64BIT: bb.0.entry:
435  ; 64BIT-NEXT:   renamable $x3 = LDtoc @f1, $x2 :: (load (s64) from got)
436  ; 64BIT-NEXT:   renamable $f1 = LFS 0, killed renamable $x3 :: (dereferenceable load (s32) from @f1)
437  ; 64BIT-NEXT:   ADJCALLSTACKDOWN 112, 0, implicit-def dead $r1, implicit $r1
438  ; 64BIT-NEXT:   $f2 = COPY renamable $f1
439  ; 64BIT-NEXT:   $f3 = COPY renamable $f1
440  ; 64BIT-NEXT:   BL8_NOP <mcsymbol .test_floats>, csr_ppc64, implicit-def dead $lr8, implicit $rm, implicit $f1, implicit killed $f2, implicit killed $f3, implicit $x2, implicit-def $r1, implicit-def dead $f1
441  ; 64BIT-NEXT:   ADJCALLSTACKUP 112, 0, implicit-def dead $r1, implicit $r1
442  ; 64BIT-NEXT:   BLR8 implicit $lr8, implicit $rm
443entry:
444  %0 = load float, ptr @f1, align 4
445  call float @test_floats(float %0, float %0, float %0)
446  ret void
447}
448
449define float @test_floats(float %f1, float %f2, float %f3) {
450  ; 32BIT-LABEL: name: test_floats
451  ; 32BIT: bb.0.entry:
452  ; 32BIT-NEXT:   liveins: $f1, $f2, $f3
453  ; 32BIT-NEXT: {{  $}}
454  ; 32BIT-NEXT:   renamable $f0 = nofpexcept FADDS killed renamable $f1, killed renamable $f2, implicit $rm
455  ; 32BIT-NEXT:   renamable $f1 = nofpexcept FADDS killed renamable $f0, killed renamable $f3, implicit $rm
456  ; 32BIT-NEXT:   BLR implicit $lr, implicit $rm, implicit $f1
457  ;
458  ; 64BIT-LABEL: name: test_floats
459  ; 64BIT: bb.0.entry:
460  ; 64BIT-NEXT:   liveins: $f1, $f2, $f3
461  ; 64BIT-NEXT: {{  $}}
462  ; 64BIT-NEXT:   renamable $f0 = nofpexcept FADDS killed renamable $f1, killed renamable $f2, implicit $rm
463  ; 64BIT-NEXT:   renamable $f1 = nofpexcept FADDS killed renamable $f0, killed renamable $f3, implicit $rm
464  ; 64BIT-NEXT:   BLR8 implicit $lr8, implicit $rm, implicit $f1
465entry:
466  %add = fadd float %f1, %f2
467  %add1 = fadd float %add, %f3
468  ret float %add1
469}
470
471define void @call_test_fpr_max() {
472  ; 32BIT-LABEL: name: call_test_fpr_max
473  ; 32BIT: bb.0.entry:
474  ; 32BIT-NEXT:   renamable $r3 = LWZtoc @d1, $r2 :: (load (s32) from got)
475  ; 32BIT-NEXT:   renamable $f1 = LFD 0, killed renamable $r3 :: (dereferenceable load (s64) from @d1)
476  ; 32BIT-NEXT:   ADJCALLSTACKDOWN 128, 0, implicit-def dead $r1, implicit $r1
477  ; 32BIT-NEXT:   STFD renamable $f1, 120, $r1 :: (store (s64))
478  ; 32BIT-NEXT:   STFD renamable $f1, 112, $r1 :: (store (s64))
479  ; 32BIT-NEXT:   STFD renamable $f1, 104, $r1 :: (store (s64))
480  ; 32BIT-NEXT:   STFD renamable $f1, 96, $r1 :: (store (s64))
481  ; 32BIT-NEXT:   STFD renamable $f1, 88, $r1 :: (store (s64))
482  ; 32BIT-NEXT:   STFD renamable $f1, 80, $r1 :: (store (s64))
483  ; 32BIT-NEXT:   STFD renamable $f1, 72, $r1 :: (store (s64))
484  ; 32BIT-NEXT:   STFD renamable $f1, 64, $r1 :: (store (s64))
485  ; 32BIT-NEXT:   $f2 = COPY renamable $f1
486  ; 32BIT-NEXT:   $f3 = COPY renamable $f1
487  ; 32BIT-NEXT:   $f4 = COPY renamable $f1
488  ; 32BIT-NEXT:   $f5 = COPY renamable $f1
489  ; 32BIT-NEXT:   $f6 = COPY renamable $f1
490  ; 32BIT-NEXT:   $f7 = COPY renamable $f1
491  ; 32BIT-NEXT:   $f8 = COPY renamable $f1
492  ; 32BIT-NEXT:   $f9 = COPY renamable $f1
493  ; 32BIT-NEXT:   $f10 = COPY renamable $f1
494  ; 32BIT-NEXT:   $f11 = COPY renamable $f1
495  ; 32BIT-NEXT:   $f12 = COPY renamable $f1
496  ; 32BIT-NEXT:   $f13 = COPY renamable $f1
497  ; 32BIT-NEXT:   STFD renamable $f1, 56, $r1 :: (store (s64))
498  ; 32BIT-NEXT:   BL_NOP <mcsymbol .test_fpr_max>, csr_aix32, implicit-def dead $lr, implicit $rm, implicit $f1, implicit killed $f2, implicit killed $f3, implicit killed $f4, implicit killed $f5, implicit killed $f6, implicit killed $f7, implicit killed $f8, implicit killed $f9, implicit killed $f10, implicit killed $f11, implicit killed $f12, implicit killed $f13, implicit $r2, implicit-def $r1, implicit-def dead $f1
499  ; 32BIT-NEXT:   ADJCALLSTACKUP 128, 0, implicit-def dead $r1, implicit $r1
500  ; 32BIT-NEXT:   BLR implicit $lr, implicit $rm
501  ;
502  ; 64BIT-LABEL: name: call_test_fpr_max
503  ; 64BIT: bb.0.entry:
504  ; 64BIT-NEXT:   renamable $x3 = LDtoc @d1, $x2 :: (load (s64) from got)
505  ; 64BIT-NEXT:   renamable $f1 = LFD 0, killed renamable $x3 :: (dereferenceable load (s64) from @d1)
506  ; 64BIT-NEXT:   ADJCALLSTACKDOWN 152, 0, implicit-def dead $r1, implicit $r1
507  ; 64BIT-NEXT:   STFD renamable $f1, 144, $x1 :: (store (s64))
508  ; 64BIT-NEXT:   STFD renamable $f1, 136, $x1 :: (store (s64))
509  ; 64BIT-NEXT:   STFD renamable $f1, 128, $x1 :: (store (s64))
510  ; 64BIT-NEXT:   STFD renamable $f1, 120, $x1 :: (store (s64))
511  ; 64BIT-NEXT:   $f2 = COPY renamable $f1
512  ; 64BIT-NEXT:   $f3 = COPY renamable $f1
513  ; 64BIT-NEXT:   $f4 = COPY renamable $f1
514  ; 64BIT-NEXT:   $f5 = COPY renamable $f1
515  ; 64BIT-NEXT:   $f6 = COPY renamable $f1
516  ; 64BIT-NEXT:   $f7 = COPY renamable $f1
517  ; 64BIT-NEXT:   $f8 = COPY renamable $f1
518  ; 64BIT-NEXT:   $f9 = COPY renamable $f1
519  ; 64BIT-NEXT:   $f10 = COPY renamable $f1
520  ; 64BIT-NEXT:   $f11 = COPY renamable $f1
521  ; 64BIT-NEXT:   $f12 = COPY renamable $f1
522  ; 64BIT-NEXT:   $f13 = COPY renamable $f1
523  ; 64BIT-NEXT:   STFD renamable $f1, 112, $x1 :: (store (s64))
524  ; 64BIT-NEXT:   BL8_NOP <mcsymbol .test_fpr_max>, csr_ppc64, implicit-def dead $lr8, implicit $rm, implicit $f1, implicit killed $f2, implicit killed $f3, implicit killed $f4, implicit killed $f5, implicit killed $f6, implicit killed $f7, implicit killed $f8, implicit killed $f9, implicit killed $f10, implicit killed $f11, implicit killed $f12, implicit killed $f13, implicit $x2, implicit-def $r1, implicit-def dead $f1
525  ; 64BIT-NEXT:   ADJCALLSTACKUP 152, 0, implicit-def dead $r1, implicit $r1
526  ; 64BIT-NEXT:   BLR8 implicit $lr8, implicit $rm
527entry:
528  %0 = load double, ptr @d1, align 8
529  call double @test_fpr_max(double %0, double %0, double %0, double %0, double %0, double %0, double %0, double %0, double %0, double %0, double %0, double %0, double %0)
530  ret void
531}
532
533define double @test_fpr_max(double %d1, double %d2, double %d3, double %d4, double %d5, double %d6, double %d7, double %d8, double %d9, double %d10, double %d11, double %d12, double %d13) {
534  ; 32BIT-LABEL: name: test_fpr_max
535  ; 32BIT: bb.0.entry:
536  ; 32BIT-NEXT:   liveins: $f1, $f2, $f3, $f4, $f5, $f6, $f7, $f8, $f9, $f10, $f11, $f12, $f13
537  ; 32BIT-NEXT: {{  $}}
538  ; 32BIT-NEXT:   renamable $f0 = nofpexcept FADD killed renamable $f1, killed renamable $f2, implicit $rm
539  ; 32BIT-NEXT:   renamable $f0 = nofpexcept FADD killed renamable $f0, killed renamable $f3, implicit $rm
540  ; 32BIT-NEXT:   renamable $f0 = nofpexcept FADD killed renamable $f0, killed renamable $f4, implicit $rm
541  ; 32BIT-NEXT:   renamable $f0 = nofpexcept FADD killed renamable $f0, killed renamable $f5, implicit $rm
542  ; 32BIT-NEXT:   renamable $f0 = nofpexcept FADD killed renamable $f0, killed renamable $f6, implicit $rm
543  ; 32BIT-NEXT:   renamable $f0 = nofpexcept FADD killed renamable $f0, killed renamable $f7, implicit $rm
544  ; 32BIT-NEXT:   renamable $f0 = nofpexcept FADD killed renamable $f0, killed renamable $f8, implicit $rm
545  ; 32BIT-NEXT:   renamable $f0 = nofpexcept FADD killed renamable $f0, killed renamable $f9, implicit $rm
546  ; 32BIT-NEXT:   renamable $f0 = nofpexcept FADD killed renamable $f0, killed renamable $f10, implicit $rm
547  ; 32BIT-NEXT:   renamable $f0 = nofpexcept FADD killed renamable $f0, killed renamable $f11, implicit $rm
548  ; 32BIT-NEXT:   renamable $f0 = nofpexcept FADD killed renamable $f0, killed renamable $f12, implicit $rm
549  ; 32BIT-NEXT:   renamable $f1 = nofpexcept FADD killed renamable $f0, killed renamable $f13, implicit $rm
550  ; 32BIT-NEXT:   BLR implicit $lr, implicit $rm, implicit $f1
551  ;
552  ; 64BIT-LABEL: name: test_fpr_max
553  ; 64BIT: bb.0.entry:
554  ; 64BIT-NEXT:   liveins: $f1, $f2, $f3, $f4, $f5, $f6, $f7, $f8, $f9, $f10, $f11, $f12, $f13
555  ; 64BIT-NEXT: {{  $}}
556  ; 64BIT-NEXT:   renamable $f0 = nofpexcept FADD killed renamable $f1, killed renamable $f2, implicit $rm
557  ; 64BIT-NEXT:   renamable $f0 = nofpexcept FADD killed renamable $f0, killed renamable $f3, implicit $rm
558  ; 64BIT-NEXT:   renamable $f0 = nofpexcept FADD killed renamable $f0, killed renamable $f4, implicit $rm
559  ; 64BIT-NEXT:   renamable $f0 = nofpexcept FADD killed renamable $f0, killed renamable $f5, implicit $rm
560  ; 64BIT-NEXT:   renamable $f0 = nofpexcept FADD killed renamable $f0, killed renamable $f6, implicit $rm
561  ; 64BIT-NEXT:   renamable $f0 = nofpexcept FADD killed renamable $f0, killed renamable $f7, implicit $rm
562  ; 64BIT-NEXT:   renamable $f0 = nofpexcept FADD killed renamable $f0, killed renamable $f8, implicit $rm
563  ; 64BIT-NEXT:   renamable $f0 = nofpexcept FADD killed renamable $f0, killed renamable $f9, implicit $rm
564  ; 64BIT-NEXT:   renamable $f0 = nofpexcept FADD killed renamable $f0, killed renamable $f10, implicit $rm
565  ; 64BIT-NEXT:   renamable $f0 = nofpexcept FADD killed renamable $f0, killed renamable $f11, implicit $rm
566  ; 64BIT-NEXT:   renamable $f0 = nofpexcept FADD killed renamable $f0, killed renamable $f12, implicit $rm
567  ; 64BIT-NEXT:   renamable $f1 = nofpexcept FADD killed renamable $f0, killed renamable $f13, implicit $rm
568  ; 64BIT-NEXT:   BLR8 implicit $lr8, implicit $rm, implicit $f1
569entry:
570  %add = fadd double %d1, %d2
571  %add1 = fadd double %add, %d3
572  %add2 = fadd double %add1, %d4
573  %add3 = fadd double %add2, %d5
574  %add4 = fadd double %add3, %d6
575  %add5 = fadd double %add4, %d7
576  %add6 = fadd double %add5, %d8
577  %add7 = fadd double %add6, %d9
578  %add8 = fadd double %add7, %d10
579  %add9 = fadd double %add8, %d11
580  %add10 = fadd double %add9, %d12
581  %add11 = fadd double %add10, %d13
582  ret double %add11
583}
584
585define void @call_test_mix() {
586  ; 32BIT-LABEL: name: call_test_mix
587  ; 32BIT: bb.0.entry:
588  ; 32BIT-NEXT:   renamable $r3 = LWZtoc @f1, $r2 :: (load (s32) from got)
589  ; 32BIT-NEXT:   renamable $r4 = LWZtoc @d1, $r2 :: (load (s32) from got)
590  ; 32BIT-NEXT:   renamable $f1 = LFS 0, killed renamable $r3 :: (dereferenceable load (s32) from @f1)
591  ; 32BIT-NEXT:   renamable $f2 = LFD 0, killed renamable $r4 :: (dereferenceable load (s64) from @d1)
592  ; 32BIT-NEXT:   ADJCALLSTACKDOWN 56, 0, implicit-def dead $r1, implicit $r1
593  ; 32BIT-NEXT:   $r4 = LI 1
594  ; 32BIT-NEXT:   $r7 = LI 97
595  ; 32BIT-NEXT:   BL_NOP <mcsymbol .test_mix>, csr_aix32, implicit-def dead $lr, implicit $rm, implicit $f1, implicit $r4, implicit $f2, implicit killed $r7, implicit $r2, implicit-def $r1, implicit-def dead $r3
596  ; 32BIT-NEXT:   ADJCALLSTACKUP 56, 0, implicit-def dead $r1, implicit $r1
597  ; 32BIT-NEXT:   BLR implicit $lr, implicit $rm
598  ;
599  ; 64BIT-LABEL: name: call_test_mix
600  ; 64BIT: bb.0.entry:
601  ; 64BIT-NEXT:   renamable $x3 = LDtoc @f1, $x2 :: (load (s64) from got)
602  ; 64BIT-NEXT:   renamable $x4 = LDtoc @d1, $x2 :: (load (s64) from got)
603  ; 64BIT-NEXT:   renamable $f1 = LFS 0, killed renamable $x3 :: (dereferenceable load (s32) from @f1)
604  ; 64BIT-NEXT:   renamable $f2 = LFD 0, killed renamable $x4 :: (dereferenceable load (s64) from @d1)
605  ; 64BIT-NEXT:   ADJCALLSTACKDOWN 112, 0, implicit-def dead $r1, implicit $r1
606  ; 64BIT-NEXT:   $x4 = LI8 1
607  ; 64BIT-NEXT:   $x6 = LI8 97
608  ; 64BIT-NEXT:   BL8_NOP <mcsymbol .test_mix>, csr_ppc64, implicit-def dead $lr8, implicit $rm, implicit $f1, implicit $x4, implicit $f2, implicit killed $x6, implicit $x2, implicit-def $r1, implicit-def dead $x3
609  ; 64BIT-NEXT:   ADJCALLSTACKUP 112, 0, implicit-def dead $r1, implicit $r1
610  ; 64BIT-NEXT:   BLR8 implicit $lr8, implicit $rm
611entry:
612  %0 = load float, ptr @f1, align 4
613  %1 = load double, ptr @d1, align 8
614  call i32 @test_mix(float %0, i32 1, double %1, i8 signext 97)
615  ret void
616}
617
618define i32 @test_mix(float %f, i32 signext %i, double %d, i8 signext %c) {
619  ; 32BIT-LABEL: name: test_mix
620  ; 32BIT: bb.0.entry:
621  ; 32BIT-NEXT:   liveins: $f1, $f2, $r4, $r7
622  ; 32BIT-NEXT: {{  $}}
623  ; 32BIT-NEXT:   renamable $r3 = LIS 17200
624  ; 32BIT-NEXT:   STW killed renamable $r3, 0, %stack.1 :: (store (s32) into %stack.1, align 8)
625  ; 32BIT-NEXT:   renamable $r3 = RLWINM killed renamable $r7, 0, 24, 31
626  ; 32BIT-NEXT:   renamable $r3 = nsw ADD4 killed renamable $r4, killed renamable $r3
627  ; 32BIT-NEXT:   renamable $r4 = LWZtoc %const.0, $r2 :: (load (s32) from got)
628  ; 32BIT-NEXT:   renamable $r3 = XORIS killed renamable $r3, 32768
629  ; 32BIT-NEXT:   STW killed renamable $r3, 4, %stack.1 :: (store (s32) into %stack.1 + 4)
630  ; 32BIT-NEXT:   renamable $f0 = LFS 0, killed renamable $r4 :: (load (s32) from constant-pool)
631  ; 32BIT-NEXT:   renamable $f3 = LFD 0, %stack.1 :: (load (s64) from %stack.1)
632  ; 32BIT-NEXT:   renamable $f1 = nofpexcept FADD killed renamable $f1, killed renamable $f2, implicit $rm
633  ; 32BIT-NEXT:   renamable $f1 = nofpexcept FRSP killed renamable $f1, implicit $rm
634  ; 32BIT-NEXT:   renamable $f0 = nofpexcept FSUB killed renamable $f3, killed renamable $f0, implicit $rm
635  ; 32BIT-NEXT:   renamable $f0 = nofpexcept FRSP killed renamable $f0, implicit $rm
636  ; 32BIT-NEXT:   renamable $f0 = nofpexcept FADDS killed renamable $f0, killed renamable $f1, implicit $rm
637  ; 32BIT-NEXT:   renamable $f0 = nofpexcept FCTIWZ killed renamable $f0, implicit $rm
638  ; 32BIT-NEXT:   STFD killed renamable $f0, 0, %stack.0 :: (store (s64) into %stack.0)
639  ; 32BIT-NEXT:   renamable $r3 = LWZ 4, %stack.0 :: (load (s32) from %stack.0 + 4, basealign 8)
640  ; 32BIT-NEXT:   BLR implicit $lr, implicit $rm, implicit $r3
641  ;
642  ; 64BIT-LABEL: name: test_mix
643  ; 64BIT: bb.0.entry:
644  ; 64BIT-NEXT:   liveins: $f1, $f2, $x4, $x6
645  ; 64BIT-NEXT: {{  $}}
646  ; 64BIT-NEXT:   renamable $r3 = RLWINM renamable $r6, 0, 24, 31, implicit killed $x6
647  ; 64BIT-NEXT:   renamable $r3 = nsw ADD4 renamable $r4, killed renamable $r3, implicit killed $x4
648  ; 64BIT-NEXT:   renamable $x3 = EXTSW_32_64 killed renamable $r3
649  ; 64BIT-NEXT:   STD killed renamable $x3, 0, %stack.1 :: (store (s64) into %stack.1)
650  ; 64BIT-NEXT:   renamable $f0 = LFD 0, %stack.1 :: (load (s64) from %stack.1)
651  ; 64BIT-NEXT:   renamable $f1 = nofpexcept FADD killed renamable $f1, killed renamable $f2, implicit $rm
652  ; 64BIT-NEXT:   renamable $f1 = nofpexcept FRSP killed renamable $f1, implicit $rm
653  ; 64BIT-NEXT:   renamable $f0 = nofpexcept FCFID killed renamable $f0, implicit $rm
654  ; 64BIT-NEXT:   renamable $f0 = nofpexcept FRSP killed renamable $f0, implicit $rm
655  ; 64BIT-NEXT:   renamable $f0 = nofpexcept FADDS killed renamable $f0, killed renamable $f1, implicit $rm
656  ; 64BIT-NEXT:   renamable $f0 = nofpexcept FCTIWZ killed renamable $f0, implicit $rm
657  ; 64BIT-NEXT:   STFD killed renamable $f0, 0, %stack.0 :: (store (s64) into %stack.0)
658  ; 64BIT-NEXT:   renamable $x3 = LWZ8 4, %stack.0 :: (load (s32) from %stack.0 + 4, basealign 8)
659  ; 64BIT-NEXT:   BLR8 implicit $lr8, implicit $rm, implicit $x3
660entry:
661  %conv = fpext float %f to double
662  %add = fadd double %conv, %d
663  %conv1 = fptrunc double %add to float
664  %conv2 = zext i8 %c to i32
665  %add3 = add nsw i32 %i, %conv2
666  %conv4 = sitofp i32 %add3 to float
667  %add5 = fadd float %conv4, %conv1
668  %conv6 = fptosi float %add5 to i32
669  ret i32 %conv6
670}
671
672define i64 @callee_mixed_ints(i32 %a, i8 signext %b, i32 %c, i16 signext %d, i64 %e) {
673  ; 32BIT-LABEL: name: callee_mixed_ints
674  ; 32BIT: bb.0.entry:
675  ; 32BIT-NEXT:   liveins: $r3, $r4, $r5, $r6, $r7, $r8
676  ; 32BIT-NEXT: {{  $}}
677  ; 32BIT-NEXT:   renamable $r4 = RLWINM killed renamable $r4, 0, 24, 31
678  ; 32BIT-NEXT:   renamable $r3 = nsw ADD4 killed renamable $r3, killed renamable $r4
679  ; 32BIT-NEXT:   renamable $r3 = nsw ADD4 killed renamable $r3, killed renamable $r5
680  ; 32BIT-NEXT:   renamable $r3 = nsw ADD4 killed renamable $r3, killed renamable $r6
681  ; 32BIT-NEXT:   renamable $r5 = SRAWI renamable $r3, 31, implicit-def dead $carry
682  ; 32BIT-NEXT:   renamable $r4 = ADDC killed renamable $r3, killed renamable $r8, implicit-def $carry
683  ; 32BIT-NEXT:   renamable $r3 = ADDE killed renamable $r5, killed renamable $r7, implicit-def dead $carry, implicit killed $carry
684  ; 32BIT-NEXT:   BLR implicit $lr, implicit $rm, implicit $r3, implicit $r4
685  ;
686  ; 64BIT-LABEL: name: callee_mixed_ints
687  ; 64BIT: bb.0.entry:
688  ; 64BIT-NEXT:   liveins: $x3, $x4, $x5, $x6, $x7
689  ; 64BIT-NEXT: {{  $}}
690  ; 64BIT-NEXT:   renamable $r4 = RLWINM renamable $r4, 0, 24, 31, implicit killed $x4
691  ; 64BIT-NEXT:   renamable $r3 = nsw ADD4 renamable $r3, killed renamable $r4, implicit killed $x3
692  ; 64BIT-NEXT:   renamable $r3 = nsw ADD4 killed renamable $r3, renamable $r5, implicit killed $x5
693  ; 64BIT-NEXT:   renamable $r3 = nsw ADD4 killed renamable $r3, renamable $r6, implicit killed $x6
694  ; 64BIT-NEXT:   renamable $x3 = EXTSW_32_64 killed renamable $r3
695  ; 64BIT-NEXT:   renamable $x3 = nsw ADD8 killed renamable $x3, killed renamable $x7
696  ; 64BIT-NEXT:   BLR8 implicit $lr8, implicit $rm, implicit $x3
697entry:
698  %conv = zext i8 %b to i32
699  %add = add nsw i32 %a, %conv
700  %add1 = add nsw i32 %add, %c
701  %conv2 = sext i16 %d to i32
702  %add3 = add nsw i32 %add1, %conv2
703  %conv4 = sext i32 %add3 to i64
704  %add5 = add nsw i64 %conv4, %e
705  ret i64 %add5
706  }
707
708define void @call_test_vararg() {
709  ; 32BIT-LABEL: name: call_test_vararg
710  ; 32BIT: bb.0.entry:
711  ; 32BIT-NEXT:   renamable $r3 = LWZtoc @f1, $r2 :: (load (s32) from got)
712  ; 32BIT-NEXT:   renamable $f1 = LFS 0, killed renamable $r3 :: (dereferenceable load (s32) from @f1)
713  ; 32BIT-NEXT:   renamable $r3 = LWZtoc @d1, $r2 :: (load (s32) from got)
714  ; 32BIT-NEXT:   STFD renamable $f1, 0, %stack.1 :: (store (s64) into %stack.1)
715  ; 32BIT-NEXT:   renamable $r4 = LWZ 0, %stack.1 :: (load (s32) from %stack.1, align 8)
716  ; 32BIT-NEXT:   renamable $f2 = LFD 0, killed renamable $r3 :: (dereferenceable load (s64) from @d1)
717  ; 32BIT-NEXT:   renamable $r5 = LWZ 4, %stack.1 :: (load (s32) from %stack.1 + 4)
718  ; 32BIT-NEXT:   STFD renamable $f2, 0, %stack.0 :: (store (s64) into %stack.0)
719  ; 32BIT-NEXT:   renamable $r6 = LWZ 0, %stack.0 :: (load (s32) from %stack.0, align 8)
720  ; 32BIT-NEXT:   renamable $r7 = LWZ 4, %stack.0 :: (load (s32) from %stack.0 + 4)
721  ; 32BIT-NEXT:   ADJCALLSTACKDOWN 56, 0, implicit-def dead $r1, implicit $r1
722  ; 32BIT-NEXT:   $r3 = LI 42
723  ; 32BIT-NEXT:   BL_NOP <mcsymbol .test_vararg[PR]>, csr_aix32, implicit-def dead $lr, implicit $rm, implicit $r3, implicit $f1, implicit $r4, implicit $r5, implicit $f2, implicit $r6, implicit $r7, implicit $r2, implicit-def $r1
724  ; 32BIT-NEXT:   ADJCALLSTACKUP 56, 0, implicit-def dead $r1, implicit $r1
725  ; 32BIT-NEXT:   BLR implicit $lr, implicit $rm
726  ;
727  ; 64BIT-LABEL: name: call_test_vararg
728  ; 64BIT: bb.0.entry:
729  ; 64BIT-NEXT:   renamable $x3 = LDtoc @f1, $x2 :: (load (s64) from got)
730  ; 64BIT-NEXT:   renamable $f1 = LFS 0, killed renamable $x3 :: (dereferenceable load (s32) from @f1)
731  ; 64BIT-NEXT:   renamable $x3 = LDtoc @d1, $x2 :: (load (s64) from got)
732  ; 64BIT-NEXT:   STFD renamable $f1, 0, %stack.1 :: (store (s64) into %stack.1)
733  ; 64BIT-NEXT:   renamable $f2 = LFD 0, killed renamable $x3 :: (dereferenceable load (s64) from @d1)
734  ; 64BIT-NEXT:   renamable $x4 = LD 0, %stack.1 :: (load (s64) from %stack.1)
735  ; 64BIT-NEXT:   STFD renamable $f2, 0, %stack.0 :: (store (s64) into %stack.0)
736  ; 64BIT-NEXT:   renamable $x5 = LD 0, %stack.0 :: (load (s64) from %stack.0)
737  ; 64BIT-NEXT:   ADJCALLSTACKDOWN 112, 0, implicit-def dead $r1, implicit $r1
738  ; 64BIT-NEXT:   $x3 = LI8 42
739  ; 64BIT-NEXT:   BL8_NOP <mcsymbol .test_vararg[PR]>, csr_ppc64, implicit-def dead $lr8, implicit $rm, implicit $x3, implicit $f1, implicit $x4, implicit $f2, implicit $x5, implicit $x2, implicit-def $r1
740  ; 64BIT-NEXT:   ADJCALLSTACKUP 112, 0, implicit-def dead $r1, implicit $r1
741  ; 64BIT-NEXT:   BLR8 implicit $lr8, implicit $rm
742entry:
743  %0 = load float, ptr @f1, align 4
744  %conv = fpext float %0 to double
745  %1 = load double, ptr @d1, align 8
746  call void (i32, ...) @test_vararg(i32 42, double %conv, double %1)
747  ret void
748}
749
750declare void @test_vararg(i32, ...)
751
752define void @call_test_vararg2() {
753  ; 32BIT-LABEL: name: call_test_vararg2
754  ; 32BIT: bb.0.entry:
755  ; 32BIT-NEXT:   renamable $r3 = LWZtoc @f1, $r2 :: (load (s32) from got)
756  ; 32BIT-NEXT:   renamable $f1 = LFS 0, killed renamable $r3 :: (dereferenceable load (s32) from @f1)
757  ; 32BIT-NEXT:   renamable $r3 = LWZtoc @d1, $r2 :: (load (s32) from got)
758  ; 32BIT-NEXT:   STFD renamable $f1, 0, %stack.1 :: (store (s64) into %stack.1)
759  ; 32BIT-NEXT:   renamable $r4 = LWZ 0, %stack.1 :: (load (s32) from %stack.1, align 8)
760  ; 32BIT-NEXT:   renamable $f2 = LFD 0, killed renamable $r3 :: (dereferenceable load (s64) from @d1)
761  ; 32BIT-NEXT:   renamable $r5 = LWZ 4, %stack.1 :: (load (s32) from %stack.1 + 4)
762  ; 32BIT-NEXT:   STFD renamable $f2, 0, %stack.0 :: (store (s64) into %stack.0)
763  ; 32BIT-NEXT:   renamable $r7 = LWZ 0, %stack.0 :: (load (s32) from %stack.0, align 8)
764  ; 32BIT-NEXT:   renamable $r8 = LWZ 4, %stack.0 :: (load (s32) from %stack.0 + 4)
765  ; 32BIT-NEXT:   ADJCALLSTACKDOWN 56, 0, implicit-def dead $r1, implicit $r1
766  ; 32BIT-NEXT:   $r3 = LI 42
767  ; 32BIT-NEXT:   $r6 = LI 42
768  ; 32BIT-NEXT:   BL_NOP <mcsymbol .test_vararg[PR]>, csr_aix32, implicit-def dead $lr, implicit $rm, implicit $r3, implicit $f1, implicit $r4, implicit $r5, implicit killed $r6, implicit $f2, implicit $r7, implicit $r8, implicit $r2, implicit-def $r1
769  ; 32BIT-NEXT:   ADJCALLSTACKUP 56, 0, implicit-def dead $r1, implicit $r1
770  ; 32BIT-NEXT:   BLR implicit $lr, implicit $rm
771  ;
772  ; 64BIT-LABEL: name: call_test_vararg2
773  ; 64BIT: bb.0.entry:
774  ; 64BIT-NEXT:   renamable $x3 = LDtoc @f1, $x2 :: (load (s64) from got)
775  ; 64BIT-NEXT:   renamable $f1 = LFS 0, killed renamable $x3 :: (dereferenceable load (s32) from @f1)
776  ; 64BIT-NEXT:   renamable $x3 = LDtoc @d1, $x2 :: (load (s64) from got)
777  ; 64BIT-NEXT:   STFD renamable $f1, 0, %stack.1 :: (store (s64) into %stack.1)
778  ; 64BIT-NEXT:   renamable $f2 = LFD 0, killed renamable $x3 :: (dereferenceable load (s64) from @d1)
779  ; 64BIT-NEXT:   renamable $x4 = LD 0, %stack.1 :: (load (s64) from %stack.1)
780  ; 64BIT-NEXT:   STFD renamable $f2, 0, %stack.0 :: (store (s64) into %stack.0)
781  ; 64BIT-NEXT:   renamable $x6 = LD 0, %stack.0 :: (load (s64) from %stack.0)
782  ; 64BIT-NEXT:   ADJCALLSTACKDOWN 112, 0, implicit-def dead $r1, implicit $r1
783  ; 64BIT-NEXT:   $x3 = LI8 42
784  ; 64BIT-NEXT:   $x5 = LI8 42
785  ; 64BIT-NEXT:   BL8_NOP <mcsymbol .test_vararg[PR]>, csr_ppc64, implicit-def dead $lr8, implicit $rm, implicit $x3, implicit $f1, implicit $x4, implicit killed $x5, implicit $f2, implicit $x6, implicit $x2, implicit-def $r1
786  ; 64BIT-NEXT:   ADJCALLSTACKUP 112, 0, implicit-def dead $r1, implicit $r1
787  ; 64BIT-NEXT:   BLR8 implicit $lr8, implicit $rm
788entry:
789  %0 = load float, ptr @f1, align 4
790  %conv = fpext float %0 to double
791  %1 = load double, ptr @d1, align 8
792  call void (i32, ...) @test_vararg(i32 42, double %conv, i32 42, double %1)
793  ret void
794}
795
796define void @call_test_vararg3() {
797  ; 32BIT-LABEL: name: call_test_vararg3
798  ; 32BIT: bb.0.entry:
799  ; 32BIT-NEXT:   renamable $r3 = LWZtoc @f1, $r2 :: (load (s32) from got)
800  ; 32BIT-NEXT:   renamable $f1 = LFS 0, killed renamable $r3 :: (dereferenceable load (s32) from @f1)
801  ; 32BIT-NEXT:   renamable $r3 = LWZtoc @d1, $r2 :: (load (s32) from got)
802  ; 32BIT-NEXT:   STFD renamable $f1, 0, %stack.1 :: (store (s64) into %stack.1)
803  ; 32BIT-NEXT:   renamable $r4 = LWZ 0, %stack.1 :: (load (s32) from %stack.1, align 8)
804  ; 32BIT-NEXT:   renamable $f2 = LFD 0, killed renamable $r3 :: (dereferenceable load (s64) from @d1)
805  ; 32BIT-NEXT:   renamable $r5 = LWZ 4, %stack.1 :: (load (s32) from %stack.1 + 4)
806  ; 32BIT-NEXT:   STFD renamable $f2, 0, %stack.0 :: (store (s64) into %stack.0)
807  ; 32BIT-NEXT:   renamable $r8 = LWZ 0, %stack.0 :: (load (s32) from %stack.0, align 8)
808  ; 32BIT-NEXT:   renamable $r9 = LWZ 4, %stack.0 :: (load (s32) from %stack.0 + 4)
809  ; 32BIT-NEXT:   ADJCALLSTACKDOWN 56, 0, implicit-def dead $r1, implicit $r1
810  ; 32BIT-NEXT:   $r3 = LI 42
811  ; 32BIT-NEXT:   $r6 = LI 0
812  ; 32BIT-NEXT:   $r7 = LI 42
813  ; 32BIT-NEXT:   BL_NOP <mcsymbol .test_vararg[PR]>, csr_aix32, implicit-def dead $lr, implicit $rm, implicit $r3, implicit $f1, implicit $r4, implicit $r5, implicit killed $r6, implicit killed $r7, implicit $f2, implicit $r8, implicit $r9, implicit $r2, implicit-def $r1
814  ; 32BIT-NEXT:   ADJCALLSTACKUP 56, 0, implicit-def dead $r1, implicit $r1
815  ; 32BIT-NEXT:   BLR implicit $lr, implicit $rm
816  ;
817  ; 64BIT-LABEL: name: call_test_vararg3
818  ; 64BIT: bb.0.entry:
819  ; 64BIT-NEXT:   renamable $x3 = LDtoc @f1, $x2 :: (load (s64) from got)
820  ; 64BIT-NEXT:   renamable $f1 = LFS 0, killed renamable $x3 :: (dereferenceable load (s32) from @f1)
821  ; 64BIT-NEXT:   renamable $x3 = LDtoc @d1, $x2 :: (load (s64) from got)
822  ; 64BIT-NEXT:   STFD renamable $f1, 0, %stack.1 :: (store (s64) into %stack.1)
823  ; 64BIT-NEXT:   renamable $f2 = LFD 0, killed renamable $x3 :: (dereferenceable load (s64) from @d1)
824  ; 64BIT-NEXT:   renamable $x4 = LD 0, %stack.1 :: (load (s64) from %stack.1)
825  ; 64BIT-NEXT:   STFD renamable $f2, 0, %stack.0 :: (store (s64) into %stack.0)
826  ; 64BIT-NEXT:   renamable $x6 = LD 0, %stack.0 :: (load (s64) from %stack.0)
827  ; 64BIT-NEXT:   ADJCALLSTACKDOWN 112, 0, implicit-def dead $r1, implicit $r1
828  ; 64BIT-NEXT:   $x3 = LI8 42
829  ; 64BIT-NEXT:   $x5 = LI8 42
830  ; 64BIT-NEXT:   BL8_NOP <mcsymbol .test_vararg[PR]>, csr_ppc64, implicit-def dead $lr8, implicit $rm, implicit $x3, implicit $f1, implicit $x4, implicit killed $x5, implicit $f2, implicit $x6, implicit $x2, implicit-def $r1
831  ; 64BIT-NEXT:   ADJCALLSTACKUP 112, 0, implicit-def dead $r1, implicit $r1
832  ; 64BIT-NEXT:   BLR8 implicit $lr8, implicit $rm
833entry:
834  %0 = load float, ptr @f1, align 4
835  %conv = fpext float %0 to double
836  %1 = load double, ptr @d1, align 8
837  call void (i32, ...) @test_vararg(i32 42, double %conv, i64 42, double %1)
838  ret void
839}
840
841define void @call_test_vararg4() {
842  ; 32BIT-LABEL: name: call_test_vararg4
843  ; 32BIT: bb.0.entry:
844  ; 32BIT-NEXT:   renamable $r3 = LWZtoc @f1, $r2 :: (load (s32) from got)
845  ; 32BIT-NEXT:   renamable $f1 = LFS 0, killed renamable $r3 :: (dereferenceable load (s32) from @f1)
846  ; 32BIT-NEXT:   STFS renamable $f1, 0, %stack.0 :: (store (s32) into %stack.0)
847  ; 32BIT-NEXT:   renamable $r4 = LWZ 0, %stack.0 :: (load (s32) from %stack.0)
848  ; 32BIT-NEXT:   ADJCALLSTACKDOWN 56, 0, implicit-def dead $r1, implicit $r1
849  ; 32BIT-NEXT:   $r3 = LI 42
850  ; 32BIT-NEXT:   BL_NOP <mcsymbol .test_vararg[PR]>, csr_aix32, implicit-def dead $lr, implicit $rm, implicit $r3, implicit $f1, implicit $r4, implicit $r2, implicit-def $r1
851  ; 32BIT-NEXT:   ADJCALLSTACKUP 56, 0, implicit-def dead $r1, implicit $r1
852  ; 32BIT-NEXT:   BLR implicit $lr, implicit $rm
853  ;
854  ; 64BIT-LABEL: name: call_test_vararg4
855  ; 64BIT: bb.0.entry:
856  ; 64BIT-NEXT:   renamable $x3 = LDtoc @f1, $x2 :: (load (s64) from got)
857  ; 64BIT-NEXT:   renamable $f1 = LFS 0, killed renamable $x3 :: (dereferenceable load (s32) from @f1)
858  ; 64BIT-NEXT:   STFS renamable $f1, 0, %stack.0 :: (store (s32) into %stack.0)
859  ; 64BIT-NEXT:   renamable $x4 = LWZ8 0, %stack.0 :: (load (s32) from %stack.0)
860  ; 64BIT-NEXT:   ADJCALLSTACKDOWN 112, 0, implicit-def dead $r1, implicit $r1
861  ; 64BIT-NEXT:   $x3 = LI8 42
862  ; 64BIT-NEXT:   BL8_NOP <mcsymbol .test_vararg[PR]>, csr_ppc64, implicit-def dead $lr8, implicit $rm, implicit $x3, implicit $f1, implicit $x4, implicit $x2, implicit-def $r1
863  ; 64BIT-NEXT:   ADJCALLSTACKUP 112, 0, implicit-def dead $r1, implicit $r1
864  ; 64BIT-NEXT:   BLR8 implicit $lr8, implicit $rm
865entry:
866  %0 = load float, ptr @f1, align 4
867  call void (i32, ...) @test_vararg(i32 42, float %0)
868  ret void
869}
870
871@c = common global i8 0, align 1
872@si = common global i16 0, align 2
873@i = common global i32 0, align 4
874@lli = common global i64 0, align 8
875@f = common global float 0.000000e+00, align 4
876@d = common global double 0.000000e+00, align 8
877
878; Basic saving of integral type arguments to the parameter save area.
879define void @call_test_stackarg_int() {
880  ; 32BIT-LABEL: name: call_test_stackarg_int
881  ; 32BIT: bb.0.entry:
882  ; 32BIT-NEXT:   renamable $r3 = LWZtoc @c, $r2 :: (load (s32) from got)
883  ; 32BIT-NEXT:   renamable $r4 = LWZtoc @si, $r2 :: (load (s32) from got)
884  ; 32BIT-NEXT:   renamable $r5 = LWZtoc @i, $r2 :: (load (s32) from got)
885  ; 32BIT-NEXT:   renamable $r11 = LBZ 0, killed renamable $r3 :: (dereferenceable load (s8) from @c)
886  ; 32BIT-NEXT:   renamable $r3 = LWZtoc @lli, $r2 :: (load (s32) from got)
887  ; 32BIT-NEXT:   renamable $r4 = LHA 0, killed renamable $r4 :: (dereferenceable load (s16) from @si)
888  ; 32BIT-NEXT:   renamable $r5 = LWZ 0, killed renamable $r5 :: (dereferenceable load (s32) from @i)
889  ; 32BIT-NEXT:   renamable $r6 = LWZ 0, renamable $r3 :: (dereferenceable load (s32) from @lli, align 8)
890  ; 32BIT-NEXT:   renamable $r3 = LWZ 4, killed renamable $r3 :: (dereferenceable load (s32) from @lli + 4, basealign 8)
891  ; 32BIT-NEXT:   ADJCALLSTACKDOWN 80, 0, implicit-def dead $r1, implicit $r1
892  ; 32BIT-NEXT:   STW renamable $r5, 76, $r1 :: (store (s32))
893  ; 32BIT-NEXT:   STW killed renamable $r3, 72, $r1 :: (store (s32))
894  ; 32BIT-NEXT:   STW killed renamable $r6, 68, $r1 :: (store (s32))
895  ; 32BIT-NEXT:   STW killed renamable $r5, 64, $r1 :: (store (s32))
896  ; 32BIT-NEXT:   STW killed renamable $r4, 60, $r1 :: (store (s32))
897  ; 32BIT-NEXT:   $r3 = LI 1
898  ; 32BIT-NEXT:   $r4 = LI 2
899  ; 32BIT-NEXT:   $r5 = LI 3
900  ; 32BIT-NEXT:   $r6 = LI 4
901  ; 32BIT-NEXT:   $r7 = LI 5
902  ; 32BIT-NEXT:   $r8 = LI 6
903  ; 32BIT-NEXT:   $r9 = LI 7
904  ; 32BIT-NEXT:   $r10 = LI 8
905  ; 32BIT-NEXT:   STW killed renamable $r11, 56, $r1 :: (store (s32))
906  ; 32BIT-NEXT:   BL_NOP <mcsymbol .test_stackarg_int[PR]>, csr_aix32, implicit-def dead $lr, implicit $rm, implicit $r3, implicit $r4, implicit $r5, implicit $r6, implicit $r7, implicit $r8, implicit $r9, implicit $r10, implicit $r2, implicit-def $r1
907  ; 32BIT-NEXT:   ADJCALLSTACKUP 80, 0, implicit-def dead $r1, implicit $r1
908  ; 32BIT-NEXT:   BLR implicit $lr, implicit $rm
909  ;
910  ; 64BIT-LABEL: name: call_test_stackarg_int
911  ; 64BIT: bb.0.entry:
912  ; 64BIT-NEXT:   renamable $x3 = LDtoc @c, $x2 :: (load (s64) from got)
913  ; 64BIT-NEXT:   renamable $x4 = LDtoc @si, $x2 :: (load (s64) from got)
914  ; 64BIT-NEXT:   renamable $x5 = LDtoc @i, $x2 :: (load (s64) from got)
915  ; 64BIT-NEXT:   renamable $x6 = LDtoc @lli, $x2 :: (load (s64) from got)
916  ; 64BIT-NEXT:   renamable $x11 = LBZ8 0, killed renamable $x3 :: (dereferenceable load (s8) from @c)
917  ; 64BIT-NEXT:   renamable $x12 = LHA8 0, killed renamable $x4 :: (dereferenceable load (s16) from @si)
918  ; 64BIT-NEXT:   renamable $x0 = LWZ8 0, killed renamable $x5 :: (dereferenceable load (s32) from @i)
919  ; 64BIT-NEXT:   renamable $x31 = LD 0, killed renamable $x6 :: (dereferenceable load (s64) from @lli)
920  ; 64BIT-NEXT:   ADJCALLSTACKDOWN 152, 0, implicit-def dead $r1, implicit $r1
921  ; 64BIT-NEXT:   $x3 = LI8 1
922  ; 64BIT-NEXT:   $x4 = LI8 2
923  ; 64BIT-NEXT:   $x5 = LI8 3
924  ; 64BIT-NEXT:   $x6 = LI8 4
925  ; 64BIT-NEXT:   $x7 = LI8 5
926  ; 64BIT-NEXT:   $x8 = LI8 6
927  ; 64BIT-NEXT:   $x9 = LI8 7
928  ; 64BIT-NEXT:   $x10 = LI8 8
929  ; 64BIT-NEXT:   STD killed renamable $x31, 136, $x1 :: (store (s64))
930  ; 64BIT-NEXT:   STD renamable $x0, 144, $x1 :: (store (s64))
931  ; 64BIT-NEXT:   STD killed renamable $x0, 128, $x1 :: (store (s64))
932  ; 64BIT-NEXT:   STD killed renamable $x12, 120, $x1 :: (store (s64))
933  ; 64BIT-NEXT:   STD killed renamable $x11, 112, $x1 :: (store (s64))
934  ; 64BIT-NEXT:   BL8_NOP <mcsymbol .test_stackarg_int[PR]>, csr_ppc64, implicit-def dead $lr8, implicit $rm, implicit $x3, implicit $x4, implicit $x5, implicit $x6, implicit $x7, implicit $x8, implicit $x9, implicit $x10, implicit $x2, implicit-def $r1
935  ; 64BIT-NEXT:   ADJCALLSTACKUP 152, 0, implicit-def dead $r1, implicit $r1
936  ; 64BIT-NEXT:   BLR8 implicit $lr8, implicit $rm
937entry:
938  %0 = load i8, ptr @c, align 1
939  %1 = load i16, ptr @si, align 2
940  %2 = load i32, ptr @i, align 4
941  %3 = load i64, ptr @lli, align 8
942  %4 = load i32, ptr @i, align 4
943  call void @test_stackarg_int(i32 1, i32 2, i32 3, i32 4, i32 5, i32 6, i32 7, i32 8, i8 zeroext %0, i16 signext %1, i32 %2, i64 %3, i32 %4)
944  ret void
945}
946
947declare void @test_stackarg_int(i32, i32, i32, i32, i32, i32, i32, i32, i8 zeroext, i16 signext, i32, i64, i32)
948
949; Basic saving of floating point type arguments to the parameter save area.
950; The float and double arguments will pass in both fpr as well as parameter save area.
951define void @call_test_stackarg_float() {
952  ; 32BIT-LABEL: name: call_test_stackarg_float
953  ; 32BIT: bb.0.entry:
954  ; 32BIT-NEXT:   renamable $r3 = LWZtoc @f, $r2 :: (load (s32) from got)
955  ; 32BIT-NEXT:   renamable $r4 = LWZtoc @d, $r2 :: (load (s32) from got)
956  ; 32BIT-NEXT:   renamable $f1 = LFS 0, killed renamable $r3 :: (dereferenceable load (s32) from @f)
957  ; 32BIT-NEXT:   renamable $f2 = LFD 0, killed renamable $r4 :: (dereferenceable load (s64) from @d)
958  ; 32BIT-NEXT:   ADJCALLSTACKDOWN 68, 0, implicit-def dead $r1, implicit $r1
959  ; 32BIT-NEXT:   STFD renamable $f2, 60, $r1 :: (store (s64))
960  ; 32BIT-NEXT:   $r3 = LI 1
961  ; 32BIT-NEXT:   $r4 = LI 2
962  ; 32BIT-NEXT:   $r5 = LI 3
963  ; 32BIT-NEXT:   $r6 = LI 4
964  ; 32BIT-NEXT:   $r7 = LI 5
965  ; 32BIT-NEXT:   $r8 = LI 6
966  ; 32BIT-NEXT:   $r9 = LI 7
967  ; 32BIT-NEXT:   $r10 = LI 8
968  ; 32BIT-NEXT:   STFS renamable $f1, 56, $r1 :: (store (s32))
969  ; 32BIT-NEXT:   BL_NOP <mcsymbol .test_stackarg_float[PR]>, csr_aix32, implicit-def dead $lr, implicit $rm, implicit $r3, implicit $r4, implicit killed $r5, implicit killed $r6, implicit killed $r7, implicit killed $r8, implicit killed $r9, implicit killed $r10, implicit $f1, implicit $f2, implicit $r2, implicit-def $r1
970  ; 32BIT-NEXT:   ADJCALLSTACKUP 68, 0, implicit-def dead $r1, implicit $r1
971  ; 32BIT-NEXT:   BLR implicit $lr, implicit $rm
972  ;
973  ; 64BIT-LABEL: name: call_test_stackarg_float
974  ; 64BIT: bb.0.entry:
975  ; 64BIT-NEXT:   renamable $x3 = LDtoc @f, $x2 :: (load (s64) from got)
976  ; 64BIT-NEXT:   renamable $x4 = LDtoc @d, $x2 :: (load (s64) from got)
977  ; 64BIT-NEXT:   renamable $f1 = LFS 0, killed renamable $x3 :: (dereferenceable load (s32) from @f)
978  ; 64BIT-NEXT:   renamable $f2 = LFD 0, killed renamable $x4 :: (dereferenceable load (s64) from @d)
979  ; 64BIT-NEXT:   ADJCALLSTACKDOWN 128, 0, implicit-def dead $r1, implicit $r1
980  ; 64BIT-NEXT:   STFD renamable $f2, 120, $x1 :: (store (s64))
981  ; 64BIT-NEXT:   $x3 = LI8 1
982  ; 64BIT-NEXT:   $x4 = LI8 2
983  ; 64BIT-NEXT:   $x5 = LI8 3
984  ; 64BIT-NEXT:   $x6 = LI8 4
985  ; 64BIT-NEXT:   $x7 = LI8 5
986  ; 64BIT-NEXT:   $x8 = LI8 6
987  ; 64BIT-NEXT:   $x9 = LI8 7
988  ; 64BIT-NEXT:   $x10 = LI8 8
989  ; 64BIT-NEXT:   STFS renamable $f1, 112, $x1 :: (store (s32))
990  ; 64BIT-NEXT:   BL8_NOP <mcsymbol .test_stackarg_float[PR]>, csr_ppc64, implicit-def dead $lr8, implicit $rm, implicit $x3, implicit $x4, implicit killed $x5, implicit killed $x6, implicit killed $x7, implicit killed $x8, implicit killed $x9, implicit killed $x10, implicit $f1, implicit $f2, implicit $x2, implicit-def $r1
991  ; 64BIT-NEXT:   ADJCALLSTACKUP 128, 0, implicit-def dead $r1, implicit $r1
992  ; 64BIT-NEXT:   BLR8 implicit $lr8, implicit $rm
993entry:
994  %0 = load float, ptr @f, align 4
995  %1 = load double, ptr @d, align 8
996  call void @test_stackarg_float(i32 1, i32 2, i32 3, i32 4, i32 5, i32 6, i32 7, i32 8, float %0, double %1)
997  ret void
998}
999
1000declare void @test_stackarg_float(i32, i32, i32, i32, i32, i32, i32, i32, float, double)
1001
1002define void @call_test_stackarg_float2() {
1003  ; 32BIT-LABEL: name: call_test_stackarg_float2
1004  ; 32BIT: bb.0.entry:
1005  ; 32BIT-NEXT:   renamable $r3 = LWZtoc @d, $r2 :: (load (s32) from got)
1006  ; 32BIT-NEXT:   renamable $f1 = LFD 0, killed renamable $r3 :: (dereferenceable load (s64) from @d)
1007  ; 32BIT-NEXT:   STFD renamable $f1, 0, %stack.0 :: (store (s64) into %stack.0)
1008  ; 32BIT-NEXT:   renamable $r9 = LWZ 0, %stack.0 :: (load (s32) from %stack.0, align 8)
1009  ; 32BIT-NEXT:   renamable $r10 = LWZ 4, %stack.0 :: (load (s32) from %stack.0 + 4)
1010  ; 32BIT-NEXT:   ADJCALLSTACKDOWN 56, 0, implicit-def dead $r1, implicit $r1
1011  ; 32BIT-NEXT:   $r3 = LI 1
1012  ; 32BIT-NEXT:   $r4 = LI 2
1013  ; 32BIT-NEXT:   $r5 = LI 3
1014  ; 32BIT-NEXT:   $r6 = LI 4
1015  ; 32BIT-NEXT:   $r7 = LI 5
1016  ; 32BIT-NEXT:   $r8 = LI 6
1017  ; 32BIT-NEXT:   BL_NOP <mcsymbol .test_stackarg_float2[PR]>, csr_aix32, implicit-def dead $lr, implicit $rm, implicit $r3, implicit killed $r4, implicit killed $r5, implicit killed $r6, implicit killed $r7, implicit killed $r8, implicit $f1, implicit $r9, implicit $r10, implicit $r2, implicit-def $r1
1018  ; 32BIT-NEXT:   ADJCALLSTACKUP 56, 0, implicit-def dead $r1, implicit $r1
1019  ; 32BIT-NEXT:   BLR implicit $lr, implicit $rm
1020  ;
1021  ; 64BIT-LABEL: name: call_test_stackarg_float2
1022  ; 64BIT: bb.0.entry:
1023  ; 64BIT-NEXT:   renamable $x3 = LDtoc @d, $x2 :: (load (s64) from got)
1024  ; 64BIT-NEXT:   renamable $f1 = LFD 0, killed renamable $x3 :: (dereferenceable load (s64) from @d)
1025  ; 64BIT-NEXT:   STFD renamable $f1, 0, %stack.0 :: (store (s64) into %stack.0)
1026  ; 64BIT-NEXT:   renamable $x9 = LD 0, %stack.0 :: (load (s64) from %stack.0)
1027  ; 64BIT-NEXT:   ADJCALLSTACKDOWN 112, 0, implicit-def dead $r1, implicit $r1
1028  ; 64BIT-NEXT:   $x3 = LI8 1
1029  ; 64BIT-NEXT:   $x4 = LI8 2
1030  ; 64BIT-NEXT:   $x5 = LI8 3
1031  ; 64BIT-NEXT:   $x6 = LI8 4
1032  ; 64BIT-NEXT:   $x7 = LI8 5
1033  ; 64BIT-NEXT:   $x8 = LI8 6
1034  ; 64BIT-NEXT:   BL8_NOP <mcsymbol .test_stackarg_float2[PR]>, csr_ppc64, implicit-def dead $lr8, implicit $rm, implicit $x3, implicit killed $x4, implicit killed $x5, implicit killed $x6, implicit killed $x7, implicit killed $x8, implicit $f1, implicit $x9, implicit $x2, implicit-def $r1
1035  ; 64BIT-NEXT:   ADJCALLSTACKUP 112, 0, implicit-def dead $r1, implicit $r1
1036  ; 64BIT-NEXT:   BLR8 implicit $lr8, implicit $rm
1037entry:
1038  %0 = load double, ptr @d, align 8
1039  call void (i32, i32, i32, i32, i32, i32, ...) @test_stackarg_float2(i32 1, i32 2, i32 3, i32 4, i32 5, i32 6, double %0)
1040  ret void
1041}
1042
1043declare void @test_stackarg_float2(i32, i32, i32, i32, i32, i32, ...)
1044
1045; A double arg will pass on the stack in PPC32 if there is only one available GPR.
1046define void @call_test_stackarg_float3() {
1047  ; 32BIT-LABEL: name: call_test_stackarg_float3
1048  ; 32BIT: bb.0.entry:
1049  ; 32BIT-NEXT:   renamable $r3 = LWZtoc @d, $r2 :: (load (s32) from got)
1050  ; 32BIT-NEXT:   renamable $f1 = LFD 0, killed renamable $r3 :: (dereferenceable load (s64) from @d)
1051  ; 32BIT-NEXT:   renamable $r3 = LWZtoc @f, $r2 :: (load (s32) from got)
1052  ; 32BIT-NEXT:   STFD renamable $f1, 0, %stack.0 :: (store (s64) into %stack.0)
1053  ; 32BIT-NEXT:   renamable $r10 = LWZ 0, %stack.0 :: (load (s32) from %stack.0, align 8)
1054  ; 32BIT-NEXT:   renamable $f2 = LFS 0, killed renamable $r3 :: (dereferenceable load (s32) from @f)
1055  ; 32BIT-NEXT:   ADJCALLSTACKDOWN 64, 0, implicit-def dead $r1, implicit $r1
1056  ; 32BIT-NEXT:   STFS renamable $f2, 60, $r1 :: (store (s32))
1057  ; 32BIT-NEXT:   $r3 = LI 1
1058  ; 32BIT-NEXT:   $r4 = LI 2
1059  ; 32BIT-NEXT:   $r5 = LI 3
1060  ; 32BIT-NEXT:   $r6 = LI 4
1061  ; 32BIT-NEXT:   $r7 = LI 5
1062  ; 32BIT-NEXT:   $r8 = LI 6
1063  ; 32BIT-NEXT:   $r9 = LI 7
1064  ; 32BIT-NEXT:   STFD renamable $f1, 52, $r1 :: (store (s64))
1065  ; 32BIT-NEXT:   BL_NOP <mcsymbol .test_stackarg_float3[PR]>, csr_aix32, implicit-def dead $lr, implicit $rm, implicit $r3, implicit killed $r4, implicit killed $r5, implicit killed $r6, implicit killed $r7, implicit killed $r8, implicit killed $r9, implicit $f1, implicit $r10, implicit $f2, implicit $r2, implicit-def $r1
1066  ; 32BIT-NEXT:   ADJCALLSTACKUP 64, 0, implicit-def dead $r1, implicit $r1
1067  ; 32BIT-NEXT:   BLR implicit $lr, implicit $rm
1068  ;
1069  ; 64BIT-LABEL: name: call_test_stackarg_float3
1070  ; 64BIT: bb.0.entry:
1071  ; 64BIT-NEXT:   renamable $x3 = LDtoc @d, $x2 :: (load (s64) from got)
1072  ; 64BIT-NEXT:   renamable $f1 = LFD 0, killed renamable $x3 :: (dereferenceable load (s64) from @d)
1073  ; 64BIT-NEXT:   renamable $x3 = LDtoc @f, $x2 :: (load (s64) from got)
1074  ; 64BIT-NEXT:   STFD renamable $f1, 0, %stack.0 :: (store (s64) into %stack.0)
1075  ; 64BIT-NEXT:   renamable $x10 = LD 0, %stack.0 :: (load (s64) from %stack.0)
1076  ; 64BIT-NEXT:   renamable $f2 = LFS 0, killed renamable $x3 :: (dereferenceable load (s32) from @f)
1077  ; 64BIT-NEXT:   ADJCALLSTACKDOWN 120, 0, implicit-def dead $r1, implicit $r1
1078  ; 64BIT-NEXT:   $x3 = LI8 1
1079  ; 64BIT-NEXT:   $x4 = LI8 2
1080  ; 64BIT-NEXT:   $x5 = LI8 3
1081  ; 64BIT-NEXT:   $x6 = LI8 4
1082  ; 64BIT-NEXT:   $x7 = LI8 5
1083  ; 64BIT-NEXT:   $x8 = LI8 6
1084  ; 64BIT-NEXT:   $x9 = LI8 7
1085  ; 64BIT-NEXT:   STFS renamable $f2, 112, $x1 :: (store (s32))
1086  ; 64BIT-NEXT:   BL8_NOP <mcsymbol .test_stackarg_float3[PR]>, csr_ppc64, implicit-def dead $lr8, implicit $rm, implicit $x3, implicit killed $x4, implicit killed $x5, implicit killed $x6, implicit killed $x7, implicit killed $x8, implicit killed $x9, implicit $f1, implicit $x10, implicit $f2, implicit $x2, implicit-def $r1
1087  ; 64BIT-NEXT:   ADJCALLSTACKUP 120, 0, implicit-def dead $r1, implicit $r1
1088  ; 64BIT-NEXT:   BLR8 implicit $lr8, implicit $rm
1089entry:
1090  %0 = load double, ptr @d, align 8
1091  %1 = load float, ptr @f, align 4
1092  call void (i32, i32, i32, i32, i32, i32, i32, ...) @test_stackarg_float3(i32 1, i32 2, i32 3, i32 4, i32 5, i32 6, i32 7, double %0, float %1)
1093  ret void
1094}
1095
1096declare void @test_stackarg_float3(i32, i32, i32, i32, i32, i32, i32, ...)
1097
1098define i64 @test_ints_stack(i32 %i1, i32 %i2, i32 %i3, i32 %i4, i32 %i5, i32 %i6, i32 %i7, i32 %i8, i64 %ll9, i16 signext %s10, i8 zeroext %c11, i32 %ui12, i32 %si13, i64 %ll14, i8 zeroext %uc15, i32 %i16) {
1099  ; 32BIT-LABEL: name: test_ints_stack
1100  ; 32BIT: bb.0.entry:
1101  ; 32BIT-NEXT:   liveins: $r3, $r4, $r5, $r6, $r7, $r8, $r9, $r10
1102  ; 32BIT-NEXT: {{  $}}
1103  ; 32BIT-NEXT:   renamable $r11 = LWZ 0, %fixed-stack.0 :: (load (s32) from %fixed-stack.0)
1104  ; 32BIT-NEXT:   renamable $r12 = LWZ 0, %fixed-stack.4 :: (load (s32) from %fixed-stack.4)
1105  ; 32BIT-NEXT:   renamable $r0 = LBZ 3, %fixed-stack.1 :: (load (s8) from %fixed-stack.1 + 3, basealign 4)
1106  ; 32BIT-NEXT:   renamable $r31 = LWZ 4, %fixed-stack.3 :: (load (s32) from %fixed-stack.3 + 4, basealign 16)
1107  ; 32BIT-NEXT:   renamable $r30 = LWZ 0, %fixed-stack.3 :: (load (s32) from %fixed-stack.3, align 16)
1108  ; 32BIT-NEXT:   renamable $r29 = LWZ 0, %fixed-stack.5 :: (load (s32) from %fixed-stack.5, align 8)
1109  ; 32BIT-NEXT:   renamable $r28 = LBZ 3, %fixed-stack.6 :: (load (s8) from %fixed-stack.6 + 3, basealign 4)
1110  ; 32BIT-NEXT:   renamable $r27 = LHA 2, %fixed-stack.7 :: (load (s16) from %fixed-stack.7 + 2, basealign 4)
1111  ; 32BIT-NEXT:   renamable $r26 = LWZ 4, %fixed-stack.9 :: (load (s32) from %fixed-stack.9 + 4, basealign 8)
1112  ; 32BIT-NEXT:   renamable $r25 = LWZ 0, %fixed-stack.9 :: (load (s32) from %fixed-stack.9, align 8)
1113  ; 32BIT-NEXT:   renamable $r3 = nsw ADD4 killed renamable $r3, killed renamable $r4
1114  ; 32BIT-NEXT:   renamable $r3 = nsw ADD4 killed renamable $r3, killed renamable $r5
1115  ; 32BIT-NEXT:   renamable $r3 = nsw ADD4 killed renamable $r3, killed renamable $r6
1116  ; 32BIT-NEXT:   renamable $r5 = SRAWI renamable $r11, 31, implicit-def dead $carry
1117  ; 32BIT-NEXT:   renamable $r4 = SRAWI renamable $r12, 31, implicit-def dead $carry
1118  ; 32BIT-NEXT:   renamable $r3 = nsw ADD4 killed renamable $r3, killed renamable $r7
1119  ; 32BIT-NEXT:   renamable $r3 = nsw ADD4 killed renamable $r3, killed renamable $r8
1120  ; 32BIT-NEXT:   renamable $r3 = nsw ADD4 killed renamable $r3, killed renamable $r9
1121  ; 32BIT-NEXT:   renamable $r3 = nsw ADD4 killed renamable $r3, killed renamable $r10
1122  ; 32BIT-NEXT:   renamable $r6 = SRAWI renamable $r3, 31, implicit-def dead $carry
1123  ; 32BIT-NEXT:   renamable $r3 = ADDC killed renamable $r3, killed renamable $r26, implicit-def $carry
1124  ; 32BIT-NEXT:   renamable $r6 = ADDE killed renamable $r6, killed renamable $r25, implicit-def dead $carry, implicit $carry
1125  ; 32BIT-NEXT:   renamable $r7 = SRAWI renamable $r27, 31, implicit-def dead $carry
1126  ; 32BIT-NEXT:   renamable $r3 = ADDC killed renamable $r3, killed renamable $r27, implicit-def $carry
1127  ; 32BIT-NEXT:   renamable $r6 = ADDE killed renamable $r6, killed renamable $r7, implicit-def dead $carry, implicit $carry
1128  ; 32BIT-NEXT:   renamable $r3 = ADDC killed renamable $r3, killed renamable $r28, implicit-def $carry
1129  ; 32BIT-NEXT:   renamable $r6 = ADDZE killed renamable $r6, implicit-def dead $carry, implicit $carry
1130  ; 32BIT-NEXT:   renamable $r3 = ADDC killed renamable $r3, killed renamable $r29, implicit-def $carry
1131  ; 32BIT-NEXT:   renamable $r6 = ADDZE killed renamable $r6, implicit-def dead $carry, implicit $carry
1132  ; 32BIT-NEXT:   renamable $r3 = ADDC killed renamable $r3, killed renamable $r12, implicit-def $carry
1133  ; 32BIT-NEXT:   renamable $r4 = ADDE killed renamable $r6, killed renamable $r4, implicit-def dead $carry, implicit $carry
1134  ; 32BIT-NEXT:   renamable $r3 = ADDC killed renamable $r3, killed renamable $r31, implicit-def $carry
1135  ; 32BIT-NEXT:   renamable $r4 = ADDE killed renamable $r4, killed renamable $r30, implicit-def dead $carry, implicit $carry
1136  ; 32BIT-NEXT:   renamable $r3 = ADDC killed renamable $r3, killed renamable $r0, implicit-def $carry
1137  ; 32BIT-NEXT:   renamable $r6 = ADDZE killed renamable $r4, implicit-def dead $carry, implicit $carry
1138  ; 32BIT-NEXT:   renamable $r4 = ADDC killed renamable $r3, killed renamable $r11, implicit-def $carry
1139  ; 32BIT-NEXT:   renamable $r3 = ADDE killed renamable $r6, killed renamable $r5, implicit-def dead $carry, implicit $carry
1140  ; 32BIT-NEXT:   BLR implicit $lr, implicit $rm, implicit $r3, implicit $r4
1141  ;
1142  ; 64BIT-LABEL: name: test_ints_stack
1143  ; 64BIT: bb.0.entry:
1144  ; 64BIT-NEXT:   liveins: $x3, $x4, $x5, $x6, $x7, $x8, $x9, $x10
1145  ; 64BIT-NEXT: {{  $}}
1146  ; 64BIT-NEXT:   renamable $r11 = LBZ 3, %fixed-stack.1, implicit-def $x11 :: (load (s8) from %fixed-stack.1 + 3, basealign 4)
1147  ; 64BIT-NEXT:   renamable $x12 = LWZ8 0, %fixed-stack.4 :: (load (s32) from %fixed-stack.4)
1148  ; 64BIT-NEXT:   renamable $r0 = LBZ 3, %fixed-stack.5, implicit-def $x0 :: (load (s8) from %fixed-stack.5 + 3, basealign 4)
1149  ; 64BIT-NEXT:   renamable $x2 = LWA 0, %fixed-stack.0 :: (load (s32) from %fixed-stack.0)
1150  ; 64BIT-NEXT:   renamable $x31 = LD 0, %fixed-stack.2 :: (load (s64) from %fixed-stack.2)
1151  ; 64BIT-NEXT:   renamable $x30 = LWA 0, %fixed-stack.3 :: (load (s32) from %fixed-stack.3)
1152  ; 64BIT-NEXT:   renamable $x29 = LHA8 2, %fixed-stack.6
1153  ; 64BIT-NEXT:   renamable $x28 = LD 0, %fixed-stack.7 :: (load (s64) from %fixed-stack.7, align 16)
1154  ; 64BIT-NEXT:   renamable $r3 = nsw ADD4 renamable $r3, renamable $r4, implicit killed $x4, implicit killed $x3
1155  ; 64BIT-NEXT:   renamable $r3 = nsw ADD4 killed renamable $r3, renamable $r5, implicit killed $x5
1156  ; 64BIT-NEXT:   renamable $r3 = nsw ADD4 killed renamable $r3, renamable $r6, implicit killed $x6
1157  ; 64BIT-NEXT:   renamable $r3 = nsw ADD4 killed renamable $r3, renamable $r7, implicit killed $x7
1158  ; 64BIT-NEXT:   renamable $r3 = nsw ADD4 killed renamable $r3, renamable $r8, implicit killed $x8
1159  ; 64BIT-NEXT:   renamable $r3 = nsw ADD4 killed renamable $r3, renamable $r9, implicit killed $x9
1160  ; 64BIT-NEXT:   renamable $r3 = nsw ADD4 killed renamable $r3, renamable $r10, implicit killed $x10
1161  ; 64BIT-NEXT:   renamable $x3 = EXTSW_32_64 killed renamable $r3
1162  ; 64BIT-NEXT:   renamable $x3 = nsw ADD8 killed renamable $x3, killed renamable $x28
1163  ; 64BIT-NEXT:   renamable $x3 = nsw ADD8 killed renamable $x3, killed renamable $x29
1164  ; 64BIT-NEXT:   renamable $x3 = nsw ADD8 killed renamable $x3, killed renamable $x0
1165  ; 64BIT-NEXT:   renamable $x3 = nsw ADD8 killed renamable $x3, killed renamable $x12
1166  ; 64BIT-NEXT:   renamable $x3 = nsw ADD8 killed renamable $x3, killed renamable $x30
1167  ; 64BIT-NEXT:   renamable $x3 = nsw ADD8 killed renamable $x3, killed renamable $x31
1168  ; 64BIT-NEXT:   renamable $x3 = nsw ADD8 killed renamable $x3, killed renamable $x11
1169  ; 64BIT-NEXT:   renamable $x3 = nsw ADD8 killed renamable $x3, killed renamable $x2
1170  ; 64BIT-NEXT:   BLR8 implicit $lr8, implicit $rm, implicit $x3
1171entry:
1172  %add = add nsw i32 %i1, %i2
1173  %add1 = add nsw i32 %add, %i3
1174  %add2 = add nsw i32 %add1, %i4
1175  %add3 = add nsw i32 %add2, %i5
1176  %add4 = add nsw i32 %add3, %i6
1177  %add5 = add nsw i32 %add4, %i7
1178  %add6 = add nsw i32 %add5, %i8
1179  %conv = sext i32 %add6 to i64
1180  %add7 = add nsw i64 %conv, %ll9
1181  %conv8 = sext i16 %s10 to i64
1182  %add9 = add nsw i64 %add7, %conv8
1183  %conv10 = zext i8 %c11 to i64
1184  %add11 = add nsw i64 %add9, %conv10
1185  %conv12 = zext i32 %ui12 to i64
1186  %add13 = add nsw i64 %add11, %conv12
1187  %conv14 = sext i32 %si13 to i64
1188  %add15 = add nsw i64 %add13, %conv14
1189  %add16 = add nsw i64 %add15, %ll14
1190  %conv17 = zext i8 %uc15 to i64
1191  %add18 = add nsw i64 %add16, %conv17
1192  %conv19 = sext i32 %i16 to i64
1193  %add20 = add nsw i64 %add18, %conv19
1194  ret i64 %add20
1195}
1196
1197@ll1 = common global i64 0, align 8
1198@si1 = common global i16 0, align 2
1199@ch = common global i8 0, align 1
1200@ui = common global i32 0, align 4
1201@sint = common global i32 0, align 4
1202@ll2 = common global i64 0, align 8
1203@uc1 = common global i8 0, align 1
1204@i1 = common global i32 0, align 4
1205
1206define void @caller_ints_stack() {
1207  ; 32BIT-LABEL: name: caller_ints_stack
1208  ; 32BIT: bb.0.entry:
1209  ; 32BIT-NEXT:   renamable $r3 = LWZtoc @ll1, $r2 :: (load (s32) from got)
1210  ; 32BIT-NEXT:   renamable $r4 = LWZtoc @si1, $r2 :: (load (s32) from got)
1211  ; 32BIT-NEXT:   renamable $r11 = LWZ 0, renamable $r3 :: (dereferenceable load (s32) from @ll1, align 8)
1212  ; 32BIT-NEXT:   renamable $r5 = LWZtoc @ch, $r2 :: (load (s32) from got)
1213  ; 32BIT-NEXT:   renamable $r3 = LWZ 4, killed renamable $r3 :: (dereferenceable load (s32) from @ll1 + 4, basealign 8)
1214  ; 32BIT-NEXT:   renamable $r6 = LWZtoc @ui, $r2 :: (load (s32) from got)
1215  ; 32BIT-NEXT:   renamable $r4 = LHA 0, killed renamable $r4 :: (dereferenceable load (s16) from @si1)
1216  ; 32BIT-NEXT:   renamable $r7 = LWZtoc @sint, $r2 :: (load (s32) from got)
1217  ; 32BIT-NEXT:   renamable $r5 = LBZ 0, killed renamable $r5 :: (dereferenceable load (s8) from @ch)
1218  ; 32BIT-NEXT:   renamable $r8 = LWZtoc @ll2, $r2 :: (load (s32) from got)
1219  ; 32BIT-NEXT:   renamable $r6 = LWZ 0, killed renamable $r6 :: (dereferenceable load (s32) from @ui)
1220  ; 32BIT-NEXT:   renamable $r7 = LWZ 0, killed renamable $r7 :: (dereferenceable load (s32) from @sint)
1221  ; 32BIT-NEXT:   renamable $r9 = LWZtoc @uc1, $r2 :: (load (s32) from got)
1222  ; 32BIT-NEXT:   renamable $r10 = LWZ 0, renamable $r8 :: (dereferenceable load (s32) from @ll2, align 8)
1223  ; 32BIT-NEXT:   renamable $r12 = LWZtoc @i1, $r2 :: (load (s32) from got)
1224  ; 32BIT-NEXT:   renamable $r8 = LWZ 4, killed renamable $r8 :: (dereferenceable load (s32) from @ll2 + 4, basealign 8)
1225  ; 32BIT-NEXT:   renamable $r9 = LBZ 0, killed renamable $r9 :: (dereferenceable load (s8) from @uc1)
1226  ; 32BIT-NEXT:   renamable $r12 = LWZ 0, killed renamable $r12 :: (dereferenceable load (s32) from @i1)
1227  ; 32BIT-NEXT:   ADJCALLSTACKDOWN 96, 0, implicit-def dead $r1, implicit $r1
1228  ; 32BIT-NEXT:   STW killed renamable $r12, 92, $r1 :: (store (s32))
1229  ; 32BIT-NEXT:   STW killed renamable $r9, 88, $r1 :: (store (s32))
1230  ; 32BIT-NEXT:   STW killed renamable $r8, 84, $r1 :: (store (s32))
1231  ; 32BIT-NEXT:   STW killed renamable $r10, 80, $r1 :: (store (s32))
1232  ; 32BIT-NEXT:   STW killed renamable $r7, 76, $r1 :: (store (s32))
1233  ; 32BIT-NEXT:   STW killed renamable $r6, 72, $r1 :: (store (s32))
1234  ; 32BIT-NEXT:   STW killed renamable $r5, 68, $r1 :: (store (s32))
1235  ; 32BIT-NEXT:   STW killed renamable $r4, 64, $r1 :: (store (s32))
1236  ; 32BIT-NEXT:   STW killed renamable $r3, 60, $r1 :: (store (s32))
1237  ; 32BIT-NEXT:   $r3 = LI 1
1238  ; 32BIT-NEXT:   $r4 = LI 2
1239  ; 32BIT-NEXT:   $r5 = LI 3
1240  ; 32BIT-NEXT:   $r6 = LI 4
1241  ; 32BIT-NEXT:   $r7 = LI 5
1242  ; 32BIT-NEXT:   $r8 = LI 6
1243  ; 32BIT-NEXT:   $r9 = LI 7
1244  ; 32BIT-NEXT:   $r10 = LI 8
1245  ; 32BIT-NEXT:   STW killed renamable $r11, 56, $r1 :: (store (s32))
1246  ; 32BIT-NEXT:   BL_NOP <mcsymbol .test_ints_stack>, csr_aix32, implicit-def dead $lr, implicit $rm, implicit $r3, implicit $r4, implicit $r5, implicit $r6, implicit $r7, implicit $r8, implicit $r9, implicit $r10, implicit $r2, implicit-def $r1, implicit-def dead $r3, implicit-def dead $r4
1247  ; 32BIT-NEXT:   ADJCALLSTACKUP 96, 0, implicit-def dead $r1, implicit $r1
1248  ; 32BIT-NEXT:   BLR implicit $lr, implicit $rm
1249  ;
1250  ; 64BIT-LABEL: name: caller_ints_stack
1251  ; 64BIT: bb.0.entry:
1252  ; 64BIT-NEXT:   renamable $x3 = LDtoc @si1, $x2 :: (load (s64) from got)
1253  ; 64BIT-NEXT:   renamable $x4 = LDtoc @ch, $x2 :: (load (s64) from got)
1254  ; 64BIT-NEXT:   renamable $x5 = LDtoc @ui, $x2 :: (load (s64) from got)
1255  ; 64BIT-NEXT:   renamable $x11 = LHA8 0, killed renamable $x3 :: (dereferenceable load (s16) from @si1)
1256  ; 64BIT-NEXT:   renamable $x3 = LDtoc @sint, $x2 :: (load (s64) from got)
1257  ; 64BIT-NEXT:   renamable $x12 = LBZ8 0, killed renamable $x4 :: (dereferenceable load (s8) from @ch)
1258  ; 64BIT-NEXT:   renamable $x4 = LDtoc @uc1, $x2 :: (load (s64) from got)
1259  ; 64BIT-NEXT:   renamable $x0 = LWZ8 0, killed renamable $x5 :: (dereferenceable load (s32) from @ui)
1260  ; 64BIT-NEXT:   renamable $x5 = LDtoc @ll1, $x2 :: (load (s64) from got)
1261  ; 64BIT-NEXT:   renamable $x6 = LDtoc @ll2, $x2 :: (load (s64) from got)
1262  ; 64BIT-NEXT:   renamable $x7 = LDtoc @i1, $x2 :: (load (s64) from got)
1263  ; 64BIT-NEXT:   renamable $x31 = LWZ8 0, killed renamable $x3 :: (dereferenceable load (s32) from @sint)
1264  ; 64BIT-NEXT:   renamable $x30 = LBZ8 0, killed renamable $x4 :: (dereferenceable load (s8) from @uc1)
1265  ; 64BIT-NEXT:   renamable $x29 = LD 0, killed renamable $x5 :: (dereferenceable load (s64) from @ll1)
1266  ; 64BIT-NEXT:   renamable $x28 = LD 0, killed renamable $x6 :: (dereferenceable load (s64) from @ll2)
1267  ; 64BIT-NEXT:   renamable $x27 = LWZ8 0, killed renamable $x7 :: (dereferenceable load (s32) from @i1)
1268  ; 64BIT-NEXT:   ADJCALLSTACKDOWN 176, 0, implicit-def dead $r1, implicit $r1
1269  ; 64BIT-NEXT:   $x3 = LI8 1
1270  ; 64BIT-NEXT:   $x4 = LI8 2
1271  ; 64BIT-NEXT:   $x5 = LI8 3
1272  ; 64BIT-NEXT:   $x6 = LI8 4
1273  ; 64BIT-NEXT:   $x7 = LI8 5
1274  ; 64BIT-NEXT:   $x8 = LI8 6
1275  ; 64BIT-NEXT:   $x9 = LI8 7
1276  ; 64BIT-NEXT:   $x10 = LI8 8
1277  ; 64BIT-NEXT:   STD killed renamable $x27, 168, $x1 :: (store (s64))
1278  ; 64BIT-NEXT:   STD killed renamable $x30, 160, $x1 :: (store (s64))
1279  ; 64BIT-NEXT:   STD killed renamable $x28, 152, $x1 :: (store (s64))
1280  ; 64BIT-NEXT:   STD killed renamable $x31, 144, $x1 :: (store (s64))
1281  ; 64BIT-NEXT:   STD killed renamable $x0, 136, $x1 :: (store (s64))
1282  ; 64BIT-NEXT:   STD killed renamable $x12, 128, $x1 :: (store (s64))
1283  ; 64BIT-NEXT:   STD killed renamable $x11, 120, $x1 :: (store (s64))
1284  ; 64BIT-NEXT:   STD killed renamable $x29, 112, $x1 :: (store (s64))
1285  ; 64BIT-NEXT:   BL8_NOP <mcsymbol .test_ints_stack>, csr_ppc64, implicit-def dead $lr8, implicit $rm, implicit $x3, implicit $x4, implicit $x5, implicit $x6, implicit $x7, implicit $x8, implicit $x9, implicit $x10, implicit $x2, implicit-def $r1, implicit-def dead $x3
1286  ; 64BIT-NEXT:   ADJCALLSTACKUP 176, 0, implicit-def dead $r1, implicit $r1
1287  ; 64BIT-NEXT:   BLR8 implicit $lr8, implicit $rm
1288entry:
1289  %0 = load i64, ptr @ll1, align 8
1290  %1 = load i16, ptr @si1, align 2
1291  %2 = load i8, ptr @ch, align 1
1292  %3 = load i32, ptr @ui, align 4
1293  %4 = load i32, ptr @sint, align 4
1294  %5 = load i64, ptr @ll2, align 8
1295  %6 = load i8, ptr @uc1, align 1
1296  %7 = load i32, ptr @i1, align 4
1297  %call = call i64 @test_ints_stack(i32 1, i32 2, i32 3, i32 4, i32 5, i32 6, i32 7, i32 8, i64 %0, i16 signext %1, i8 zeroext %2, i32 %3, i32 %4, i64 %5, i8 zeroext %6, i32 %7)
1298  ret void
1299}
1300
1301@globali1 = global i8 0, align 1
1302
1303define void @test_i1_stack(i32 %a, i32 %c, i32 %d, i32 %e, i32 %f, i32 %g, i32 %h, i32 %i, i1 zeroext %b) {
1304  ; 32BIT-LABEL: name: test_i1_stack
1305  ; 32BIT: bb.0.entry:
1306  ; 32BIT-NEXT:   renamable $r3 = LBZ 0, %fixed-stack.0 :: (load (s8) from %fixed-stack.0)
1307  ; 32BIT-NEXT:   renamable $r4 = LWZtoc @globali1, $r2 :: (load (s32) from got)
1308  ; 32BIT-NEXT:   STB killed renamable $r3, 0, killed renamable $r4 :: (store (s8) into @globali1)
1309  ; 32BIT-NEXT:   BLR implicit $lr, implicit $rm
1310  ;
1311  ; 64BIT-LABEL: name: test_i1_stack
1312  ; 64BIT: bb.0.entry:
1313  ; 64BIT-NEXT:   renamable $r3 = LBZ 0, %fixed-stack.0 :: (load (s8) from %fixed-stack.0)
1314  ; 64BIT-NEXT:   renamable $x4 = LDtoc @globali1, $x2 :: (load (s64) from got)
1315  ; 64BIT-NEXT:   STB killed renamable $r3, 0, killed renamable $x4 :: (store (s8) into @globali1)
1316  ; 64BIT-NEXT:   BLR8 implicit $lr8, implicit $rm
1317  entry:
1318    %frombool = zext i1 %b to i8
1319    store i8 %frombool, ptr @globali1, align 1
1320    ret void
1321}
1322
1323define void @call_test_i1_stack() {
1324  ; 32BIT-LABEL: name: call_test_i1_stack
1325  ; 32BIT: bb.0.entry:
1326  ; 32BIT-NEXT:   ADJCALLSTACKDOWN 60, 0, implicit-def dead $r1, implicit $r1
1327  ; 32BIT-NEXT:   renamable $r11 = LI 1
1328  ; 32BIT-NEXT:   $r3 = LI 1
1329  ; 32BIT-NEXT:   $r4 = LI 2
1330  ; 32BIT-NEXT:   $r5 = LI 3
1331  ; 32BIT-NEXT:   $r6 = LI 4
1332  ; 32BIT-NEXT:   $r7 = LI 5
1333  ; 32BIT-NEXT:   $r8 = LI 6
1334  ; 32BIT-NEXT:   $r9 = LI 7
1335  ; 32BIT-NEXT:   $r10 = LI 8
1336  ; 32BIT-NEXT:   STW killed renamable $r11, 56, $r1 :: (store (s32))
1337  ; 32BIT-NEXT:   BL_NOP <mcsymbol .test_i1_stack>, csr_aix32, implicit-def dead $lr, implicit $rm, implicit $r3, implicit $r4, implicit $r5, implicit $r6, implicit $r7, implicit $r8, implicit $r9, implicit $r10, implicit $r2, implicit-def $r1
1338  ; 32BIT-NEXT:   ADJCALLSTACKUP 60, 0, implicit-def dead $r1, implicit $r1
1339  ; 32BIT-NEXT:   BLR implicit $lr, implicit $rm
1340  ;
1341  ; 64BIT-LABEL: name: call_test_i1_stack
1342  ; 64BIT: bb.0.entry:
1343  ; 64BIT-NEXT:   ADJCALLSTACKDOWN 120, 0, implicit-def dead $r1, implicit $r1
1344  ; 64BIT-NEXT:   renamable $x11 = LI8 1
1345  ; 64BIT-NEXT:   $x3 = LI8 1
1346  ; 64BIT-NEXT:   $x4 = LI8 2
1347  ; 64BIT-NEXT:   $x5 = LI8 3
1348  ; 64BIT-NEXT:   $x6 = LI8 4
1349  ; 64BIT-NEXT:   $x7 = LI8 5
1350  ; 64BIT-NEXT:   $x8 = LI8 6
1351  ; 64BIT-NEXT:   $x9 = LI8 7
1352  ; 64BIT-NEXT:   $x10 = LI8 8
1353  ; 64BIT-NEXT:   STD killed renamable $x11, 112, $x1 :: (store (s64))
1354  ; 64BIT-NEXT:   BL8_NOP <mcsymbol .test_i1_stack>, csr_ppc64, implicit-def dead $lr8, implicit $rm, implicit $x3, implicit $x4, implicit $x5, implicit $x6, implicit $x7, implicit $x8, implicit $x9, implicit $x10, implicit $x2, implicit-def $r1
1355  ; 64BIT-NEXT:   ADJCALLSTACKUP 120, 0, implicit-def dead $r1, implicit $r1
1356  ; 64BIT-NEXT:   BLR8 implicit $lr8, implicit $rm
1357  entry:
1358    call void @test_i1_stack(i32 1, i32 2, i32 3, i32 4, i32 5, i32 6, i32 7, i32 8, i1 true)
1359    ret void
1360}
1361
1362define double @test_fpr_stack(double %d1, double %d2, double %d3, double %d4, double %d5, double %d6, double %d7, double %d8, double %d9, double %s10, double %l11, double %d12, double %d13, float %f14, double %d15, float %f16) {
1363  ; 32BIT-LABEL: name: test_fpr_stack
1364  ; 32BIT: bb.0.entry:
1365  ; 32BIT-NEXT:   liveins: $f1, $f2, $f3, $f4, $f5, $f6, $f7, $f8, $f9, $f10, $f11, $f12, $f13
1366  ; 32BIT-NEXT: {{  $}}
1367  ; 32BIT-NEXT:   renamable $f0 = LFD 0, %fixed-stack.1 :: (load (s64) from %fixed-stack.1)
1368  ; 32BIT-NEXT:   renamable $f1 = nofpexcept FADD killed renamable $f1, killed renamable $f2, implicit $rm
1369  ; 32BIT-NEXT:   renamable $f2 = LFS 0, %fixed-stack.2 :: (load (s32) from %fixed-stack.2, align 16)
1370  ; 32BIT-NEXT:   renamable $f1 = nofpexcept FADD killed renamable $f1, killed renamable $f3, implicit $rm
1371  ; 32BIT-NEXT:   renamable $f1 = nofpexcept FADD killed renamable $f1, killed renamable $f4, implicit $rm
1372  ; 32BIT-NEXT:   renamable $f1 = nofpexcept FADD killed renamable $f1, killed renamable $f5, implicit $rm
1373  ; 32BIT-NEXT:   renamable $f1 = nofpexcept FADD killed renamable $f1, killed renamable $f6, implicit $rm
1374  ; 32BIT-NEXT:   renamable $f1 = nofpexcept FADD killed renamable $f1, killed renamable $f7, implicit $rm
1375  ; 32BIT-NEXT:   renamable $f1 = nofpexcept FADD killed renamable $f1, killed renamable $f8, implicit $rm
1376  ; 32BIT-NEXT:   renamable $f1 = nofpexcept FADD killed renamable $f1, killed renamable $f9, implicit $rm
1377  ; 32BIT-NEXT:   renamable $f1 = nofpexcept FADD killed renamable $f1, killed renamable $f10, implicit $rm
1378  ; 32BIT-NEXT:   renamable $f1 = nofpexcept FADD killed renamable $f1, killed renamable $f11, implicit $rm
1379  ; 32BIT-NEXT:   renamable $f1 = nofpexcept FADD killed renamable $f1, killed renamable $f12, implicit $rm
1380  ; 32BIT-NEXT:   renamable $f1 = nofpexcept FADD killed renamable $f1, renamable $f13, implicit $rm
1381  ; 32BIT-NEXT:   renamable $f3 = LFS 0, %fixed-stack.0 :: (load (s32) from %fixed-stack.0)
1382  ; 32BIT-NEXT:   renamable $f1 = nofpexcept FADD killed renamable $f1, killed renamable $f13, implicit $rm
1383  ; 32BIT-NEXT:   renamable $f1 = nofpexcept FADD killed renamable $f1, killed renamable $f2, implicit $rm
1384  ; 32BIT-NEXT:   renamable $f0 = nofpexcept FADD killed renamable $f1, killed renamable $f0, implicit $rm
1385  ; 32BIT-NEXT:   renamable $f1 = nofpexcept FADD killed renamable $f0, killed renamable $f3, implicit $rm
1386  ; 32BIT-NEXT:   BLR implicit $lr, implicit $rm, implicit $f1
1387  ;
1388  ; 64BIT-LABEL: name: test_fpr_stack
1389  ; 64BIT: bb.0.entry:
1390  ; 64BIT-NEXT:   liveins: $f1, $f2, $f3, $f4, $f5, $f6, $f7, $f8, $f9, $f10, $f11, $f12, $f13
1391  ; 64BIT-NEXT: {{  $}}
1392  ; 64BIT-NEXT:   renamable $f0 = LFD 0, %fixed-stack.1 :: (load (s64) from %fixed-stack.1, align 16)
1393  ; 64BIT-NEXT:   renamable $f1 = nofpexcept FADD killed renamable $f1, killed renamable $f2, implicit $rm
1394  ; 64BIT-NEXT:   renamable $f2 = LFS 0, %fixed-stack.2 :: (load (s32) from %fixed-stack.2, align 8)
1395  ; 64BIT-NEXT:   renamable $f1 = nofpexcept FADD killed renamable $f1, killed renamable $f3, implicit $rm
1396  ; 64BIT-NEXT:   renamable $f1 = nofpexcept FADD killed renamable $f1, killed renamable $f4, implicit $rm
1397  ; 64BIT-NEXT:   renamable $f1 = nofpexcept FADD killed renamable $f1, killed renamable $f5, implicit $rm
1398  ; 64BIT-NEXT:   renamable $f1 = nofpexcept FADD killed renamable $f1, killed renamable $f6, implicit $rm
1399  ; 64BIT-NEXT:   renamable $f1 = nofpexcept FADD killed renamable $f1, killed renamable $f7, implicit $rm
1400  ; 64BIT-NEXT:   renamable $f1 = nofpexcept FADD killed renamable $f1, killed renamable $f8, implicit $rm
1401  ; 64BIT-NEXT:   renamable $f1 = nofpexcept FADD killed renamable $f1, killed renamable $f9, implicit $rm
1402  ; 64BIT-NEXT:   renamable $f1 = nofpexcept FADD killed renamable $f1, killed renamable $f10, implicit $rm
1403  ; 64BIT-NEXT:   renamable $f1 = nofpexcept FADD killed renamable $f1, killed renamable $f11, implicit $rm
1404  ; 64BIT-NEXT:   renamable $f1 = nofpexcept FADD killed renamable $f1, killed renamable $f12, implicit $rm
1405  ; 64BIT-NEXT:   renamable $f1 = nofpexcept FADD killed renamable $f1, renamable $f13, implicit $rm
1406  ; 64BIT-NEXT:   renamable $f3 = LFS 0, %fixed-stack.0 :: (load (s32) from %fixed-stack.0, align 8)
1407  ; 64BIT-NEXT:   renamable $f1 = nofpexcept FADD killed renamable $f1, killed renamable $f13, implicit $rm
1408  ; 64BIT-NEXT:   renamable $f1 = nofpexcept FADD killed renamable $f1, killed renamable $f2, implicit $rm
1409  ; 64BIT-NEXT:   renamable $f0 = nofpexcept FADD killed renamable $f1, killed renamable $f0, implicit $rm
1410  ; 64BIT-NEXT:   renamable $f1 = nofpexcept FADD killed renamable $f0, killed renamable $f3, implicit $rm
1411  ; 64BIT-NEXT:   BLR8 implicit $lr8, implicit $rm, implicit $f1
1412  entry:
1413    %add = fadd double %d1, %d2
1414    %add1 = fadd double %add, %d3
1415    %add2 = fadd double %add1, %d4
1416    %add3 = fadd double %add2, %d5
1417    %add4 = fadd double %add3, %d6
1418    %add5 = fadd double %add4, %d7
1419    %add6 = fadd double %add5, %d8
1420    %add7 = fadd double %add6, %d9
1421    %add8 = fadd double %add7, %s10
1422    %add9 = fadd double %add8, %l11
1423    %add10 = fadd double %add9, %d12
1424    %add11 = fadd double %add10, %d13
1425    %add12 = fadd double %add11, %d13
1426    %conv = fpext float %f14 to double
1427    %add13 = fadd double %add12, %conv
1428    %add14 = fadd double %add13, %d15
1429    %conv15 = fpext float %f16 to double
1430    %add16 = fadd double %add14, %conv15
1431    ret double %add16
1432  }
1433
1434@f14 = common global float 0.000000e+00, align 4
1435@d15 = common global double 0.000000e+00, align 8
1436@f16 = common global float 0.000000e+00, align 4
1437
1438define void @caller_fpr_stack() {
1439  ; 32BIT-LABEL: name: caller_fpr_stack
1440  ; 32BIT: bb.0.entry:
1441  ; 32BIT-NEXT:   renamable $r3 = LWZtoc @d15, $r2 :: (load (s32) from got)
1442  ; 32BIT-NEXT:   renamable $r4 = LWZtoc @f14, $r2 :: (load (s32) from got)
1443  ; 32BIT-NEXT:   renamable $f0 = LFD 0, killed renamable $r3 :: (dereferenceable load (s64) from @d15)
1444  ; 32BIT-NEXT:   renamable $r5 = LWZtoc @f16, $r2 :: (load (s32) from got)
1445  ; 32BIT-NEXT:   renamable $r3 = LWZ 0, killed renamable $r4 :: (dereferenceable load (s32) from @f14)
1446  ; 32BIT-NEXT:   renamable $r4 = LWZ 0, killed renamable $r5 :: (dereferenceable load (s32) from @f16)
1447  ; 32BIT-NEXT:   ADJCALLSTACKDOWN 144, 0, implicit-def dead $r1, implicit $r1
1448  ; 32BIT-NEXT:   renamable $r5 = LI 0
1449  ; 32BIT-NEXT:   renamable $r6 = LIS 16352
1450  ; 32BIT-NEXT:   STW killed renamable $r5, 60, $r1 :: (store (s32) into unknown-address + 4, basealign 8)
1451  ; 32BIT-NEXT:   renamable $r5 = LIS 13107
1452  ; 32BIT-NEXT:   STW killed renamable $r6, 56, $r1 :: (store (s32), align 8)
1453  ; 32BIT-NEXT:   renamable $r6 = LIS 16355
1454  ; 32BIT-NEXT:   renamable $r5 = ORI killed renamable $r5, 13107
1455  ; 32BIT-NEXT:   STW killed renamable $r5, 68, $r1 :: (store (s32) into unknown-address + 4, basealign 8)
1456  ; 32BIT-NEXT:   renamable $r5 = LIS 26214
1457  ; 32BIT-NEXT:   renamable $r6 = ORI killed renamable $r6, 13107
1458  ; 32BIT-NEXT:   STW killed renamable $r6, 64, $r1 :: (store (s32), align 8)
1459  ; 32BIT-NEXT:   renamable $r6 = LIS 16358
1460  ; 32BIT-NEXT:   renamable $r5 = ORI killed renamable $r5, 26214
1461  ; 32BIT-NEXT:   STW killed renamable $r5, 76, $r1 :: (store (s32) into unknown-address + 4, basealign 8)
1462  ; 32BIT-NEXT:   renamable $r5 = LIS 39321
1463  ; 32BIT-NEXT:   renamable $r6 = ORI killed renamable $r6, 26214
1464  ; 32BIT-NEXT:   STW killed renamable $r6, 72, $r1 :: (store (s32), align 8)
1465  ; 32BIT-NEXT:   renamable $r6 = LIS 16361
1466  ; 32BIT-NEXT:   renamable $r6 = ORI killed renamable $r6, 39321
1467  ; 32BIT-NEXT:   STW killed renamable $r6, 80, $r1 :: (store (s32), align 8)
1468  ; 32BIT-NEXT:   renamable $r6 = LIS 52428
1469  ; 32BIT-NEXT:   renamable $r6 = ORI killed renamable $r6, 52429
1470  ; 32BIT-NEXT:   STW killed renamable $r6, 92, $r1 :: (store (s32) into unknown-address + 4, basealign 8)
1471  ; 32BIT-NEXT:   renamable $r6 = LIS 16364
1472  ; 32BIT-NEXT:   renamable $r5 = ORI killed renamable $r5, 39322
1473  ; 32BIT-NEXT:   STW renamable $r5, 84, $r1 :: (store (s32) into unknown-address + 4, basealign 8)
1474  ; 32BIT-NEXT:   renamable $r6 = ORI killed renamable $r6, 52428
1475  ; 32BIT-NEXT:   STW killed renamable $r6, 88, $r1 :: (store (s32), align 8)
1476  ; 32BIT-NEXT:   renamable $r6 = LIS 16313
1477  ; 32BIT-NEXT:   STW killed renamable $r5, 100, $r1 :: (store (s32) into unknown-address + 4, basealign 8)
1478  ; 32BIT-NEXT:   renamable $r5 = LIS 49807
1479  ; 32BIT-NEXT:   renamable $r6 = ORI killed renamable $r6, 39321
1480  ; 32BIT-NEXT:   STW killed renamable $r6, 96, $r1 :: (store (s32), align 8)
1481  ; 32BIT-NEXT:   renamable $r6 = LIS 16316
1482  ; 32BIT-NEXT:   renamable $r5 = ORI killed renamable $r5, 23593
1483  ; 32BIT-NEXT:   STW killed renamable $r5, 108, $r1 :: (store (s32) into unknown-address + 4, basealign 8)
1484  ; 32BIT-NEXT:   renamable $r5 = LIS 60293
1485  ; 32BIT-NEXT:   renamable $r6 = ORI killed renamable $r6, 10485
1486  ; 32BIT-NEXT:   STW killed renamable $r6, 104, $r1 :: (store (s32), align 8)
1487  ; 32BIT-NEXT:   renamable $r6 = LIS 16318
1488  ; 32BIT-NEXT:   renamable $r5 = ORI killed renamable $r5, 7864
1489  ; 32BIT-NEXT:   STW killed renamable $r5, 116, $r1 :: (store (s32) into unknown-address + 4, basealign 8)
1490  ; 32BIT-NEXT:   renamable $r5 = LIS 2621
1491  ; 32BIT-NEXT:   renamable $r6 = ORI killed renamable $r6, 47185
1492  ; 32BIT-NEXT:   STW killed renamable $r6, 112, $r1 :: (store (s32), align 8)
1493  ; 32BIT-NEXT:   renamable $r6 = LIS 16320
1494  ; 32BIT-NEXT:   renamable $r5 = ORI killed renamable $r5, 28836
1495  ; 32BIT-NEXT:   STW killed renamable $r5, 124, $r1 :: (store (s32) into unknown-address + 4, basealign 8)
1496  ; 32BIT-NEXT:   renamable $r5 = LWZtoc %const.0, $r2 :: (load (s32) from got)
1497  ; 32BIT-NEXT:   renamable $r6 = ORI killed renamable $r6, 41943
1498  ; 32BIT-NEXT:   STW killed renamable $r6, 120, $r1 :: (store (s32), align 8)
1499  ; 32BIT-NEXT:   renamable $r6 = LWZtoc %const.1, $r2 :: (load (s32) from got)
1500  ; 32BIT-NEXT:   renamable $f2 = LFD 0, killed renamable $r5 :: (load (s64) from constant-pool)
1501  ; 32BIT-NEXT:   renamable $r5 = LWZtoc %const.2, $r2 :: (load (s32) from got)
1502  ; 32BIT-NEXT:   renamable $f3 = LFD 0, killed renamable $r6 :: (load (s64) from constant-pool)
1503  ; 32BIT-NEXT:   renamable $r6 = LWZtoc %const.3, $r2 :: (load (s32) from got)
1504  ; 32BIT-NEXT:   renamable $f4 = LFD 0, killed renamable $r5 :: (load (s64) from constant-pool)
1505  ; 32BIT-NEXT:   renamable $r5 = LWZtoc %const.4, $r2 :: (load (s32) from got)
1506  ; 32BIT-NEXT:   renamable $f6 = LFD 0, killed renamable $r6 :: (load (s64) from constant-pool)
1507  ; 32BIT-NEXT:   renamable $r6 = LWZtoc %const.5, $r2 :: (load (s32) from got)
1508  ; 32BIT-NEXT:   renamable $f7 = LFD 0, killed renamable $r5 :: (load (s64) from constant-pool)
1509  ; 32BIT-NEXT:   renamable $r5 = LWZtoc %const.6, $r2 :: (load (s32) from got)
1510  ; 32BIT-NEXT:   renamable $f8 = LFD 0, killed renamable $r6 :: (load (s64) from constant-pool)
1511  ; 32BIT-NEXT:   renamable $r6 = LWZtoc %const.7, $r2 :: (load (s32) from got)
1512  ; 32BIT-NEXT:   renamable $f9 = LFD 0, killed renamable $r5 :: (load (s64) from constant-pool)
1513  ; 32BIT-NEXT:   renamable $r5 = LWZtoc %const.8, $r2 :: (load (s32) from got)
1514  ; 32BIT-NEXT:   renamable $f1 = LFD 0, killed renamable $r6 :: (load (s64) from constant-pool)
1515  ; 32BIT-NEXT:   renamable $r6 = LWZtoc %const.9, $r2 :: (load (s32) from got)
1516  ; 32BIT-NEXT:   renamable $f11 = LFD 0, killed renamable $r5 :: (load (s64) from constant-pool)
1517  ; 32BIT-NEXT:   renamable $r5 = LWZtoc %const.10, $r2 :: (load (s32) from got)
1518  ; 32BIT-NEXT:   renamable $f12 = LFD 0, killed renamable $r6 :: (load (s64) from constant-pool)
1519  ; 32BIT-NEXT:   renamable $r6 = LWZtoc %const.11, $r2 :: (load (s32) from got)
1520  ; 32BIT-NEXT:   renamable $f13 = LFD 0, killed renamable $r5 :: (load (s64) from constant-pool)
1521  ; 32BIT-NEXT:   renamable $f5 = LFS 0, killed renamable $r6 :: (load (s32) from constant-pool)
1522  ; 32BIT-NEXT:   STW killed renamable $r4, 140, $r1 :: (store (s32))
1523  ; 32BIT-NEXT:   STFD killed renamable $f0, 132, $r1 :: (store (s64))
1524  ; 32BIT-NEXT:   $f10 = COPY renamable $f1
1525  ; 32BIT-NEXT:   STW killed renamable $r3, 128, $r1 :: (store (s32))
1526  ; 32BIT-NEXT:   BL_NOP <mcsymbol .test_fpr_stack>, csr_aix32, implicit-def dead $lr, implicit $rm, implicit $f1, implicit $f2, implicit $f3, implicit $f4, implicit $f5, implicit $f6, implicit $f7, implicit $f8, implicit $f9, implicit killed $f10, implicit $f11, implicit $f12, implicit $f13, implicit $r2, implicit-def $r1, implicit-def dead $f1
1527  ; 32BIT-NEXT:   ADJCALLSTACKUP 144, 0, implicit-def dead $r1, implicit $r1
1528  ; 32BIT-NEXT:   BLR implicit $lr, implicit $rm
1529  ;
1530  ; 64BIT-LABEL: name: caller_fpr_stack
1531  ; 64BIT: bb.0.entry:
1532  ; 64BIT-NEXT:   renamable $x3 = LDtoc @f14, $x2 :: (load (s64) from got)
1533  ; 64BIT-NEXT:   renamable $x4 = LDtoc @d15, $x2 :: (load (s64) from got)
1534  ; 64BIT-NEXT:   renamable $x5 = LDtoc @f16, $x2 :: (load (s64) from got)
1535  ; 64BIT-NEXT:   renamable $r3 = LWZ 0, killed renamable $x3 :: (dereferenceable load (s32) from @f14)
1536  ; 64BIT-NEXT:   renamable $x4 = LD 0, killed renamable $x4 :: (dereferenceable load (s64) from @d15)
1537  ; 64BIT-NEXT:   renamable $r5 = LWZ 0, killed renamable $x5 :: (dereferenceable load (s32) from @f16)
1538  ; 64BIT-NEXT:   ADJCALLSTACKDOWN 176, 0, implicit-def dead $r1, implicit $r1
1539  ; 64BIT-NEXT:   renamable $x6 = LDtocCPT %const.0, $x2 :: (load (s64) from got)
1540  ; 64BIT-NEXT:   STW killed renamable $r5, 168, $x1 :: (store (s32))
1541  ; 64BIT-NEXT:   renamable $x5 = LDtocCPT %const.1, $x2 :: (load (s64) from got)
1542  ; 64BIT-NEXT:   renamable $x7 = LDtocCPT %const.2, $x2 :: (load (s64) from got)
1543  ; 64BIT-NEXT:   renamable $f2 = LFD 0, killed renamable $x6 :: (load (s64) from constant-pool)
1544  ; 64BIT-NEXT:   renamable $x6 = LDtocCPT %const.3, $x2 :: (load (s64) from got)
1545  ; 64BIT-NEXT:   renamable $f3 = LFD 0, killed renamable $x5 :: (load (s64) from constant-pool)
1546  ; 64BIT-NEXT:   renamable $x5 = LDtocCPT %const.4, $x2 :: (load (s64) from got)
1547  ; 64BIT-NEXT:   renamable $f4 = LFD 0, killed renamable $x7 :: (load (s64) from constant-pool)
1548  ; 64BIT-NEXT:   renamable $x7 = LDtocCPT %const.5, $x2 :: (load (s64) from got)
1549  ; 64BIT-NEXT:   renamable $f6 = LFD 0, killed renamable $x6 :: (load (s64) from constant-pool)
1550  ; 64BIT-NEXT:   renamable $x6 = LDtocCPT %const.6, $x2 :: (load (s64) from got)
1551  ; 64BIT-NEXT:   renamable $f7 = LFD 0, killed renamable $x5 :: (load (s64) from constant-pool)
1552  ; 64BIT-NEXT:   STD killed renamable $x4, 160, $x1 :: (store (s64))
1553  ; 64BIT-NEXT:   renamable $x4 = LDtocCPT %const.7, $x2 :: (load (s64) from got)
1554  ; 64BIT-NEXT:   renamable $f8 = LFD 0, killed renamable $x7 :: (load (s64) from constant-pool)
1555  ; 64BIT-NEXT:   renamable $x5 = LIS8 16320
1556  ; 64BIT-NEXT:   renamable $x7 = LDtocCPT %const.8, $x2 :: (load (s64) from got)
1557  ; 64BIT-NEXT:   renamable $f9 = LFD 0, killed renamable $x6 :: (load (s64) from constant-pool)
1558  ; 64BIT-NEXT:   renamable $x6 = LIS8 16318
1559  ; 64BIT-NEXT:   renamable $x8 = LDtocCPT %const.9, $x2 :: (load (s64) from got)
1560  ; 64BIT-NEXT:   renamable $f1 = LFD 0, killed renamable $x4 :: (load (s64) from constant-pool)
1561  ; 64BIT-NEXT:   renamable $x4 = LIS8 16316
1562  ; 64BIT-NEXT:   renamable $f11 = LFD 0, killed renamable $x7 :: (load (s64) from constant-pool)
1563  ; 64BIT-NEXT:   renamable $x7 = LIS8 16313
1564  ; 64BIT-NEXT:   renamable $f12 = LFD 0, killed renamable $x8 :: (load (s64) from constant-pool)
1565  ; 64BIT-NEXT:   renamable $x8 = LDtocCPT %const.10, $x2 :: (load (s64) from got)
1566  ; 64BIT-NEXT:   renamable $x5 = ORI8 killed renamable $x5, 41943
1567  ; 64BIT-NEXT:   renamable $x6 = ORI8 killed renamable $x6, 47185
1568  ; 64BIT-NEXT:   renamable $x4 = ORI8 killed renamable $x4, 10485
1569  ; 64BIT-NEXT:   renamable $x7 = ORI8 killed renamable $x7, 39321
1570  ; 64BIT-NEXT:   renamable $f13 = LFD 0, killed renamable $x8 :: (load (s64) from constant-pool)
1571  ; 64BIT-NEXT:   renamable $x8 = LDtocCPT %const.11, $x2 :: (load (s64) from got)
1572  ; 64BIT-NEXT:   renamable $x5 = RLDIC killed renamable $x5, 32, 2
1573  ; 64BIT-NEXT:   renamable $x6 = RLDIC killed renamable $x6, 32, 2
1574  ; 64BIT-NEXT:   renamable $x4 = RLDIC killed renamable $x4, 32, 2
1575  ; 64BIT-NEXT:   renamable $x7 = RLDIC killed renamable $x7, 32, 2
1576  ; 64BIT-NEXT:   renamable $x5 = ORIS8 killed renamable $x5, 2621
1577  ; 64BIT-NEXT:   renamable $x6 = ORIS8 killed renamable $x6, 60293
1578  ; 64BIT-NEXT:   renamable $x4 = ORIS8 killed renamable $x4, 49807
1579  ; 64BIT-NEXT:   renamable $x7 = ORIS8 killed renamable $x7, 39321
1580  ; 64BIT-NEXT:   renamable $x5 = ORI8 killed renamable $x5, 28836
1581  ; 64BIT-NEXT:   renamable $x6 = ORI8 killed renamable $x6, 7864
1582  ; 64BIT-NEXT:   renamable $x4 = ORI8 killed renamable $x4, 23593
1583  ; 64BIT-NEXT:   renamable $f5 = LFS 0, killed renamable $x8 :: (load (s32) from constant-pool)
1584  ; 64BIT-NEXT:   renamable $x8 = LIS8 4091
1585  ; 64BIT-NEXT:   renamable $x8 = ORI8 killed renamable $x8, 13107
1586  ; 64BIT-NEXT:   renamable $x7 = ORI8 killed renamable $x7, 39322
1587  ; 64BIT-NEXT:   renamable $x8 = RLDIC killed renamable $x8, 34, 2
1588  ; 64BIT-NEXT:   renamable $x8 = ORIS8 killed renamable $x8, 52428
1589  ; 64BIT-NEXT:   renamable $x8 = ORI8 killed renamable $x8, 52429
1590  ; 64BIT-NEXT:   $f10 = COPY renamable $f1
1591  ; 64BIT-NEXT:   STW killed renamable $r3, 152, $x1 :: (store (s32))
1592  ; 64BIT-NEXT:   STD killed renamable $x5, 144, $x1 :: (store (s64))
1593  ; 64BIT-NEXT:   STD killed renamable $x6, 136, $x1 :: (store (s64))
1594  ; 64BIT-NEXT:   STD killed renamable $x4, 128, $x1 :: (store (s64))
1595  ; 64BIT-NEXT:   STD killed renamable $x7, 120, $x1 :: (store (s64))
1596  ; 64BIT-NEXT:   STD killed renamable $x8, 112, $x1 :: (store (s64))
1597  ; 64BIT-NEXT:   BL8_NOP <mcsymbol .test_fpr_stack>, csr_ppc64, implicit-def dead $lr8, implicit $rm, implicit $f1, implicit $f2, implicit $f3, implicit $f4, implicit $f5, implicit $f6, implicit $f7, implicit $f8, implicit $f9, implicit killed $f10, implicit $f11, implicit $f12, implicit $f13, implicit $x2, implicit-def $r1, implicit-def dead $f1
1598  ; 64BIT-NEXT:   ADJCALLSTACKUP 176, 0, implicit-def dead $r1, implicit $r1
1599  ; 64BIT-NEXT:   BLR8 implicit $lr8, implicit $rm
1600entry:
1601  %0 = load float, ptr @f14, align 4
1602  %1 = load double, ptr @d15, align 8
1603  %2 = load float, ptr @f16, align 4
1604  %call = call double @test_fpr_stack(double 1.000000e-01, double 2.000000e-01, double 3.000000e-01, double 4.000000e-01, double 5.000000e-01, double 6.000000e-01, double 0x3FE6666666666666, double 8.000000e-01, double 9.000000e-01, double 1.000000e-01, double 1.100000e-01, double 1.200000e-01, double 1.300000e-01, float %0, double %1, float %2)
1605  ret void
1606}
1607
1608define i32 @mix_callee(double %d1, double %d2, double %d3, double %d4, i8 zeroext %c1, i16 signext %s1, i64 %ll1, i32 %i1, i32 %i2, i32 %i3) {
1609  ; 32BIT-LABEL: name: mix_callee
1610  ; 32BIT: bb.0.entry:
1611  ; 32BIT-NEXT:   liveins: $f1, $f2, $f3, $f4
1612  ; 32BIT-NEXT: {{  $}}
1613  ; 32BIT-NEXT:   renamable $r3 = LWZ 0, %fixed-stack.3 :: (load (s32) from %fixed-stack.3)
1614  ; 32BIT-NEXT:   renamable $r4 = LHA 2, %fixed-stack.5 :: (load (s16) from %fixed-stack.5 + 2, basealign 4)
1615  ; 32BIT-NEXT:   renamable $r5 = LBZ 3, %fixed-stack.6 :: (load (s8) from %fixed-stack.6 + 3, basealign 4)
1616  ; 32BIT-NEXT:   renamable $r6 = LWZ 0, %fixed-stack.2 :: (load (s32) from %fixed-stack.2, align 8)
1617  ; 32BIT-NEXT:   renamable $r7 = LIS 17200
1618  ; 32BIT-NEXT:   STW killed renamable $r7, 0, %stack.1 :: (store (s32) into %stack.1, align 8)
1619  ; 32BIT-NEXT:   renamable $r7 = LWZ 0, %fixed-stack.1 :: (load (s32) from %fixed-stack.1)
1620  ; 32BIT-NEXT:   renamable $r4 = nsw ADD4 killed renamable $r5, killed renamable $r4
1621  ; 32BIT-NEXT:   renamable $r5 = LWZtoc %const.0, $r2 :: (load (s32) from got)
1622  ; 32BIT-NEXT:   renamable $r3 = ADD4 killed renamable $r4, killed renamable $r3
1623  ; 32BIT-NEXT:   renamable $r4 = LWZ 0, %fixed-stack.0 :: (load (s32) from %fixed-stack.0, align 16)
1624  ; 32BIT-NEXT:   renamable $r3 = ADD4 killed renamable $r3, killed renamable $r6
1625  ; 32BIT-NEXT:   renamable $r3 = ADD4 killed renamable $r3, killed renamable $r7
1626  ; 32BIT-NEXT:   renamable $f0 = LFS 0, killed renamable $r5 :: (load (s32) from constant-pool)
1627  ; 32BIT-NEXT:   renamable $r3 = ADD4 killed renamable $r3, killed renamable $r4
1628  ; 32BIT-NEXT:   renamable $r3 = XORIS killed renamable $r3, 32768
1629  ; 32BIT-NEXT:   STW killed renamable $r3, 4, %stack.1 :: (store (s32) into %stack.1 + 4)
1630  ; 32BIT-NEXT:   renamable $f5 = LFD 0, %stack.1 :: (load (s64) from %stack.1)
1631  ; 32BIT-NEXT:   renamable $f1 = nofpexcept FADD killed renamable $f1, killed renamable $f2, implicit $rm
1632  ; 32BIT-NEXT:   renamable $f1 = nofpexcept FADD killed renamable $f1, killed renamable $f3, implicit $rm
1633  ; 32BIT-NEXT:   renamable $f1 = nofpexcept FADD killed renamable $f1, killed renamable $f4, implicit $rm
1634  ; 32BIT-NEXT:   renamable $f0 = nofpexcept FSUB killed renamable $f5, killed renamable $f0, implicit $rm
1635  ; 32BIT-NEXT:   renamable $f0 = nofpexcept FADD killed renamable $f0, killed renamable $f1, implicit $rm
1636  ; 32BIT-NEXT:   renamable $f0 = nofpexcept FCTIWZ killed renamable $f0, implicit $rm
1637  ; 32BIT-NEXT:   STFD killed renamable $f0, 0, %stack.0 :: (store (s64) into %stack.0)
1638  ; 32BIT-NEXT:   renamable $r3 = LWZ 4, %stack.0 :: (load (s32) from %stack.0 + 4, basealign 8)
1639  ; 32BIT-NEXT:   BLR implicit $lr, implicit $rm, implicit $r3
1640  ;
1641  ; 64BIT-LABEL: name: mix_callee
1642  ; 64BIT: bb.0.entry:
1643  ; 64BIT-NEXT:   liveins: $f1, $f2, $f3, $f4, $x7, $x8, $x9, $x10
1644  ; 64BIT-NEXT: {{  $}}
1645  ; 64BIT-NEXT:   renamable $x3 = LWZ8 0, %fixed-stack.1 :: (load (s32) from %fixed-stack.1)
1646  ; 64BIT-NEXT:   renamable $r4 = nsw ADD4 renamable $r7, renamable $r8, implicit killed $x8, implicit killed $x7, implicit-def $x4
1647  ; 64BIT-NEXT:   renamable $x5 = LWZ8 0, %fixed-stack.0 :: (load (s32) from %fixed-stack.0)
1648  ; 64BIT-NEXT:   renamable $x4 = ADD8 killed renamable $x4, killed renamable $x9
1649  ; 64BIT-NEXT:   renamable $x4 = ADD8 killed renamable $x4, killed renamable $x10
1650  ; 64BIT-NEXT:   renamable $x3 = ADD8 killed renamable $x4, killed renamable $x3
1651  ; 64BIT-NEXT:   renamable $x3 = ADD8 killed renamable $x3, killed renamable $x5
1652  ; 64BIT-NEXT:   renamable $x3 = EXTSW killed renamable $x3
1653  ; 64BIT-NEXT:   STD killed renamable $x3, 0, %stack.1 :: (store (s64) into %stack.1)
1654  ; 64BIT-NEXT:   renamable $f0 = LFD 0, %stack.1 :: (load (s64) from %stack.1)
1655  ; 64BIT-NEXT:   renamable $f1 = nofpexcept FADD killed renamable $f1, killed renamable $f2, implicit $rm
1656  ; 64BIT-NEXT:   renamable $f1 = nofpexcept FADD killed renamable $f1, killed renamable $f3, implicit $rm
1657  ; 64BIT-NEXT:   renamable $f1 = nofpexcept FADD killed renamable $f1, killed renamable $f4, implicit $rm
1658  ; 64BIT-NEXT:   renamable $f0 = nofpexcept FCFID killed renamable $f0, implicit $rm
1659  ; 64BIT-NEXT:   renamable $f0 = nofpexcept FADD killed renamable $f0, killed renamable $f1, implicit $rm
1660  ; 64BIT-NEXT:   renamable $f0 = nofpexcept FCTIWZ killed renamable $f0, implicit $rm
1661  ; 64BIT-NEXT:   STFD killed renamable $f0, 0, %stack.0 :: (store (s64) into %stack.0)
1662  ; 64BIT-NEXT:   renamable $x3 = LWZ8 4, %stack.0 :: (load (s32) from %stack.0 + 4, basealign 8)
1663  ; 64BIT-NEXT:   BLR8 implicit $lr8, implicit $rm, implicit $x3
1664  entry:
1665    %add = fadd double %d1, %d2
1666    %add1 = fadd double %add, %d3
1667    %add2 = fadd double %add1, %d4
1668    %conv = zext i8 %c1 to i32
1669    %conv3 = sext i16 %s1 to i32
1670    %add4 = add nsw i32 %conv, %conv3
1671    %conv5 = sext i32 %add4 to i64
1672    %add6 = add nsw i64 %conv5, %ll1
1673    %conv7 = sext i32 %i1 to i64
1674    %add8 = add nsw i64 %add6, %conv7
1675    %conv9 = sext i32 %i2 to i64
1676    %add10 = add nsw i64 %add8, %conv9
1677    %conv11 = sext i32 %i3 to i64
1678    %add12 = add nsw i64 %add10, %conv11
1679    %conv13 = trunc i64 %add12 to i32
1680    %conv14 = sitofp i32 %conv13 to double
1681    %add15 = fadd double %conv14, %add2
1682    %conv16 = fptosi double %add15 to i32
1683    ret i32 %conv16
1684  }
1685
1686define void @caller_mix() {
1687  ; 32BIT-LABEL: name: caller_mix
1688  ; 32BIT: bb.0.entry:
1689  ; 32BIT-NEXT:   ADJCALLSTACKDOWN 84, 0, implicit-def dead $r1, implicit $r1
1690  ; 32BIT-NEXT:   renamable $r3 = LI 60
1691  ; 32BIT-NEXT:   STW killed renamable $r3, 80, $r1 :: (store (s32))
1692  ; 32BIT-NEXT:   renamable $r3 = LI 50
1693  ; 32BIT-NEXT:   STW killed renamable $r3, 76, $r1 :: (store (s32))
1694  ; 32BIT-NEXT:   renamable $r3 = LI 40
1695  ; 32BIT-NEXT:   STW killed renamable $r3, 72, $r1 :: (store (s32))
1696  ; 32BIT-NEXT:   renamable $r3 = LI 0
1697  ; 32BIT-NEXT:   renamable $r4 = LWZtoc %const.0, $r2 :: (load (s32) from got)
1698  ; 32BIT-NEXT:   STW killed renamable $r3, 64, $r1 :: (store (s32))
1699  ; 32BIT-NEXT:   renamable $r3 = LI 2
1700  ; 32BIT-NEXT:   STW killed renamable $r3, 60, $r1 :: (store (s32))
1701  ; 32BIT-NEXT:   renamable $r3 = LWZtoc %const.1, $r2 :: (load (s32) from got)
1702  ; 32BIT-NEXT:   renamable $f1 = LFD 0, killed renamable $r4 :: (load (s64) from constant-pool)
1703  ; 32BIT-NEXT:   renamable $r4 = LWZtoc %const.2, $r2 :: (load (s32) from got)
1704  ; 32BIT-NEXT:   renamable $f2 = LFD 0, killed renamable $r3 :: (load (s64) from constant-pool)
1705  ; 32BIT-NEXT:   renamable $r3 = LWZtoc %const.3, $r2 :: (load (s32) from got)
1706  ; 32BIT-NEXT:   renamable $f3 = LFD 0, killed renamable $r4 :: (load (s64) from constant-pool)
1707  ; 32BIT-NEXT:   renamable $f4 = LFD 0, killed renamable $r3 :: (load (s64) from constant-pool)
1708  ; 32BIT-NEXT:   renamable $r3 = LI 1
1709  ; 32BIT-NEXT:   STW killed renamable $r3, 56, $r1 :: (store (s32))
1710  ; 32BIT-NEXT:   renamable $r3 = LIS 457
1711  ; 32BIT-NEXT:   renamable $r3 = ORI killed renamable $r3, 50048
1712  ; 32BIT-NEXT:   STW killed renamable $r3, 68, $r1 :: (store (s32))
1713  ; 32BIT-NEXT:   BL_NOP <mcsymbol .mix_callee>, csr_aix32, implicit-def dead $lr, implicit $rm, implicit $f1, implicit $f2, implicit $f3, implicit $f4, implicit $r2, implicit-def $r1, implicit-def dead $r3
1714  ; 32BIT-NEXT:   ADJCALLSTACKUP 84, 0, implicit-def dead $r1, implicit $r1
1715  ; 32BIT-NEXT:   BLR implicit $lr, implicit $rm
1716  ;
1717  ; 64BIT-LABEL: name: caller_mix
1718  ; 64BIT: bb.0.entry:
1719  ; 64BIT-NEXT:   ADJCALLSTACKDOWN 128, 0, implicit-def dead $r1, implicit $r1
1720  ; 64BIT-NEXT:   renamable $x3 = LDtocCPT %const.0, $x2 :: (load (s64) from got)
1721  ; 64BIT-NEXT:   renamable $x4 = LDtocCPT %const.1, $x2 :: (load (s64) from got)
1722  ; 64BIT-NEXT:   renamable $x5 = LDtocCPT %const.2, $x2 :: (load (s64) from got)
1723  ; 64BIT-NEXT:   renamable $f1 = LFD 0, killed renamable $x3 :: (load (s64) from constant-pool)
1724  ; 64BIT-NEXT:   renamable $x3 = LDtocCPT %const.3, $x2 :: (load (s64) from got)
1725  ; 64BIT-NEXT:   renamable $f2 = LFD 0, killed renamable $x4 :: (load (s64) from constant-pool)
1726  ; 64BIT-NEXT:   renamable $x4 = LI8 60
1727  ; 64BIT-NEXT:   renamable $f3 = LFD 0, killed renamable $x5 :: (load (s64) from constant-pool)
1728  ; 64BIT-NEXT:   renamable $x5 = LI8 50
1729  ; 64BIT-NEXT:   renamable $f4 = LFD 0, killed renamable $x3 :: (load (s64) from constant-pool)
1730  ; 64BIT-NEXT:   renamable $x3 = LIS8 457
1731  ; 64BIT-NEXT:   renamable $x9 = ORI8 killed renamable $x3, 50048
1732  ; 64BIT-NEXT:   $x7 = LI8 1
1733  ; 64BIT-NEXT:   $x8 = LI8 2
1734  ; 64BIT-NEXT:   $x10 = LI8 40
1735  ; 64BIT-NEXT:   STD killed renamable $x4, 120, $x1 :: (store (s64))
1736  ; 64BIT-NEXT:   STD killed renamable $x5, 112, $x1 :: (store (s64))
1737  ; 64BIT-NEXT:   BL8_NOP <mcsymbol .mix_callee>, csr_ppc64, implicit-def dead $lr8, implicit $rm, implicit $f1, implicit $f2, implicit $f3, implicit $f4, implicit killed $x7, implicit killed $x8, implicit $x9, implicit killed $x10, implicit $x2, implicit-def $r1, implicit-def dead $x3
1738  ; 64BIT-NEXT:   ADJCALLSTACKUP 128, 0, implicit-def dead $r1, implicit $r1
1739  ; 64BIT-NEXT:   BLR8 implicit $lr8, implicit $rm
1740  entry:
1741%call = call i32 @mix_callee(double 1.000000e-01, double 2.000000e-01, double 3.000000e-01, double 4.000000e-01, i8 zeroext 1, i16 signext 2, i64 30000000, i32 40, i32 50, i32 60)
1742    ret void
1743  }
1744
1745  define i32 @mix_floats(i32 %i1, i32 %i2, i32 %i3, i32 %i4, i32 %i5, i32 %i6, i32 %i7, i32 %i8, double %d1, double %d2, double %d3, double %d4, double %d5, double %d6, double %d7, double %d8, double %d9, double %d10, double %d11, double %d12, double %d13, double %d14) {
1746  ; 32BIT-LABEL: name: mix_floats
1747  ; 32BIT: bb.0.entry:
1748  ; 32BIT-NEXT:   liveins: $f1, $f2, $f3, $f4, $f5, $f6, $f7, $f8, $f9, $f10, $f11, $f12, $f13, $r3, $r4, $r5, $r6, $r7, $r8, $r9, $r10
1749  ; 32BIT-NEXT: {{  $}}
1750  ; 32BIT-NEXT:   renamable $r11 = LIS 17200
1751  ; 32BIT-NEXT:   renamable $r3 = nsw ADD4 killed renamable $r3, killed renamable $r4
1752  ; 32BIT-NEXT:   STW killed renamable $r11, 0, %stack.1 :: (store (s32) into %stack.1, align 8)
1753  ; 32BIT-NEXT:   renamable $r4 = LWZtoc %const.0, $r2 :: (load (s32) from got)
1754  ; 32BIT-NEXT:   renamable $r3 = nsw ADD4 killed renamable $r3, killed renamable $r5
1755  ; 32BIT-NEXT:   renamable $r3 = nsw ADD4 killed renamable $r3, killed renamable $r6
1756  ; 32BIT-NEXT:   renamable $r3 = nsw ADD4 killed renamable $r3, killed renamable $r7
1757  ; 32BIT-NEXT:   renamable $f0 = LFS 0, killed renamable $r4 :: (load (s32) from constant-pool)
1758  ; 32BIT-NEXT:   renamable $r3 = nsw ADD4 killed renamable $r3, killed renamable $r8
1759  ; 32BIT-NEXT:   renamable $r3 = nsw ADD4 killed renamable $r3, killed renamable $r9
1760  ; 32BIT-NEXT:   renamable $r3 = nsw ADD4 killed renamable $r3, killed renamable $r10
1761  ; 32BIT-NEXT:   renamable $r3 = XORIS killed renamable $r3, 32768
1762  ; 32BIT-NEXT:   STW killed renamable $r3, 4, %stack.1 :: (store (s32) into %stack.1 + 4)
1763  ; 32BIT-NEXT:   renamable $f31 = LFD 0, %stack.1 :: (load (s64) from %stack.1)
1764  ; 32BIT-NEXT:   renamable $f30 = LFD 0, %fixed-stack.0 :: (load (s64) from %fixed-stack.0, align 16)
1765  ; 32BIT-NEXT:   renamable $f0 = nofpexcept FSUB killed renamable $f31, killed renamable $f0, implicit $rm
1766  ; 32BIT-NEXT:   renamable $f0 = nofpexcept FADD killed renamable $f0, killed renamable $f1, implicit $rm
1767  ; 32BIT-NEXT:   renamable $f0 = nofpexcept FADD killed renamable $f0, killed renamable $f2, implicit $rm
1768  ; 32BIT-NEXT:   renamable $f0 = nofpexcept FADD killed renamable $f0, killed renamable $f3, implicit $rm
1769  ; 32BIT-NEXT:   renamable $f0 = nofpexcept FADD killed renamable $f0, killed renamable $f4, implicit $rm
1770  ; 32BIT-NEXT:   renamable $f0 = nofpexcept FADD killed renamable $f0, killed renamable $f5, implicit $rm
1771  ; 32BIT-NEXT:   renamable $f0 = nofpexcept FADD killed renamable $f0, killed renamable $f6, implicit $rm
1772  ; 32BIT-NEXT:   renamable $f0 = nofpexcept FADD killed renamable $f0, killed renamable $f7, implicit $rm
1773  ; 32BIT-NEXT:   renamable $f0 = nofpexcept FADD killed renamable $f0, killed renamable $f8, implicit $rm
1774  ; 32BIT-NEXT:   renamable $f0 = nofpexcept FADD killed renamable $f0, killed renamable $f9, implicit $rm
1775  ; 32BIT-NEXT:   renamable $f0 = nofpexcept FADD killed renamable $f0, killed renamable $f10, implicit $rm
1776  ; 32BIT-NEXT:   renamable $f0 = nofpexcept FADD killed renamable $f0, killed renamable $f11, implicit $rm
1777  ; 32BIT-NEXT:   renamable $f0 = nofpexcept FADD killed renamable $f0, killed renamable $f12, implicit $rm
1778  ; 32BIT-NEXT:   renamable $f0 = nofpexcept FADD killed renamable $f0, killed renamable $f13, implicit $rm
1779  ; 32BIT-NEXT:   renamable $f0 = nofpexcept FADD killed renamable $f0, killed renamable $f30, implicit $rm
1780  ; 32BIT-NEXT:   renamable $f0 = nofpexcept FCTIWZ killed renamable $f0, implicit $rm
1781  ; 32BIT-NEXT:   STFD killed renamable $f0, 0, %stack.0 :: (store (s64) into %stack.0)
1782  ; 32BIT-NEXT:   renamable $r3 = LWZ 4, %stack.0 :: (load (s32) from %stack.0 + 4, basealign 8)
1783  ; 32BIT-NEXT:   BLR implicit $lr, implicit $rm, implicit $r3
1784  ;
1785  ; 64BIT-LABEL: name: mix_floats
1786  ; 64BIT: bb.0.entry:
1787  ; 64BIT-NEXT:   liveins: $f1, $f2, $f3, $f4, $f5, $f6, $f7, $f8, $f9, $f10, $f11, $f12, $f13, $x3, $x4, $x5, $x6, $x7, $x8, $x9, $x10
1788  ; 64BIT-NEXT: {{  $}}
1789  ; 64BIT-NEXT:   renamable $f0 = LFD 0, %fixed-stack.0 :: (load (s64) from %fixed-stack.0)
1790  ; 64BIT-NEXT:   renamable $r3 = nsw ADD4 renamable $r3, renamable $r4, implicit killed $x4, implicit killed $x3
1791  ; 64BIT-NEXT:   renamable $r3 = nsw ADD4 killed renamable $r3, renamable $r5, implicit killed $x5
1792  ; 64BIT-NEXT:   renamable $r3 = nsw ADD4 killed renamable $r3, renamable $r6, implicit killed $x6
1793  ; 64BIT-NEXT:   renamable $r3 = nsw ADD4 killed renamable $r3, renamable $r7, implicit killed $x7
1794  ; 64BIT-NEXT:   renamable $r3 = nsw ADD4 killed renamable $r3, renamable $r8, implicit killed $x8
1795  ; 64BIT-NEXT:   renamable $r3 = nsw ADD4 killed renamable $r3, renamable $r9, implicit killed $x9
1796  ; 64BIT-NEXT:   renamable $r3 = nsw ADD4 killed renamable $r3, renamable $r10, implicit killed $x10
1797  ; 64BIT-NEXT:   renamable $x3 = EXTSW_32_64 killed renamable $r3
1798  ; 64BIT-NEXT:   STD killed renamable $x3, 0, %stack.1 :: (store (s64) into %stack.1)
1799  ; 64BIT-NEXT:   renamable $f31 = LFD 0, %stack.1 :: (load (s64) from %stack.1)
1800  ; 64BIT-NEXT:   renamable $f31 = nofpexcept FCFID killed renamable $f31, implicit $rm
1801  ; 64BIT-NEXT:   renamable $f1 = nofpexcept FADD killed renamable $f31, killed renamable $f1, implicit $rm
1802  ; 64BIT-NEXT:   renamable $f1 = nofpexcept FADD killed renamable $f1, killed renamable $f2, implicit $rm
1803  ; 64BIT-NEXT:   renamable $f1 = nofpexcept FADD killed renamable $f1, killed renamable $f3, implicit $rm
1804  ; 64BIT-NEXT:   renamable $f1 = nofpexcept FADD killed renamable $f1, killed renamable $f4, implicit $rm
1805  ; 64BIT-NEXT:   renamable $f1 = nofpexcept FADD killed renamable $f1, killed renamable $f5, implicit $rm
1806  ; 64BIT-NEXT:   renamable $f1 = nofpexcept FADD killed renamable $f1, killed renamable $f6, implicit $rm
1807  ; 64BIT-NEXT:   renamable $f1 = nofpexcept FADD killed renamable $f1, killed renamable $f7, implicit $rm
1808  ; 64BIT-NEXT:   renamable $f1 = nofpexcept FADD killed renamable $f1, killed renamable $f8, implicit $rm
1809  ; 64BIT-NEXT:   renamable $f1 = nofpexcept FADD killed renamable $f1, killed renamable $f9, implicit $rm
1810  ; 64BIT-NEXT:   renamable $f1 = nofpexcept FADD killed renamable $f1, killed renamable $f10, implicit $rm
1811  ; 64BIT-NEXT:   renamable $f1 = nofpexcept FADD killed renamable $f1, killed renamable $f11, implicit $rm
1812  ; 64BIT-NEXT:   renamable $f1 = nofpexcept FADD killed renamable $f1, killed renamable $f12, implicit $rm
1813  ; 64BIT-NEXT:   renamable $f1 = nofpexcept FADD killed renamable $f1, killed renamable $f13, implicit $rm
1814  ; 64BIT-NEXT:   renamable $f0 = nofpexcept FADD killed renamable $f1, killed renamable $f0, implicit $rm
1815  ; 64BIT-NEXT:   renamable $f0 = nofpexcept FCTIWZ killed renamable $f0, implicit $rm
1816  ; 64BIT-NEXT:   STFD killed renamable $f0, 0, %stack.0 :: (store (s64) into %stack.0)
1817  ; 64BIT-NEXT:   renamable $x3 = LWZ8 4, %stack.0 :: (load (s32) from %stack.0 + 4, basealign 8)
1818  ; 64BIT-NEXT:   BLR8 implicit $lr8, implicit $rm, implicit $x3
1819  entry:
1820    %add = add nsw i32 %i1, %i2
1821    %add1 = add nsw i32 %add, %i3
1822    %add2 = add nsw i32 %add1, %i4
1823    %add3 = add nsw i32 %add2, %i5
1824    %add4 = add nsw i32 %add3, %i6
1825    %add5 = add nsw i32 %add4, %i7
1826    %add6 = add nsw i32 %add5, %i8
1827    %conv = sitofp i32 %add6 to double
1828    %add7 = fadd double %conv, %d1
1829    %add8 = fadd double %add7, %d2
1830    %add9 = fadd double %add8, %d3
1831    %add10 = fadd double %add9, %d4
1832    %add11 = fadd double %add10, %d5
1833    %add12 = fadd double %add11, %d6
1834    %add13 = fadd double %add12, %d7
1835    %add14 = fadd double %add13, %d8
1836    %add15 = fadd double %add14, %d9
1837    %add16 = fadd double %add15, %d10
1838    %add17 = fadd double %add16, %d11
1839    %add18 = fadd double %add17, %d12
1840    %add19 = fadd double %add18, %d13
1841    %add20 = fadd double %add19, %d14
1842    %conv21 = fptosi double %add20 to i32
1843    ret i32 %conv21
1844  }
1845
1846  define void @mix_floats_caller() {
1847  ; 32BIT-LABEL: name: mix_floats_caller
1848  ; 32BIT: bb.0.entry:
1849  ; 32BIT-NEXT:   ADJCALLSTACKDOWN 168, 0, implicit-def dead $r1, implicit $r1
1850  ; 32BIT-NEXT:   renamable $r3 = LI 0
1851  ; 32BIT-NEXT:   renamable $r4 = LIS 16352
1852  ; 32BIT-NEXT:   renamable $r5 = LIS 16368
1853  ; 32BIT-NEXT:   renamable $r6 = LIS 39321
1854  ; 32BIT-NEXT:   renamable $r7 = LIS 16313
1855  ; 32BIT-NEXT:   renamable $r8 = LIS 16329
1856  ; 32BIT-NEXT:   renamable $r9 = LIS 13107
1857  ; 32BIT-NEXT:   renamable $r10 = LIS 16339
1858  ; 32BIT-NEXT:   STW renamable $r3, 92, $r1 :: (store (s32) into unknown-address + 4, basealign 8)
1859  ; 32BIT-NEXT:   renamable $r11 = LIS 16345
1860  ; 32BIT-NEXT:   STW killed renamable $r4, 88, $r1 :: (store (s32), align 8)
1861  ; 32BIT-NEXT:   renamable $r4 = LIS 16355
1862  ; 32BIT-NEXT:   STW killed renamable $r3, 132, $r1 :: (store (s32) into unknown-address + 4, basealign 8)
1863  ; 32BIT-NEXT:   renamable $r3 = LIS 26214
1864  ; 32BIT-NEXT:   STW killed renamable $r5, 128, $r1 :: (store (s32), align 8)
1865  ; 32BIT-NEXT:   renamable $r5 = ORI killed renamable $r6, 39322
1866  ; 32BIT-NEXT:   STW renamable $r5, 60, $r1 :: (store (s32) into unknown-address + 4, basealign 8)
1867  ; 32BIT-NEXT:   renamable $r6 = ORI killed renamable $r7, 39321
1868  ; 32BIT-NEXT:   STW killed renamable $r6, 56, $r1 :: (store (s32), align 8)
1869  ; 32BIT-NEXT:   renamable $r6 = LIS 16358
1870  ; 32BIT-NEXT:   STW renamable $r5, 68, $r1 :: (store (s32) into unknown-address + 4, basealign 8)
1871  ; 32BIT-NEXT:   renamable $r7 = ORI killed renamable $r8, 39321
1872  ; 32BIT-NEXT:   STW killed renamable $r7, 64, $r1 :: (store (s32), align 8)
1873  ; 32BIT-NEXT:   renamable $r7 = ORI killed renamable $r9, 13107
1874  ; 32BIT-NEXT:   STW renamable $r7, 76, $r1 :: (store (s32) into unknown-address + 4, basealign 8)
1875  ; 32BIT-NEXT:   renamable $r8 = ORI killed renamable $r10, 13107
1876  ; 32BIT-NEXT:   STW killed renamable $r8, 72, $r1 :: (store (s32), align 8)
1877  ; 32BIT-NEXT:   renamable $r8 = LIS 16361
1878  ; 32BIT-NEXT:   STW renamable $r5, 84, $r1 :: (store (s32) into unknown-address + 4, basealign 8)
1879  ; 32BIT-NEXT:   renamable $r9 = ORI killed renamable $r11, 39321
1880  ; 32BIT-NEXT:   STW killed renamable $r9, 80, $r1 :: (store (s32), align 8)
1881  ; 32BIT-NEXT:   renamable $r9 = LIS 52428
1882  ; 32BIT-NEXT:   STW renamable $r7, 100, $r1 :: (store (s32) into unknown-address + 4, basealign 8)
1883  ; 32BIT-NEXT:   renamable $r4 = ORI killed renamable $r4, 13107
1884  ; 32BIT-NEXT:   STW killed renamable $r4, 96, $r1 :: (store (s32), align 8)
1885  ; 32BIT-NEXT:   renamable $r3 = ORI killed renamable $r3, 26214
1886  ; 32BIT-NEXT:   STW renamable $r3, 108, $r1 :: (store (s32) into unknown-address + 4, basealign 8)
1887  ; 32BIT-NEXT:   renamable $r4 = ORI killed renamable $r6, 26214
1888  ; 32BIT-NEXT:   STW killed renamable $r4, 104, $r1 :: (store (s32), align 8)
1889  ; 32BIT-NEXT:   renamable $r4 = LIS 16364
1890  ; 32BIT-NEXT:   STW renamable $r5, 116, $r1 :: (store (s32) into unknown-address + 4, basealign 8)
1891  ; 32BIT-NEXT:   renamable $r6 = ORI killed renamable $r8, 39321
1892  ; 32BIT-NEXT:   STW killed renamable $r6, 112, $r1 :: (store (s32), align 8)
1893  ; 32BIT-NEXT:   renamable $r6 = ORI killed renamable $r9, 52429
1894  ; 32BIT-NEXT:   STW renamable $r6, 124, $r1 :: (store (s32) into unknown-address + 4, basealign 8)
1895  ; 32BIT-NEXT:   renamable $r4 = ORI killed renamable $r4, 52428
1896  ; 32BIT-NEXT:   STW killed renamable $r4, 120, $r1 :: (store (s32), align 8)
1897  ; 32BIT-NEXT:   renamable $r4 = LIS 16369
1898  ; 32BIT-NEXT:   STW killed renamable $r5, 140, $r1 :: (store (s32) into unknown-address + 4, basealign 8)
1899  ; 32BIT-NEXT:   renamable $r4 = ORI killed renamable $r4, 39321
1900  ; 32BIT-NEXT:   STW killed renamable $r4, 136, $r1 :: (store (s32), align 8)
1901  ; 32BIT-NEXT:   renamable $r4 = LIS 16371
1902  ; 32BIT-NEXT:   STW killed renamable $r7, 148, $r1 :: (store (s32) into unknown-address + 4, basealign 8)
1903  ; 32BIT-NEXT:   renamable $r4 = ORI killed renamable $r4, 13107
1904  ; 32BIT-NEXT:   STW killed renamable $r4, 144, $r1 :: (store (s32), align 8)
1905  ; 32BIT-NEXT:   renamable $r4 = LIS 16372
1906  ; 32BIT-NEXT:   renamable $r5 = LWZtoc %const.0, $r2 :: (load (s32) from got)
1907  ; 32BIT-NEXT:   STW killed renamable $r6, 156, $r1 :: (store (s32) into unknown-address + 4, basealign 8)
1908  ; 32BIT-NEXT:   renamable $r4 = ORI killed renamable $r4, 52428
1909  ; 32BIT-NEXT:   STW killed renamable $r4, 152, $r1 :: (store (s32), align 8)
1910  ; 32BIT-NEXT:   renamable $r4 = LWZtoc %const.1, $r2 :: (load (s32) from got)
1911  ; 32BIT-NEXT:   STW killed renamable $r3, 164, $r1 :: (store (s32) into unknown-address + 4, basealign 8)
1912  ; 32BIT-NEXT:   renamable $r3 = LWZtoc %const.2, $r2 :: (load (s32) from got)
1913  ; 32BIT-NEXT:   renamable $f1 = LFD 0, killed renamable $r5 :: (load (s64) from constant-pool)
1914  ; 32BIT-NEXT:   renamable $r5 = LWZtoc %const.3, $r2 :: (load (s32) from got)
1915  ; 32BIT-NEXT:   renamable $f2 = LFD 0, killed renamable $r4 :: (load (s64) from constant-pool)
1916  ; 32BIT-NEXT:   renamable $r4 = LWZtoc %const.4, $r2 :: (load (s32) from got)
1917  ; 32BIT-NEXT:   renamable $f3 = LFD 0, killed renamable $r3 :: (load (s64) from constant-pool)
1918  ; 32BIT-NEXT:   renamable $r3 = LWZtoc %const.5, $r2 :: (load (s32) from got)
1919  ; 32BIT-NEXT:   renamable $f4 = LFD 0, killed renamable $r5 :: (load (s64) from constant-pool)
1920  ; 32BIT-NEXT:   renamable $r5 = LWZtoc %const.6, $r2 :: (load (s32) from got)
1921  ; 32BIT-NEXT:   renamable $f6 = LFD 0, killed renamable $r4 :: (load (s64) from constant-pool)
1922  ; 32BIT-NEXT:   renamable $r4 = LWZtoc %const.7, $r2 :: (load (s32) from got)
1923  ; 32BIT-NEXT:   renamable $f7 = LFD 0, killed renamable $r3 :: (load (s64) from constant-pool)
1924  ; 32BIT-NEXT:   renamable $r3 = LWZtoc %const.8, $r2 :: (load (s32) from got)
1925  ; 32BIT-NEXT:   renamable $f8 = LFD 0, killed renamable $r5 :: (load (s64) from constant-pool)
1926  ; 32BIT-NEXT:   renamable $r5 = LWZtoc %const.9, $r2 :: (load (s32) from got)
1927  ; 32BIT-NEXT:   renamable $f9 = LFD 0, killed renamable $r4 :: (load (s64) from constant-pool)
1928  ; 32BIT-NEXT:   renamable $r4 = LWZtoc %const.10, $r2 :: (load (s32) from got)
1929  ; 32BIT-NEXT:   renamable $f11 = LFD 0, killed renamable $r3 :: (load (s64) from constant-pool)
1930  ; 32BIT-NEXT:   renamable $r3 = LWZtoc %const.11, $r2 :: (load (s32) from got)
1931  ; 32BIT-NEXT:   renamable $f12 = LFD 0, killed renamable $r5 :: (load (s64) from constant-pool)
1932  ; 32BIT-NEXT:   renamable $r5 = LWZtoc %const.12, $r2 :: (load (s32) from got)
1933  ; 32BIT-NEXT:   renamable $f13 = LFD 0, killed renamable $r4 :: (load (s64) from constant-pool)
1934  ; 32BIT-NEXT:   renamable $r4 = LIS 16374
1935  ; 32BIT-NEXT:   renamable $f5 = LFS 0, killed renamable $r3 :: (load (s32) from constant-pool)
1936  ; 32BIT-NEXT:   renamable $r11 = ORI killed renamable $r4, 26214
1937  ; 32BIT-NEXT:   renamable $f10 = LFS 0, killed renamable $r5 :: (load (s32) from constant-pool)
1938  ; 32BIT-NEXT:   $r3 = LI 1
1939  ; 32BIT-NEXT:   $r4 = LI 2
1940  ; 32BIT-NEXT:   $r5 = LI 3
1941  ; 32BIT-NEXT:   $r6 = LI 4
1942  ; 32BIT-NEXT:   $r7 = LI 5
1943  ; 32BIT-NEXT:   $r8 = LI 6
1944  ; 32BIT-NEXT:   $r9 = LI 7
1945  ; 32BIT-NEXT:   $r10 = LI 8
1946  ; 32BIT-NEXT:   STW killed renamable $r11, 160, $r1 :: (store (s32), align 8)
1947  ; 32BIT-NEXT:   BL_NOP <mcsymbol .mix_floats>, csr_aix32, implicit-def dead $lr, implicit $rm, implicit $r3, implicit $r4, implicit $r5, implicit $r6, implicit $r7, implicit $r8, implicit $r9, implicit $r10, implicit $f1, implicit $f2, implicit $f3, implicit $f4, implicit $f5, implicit $f6, implicit $f7, implicit $f8, implicit $f9, implicit $f10, implicit $f11, implicit $f12, implicit $f13, implicit $r2, implicit-def $r1, implicit-def dead $r3
1948  ; 32BIT-NEXT:   ADJCALLSTACKUP 168, 0, implicit-def dead $r1, implicit $r1
1949  ; 32BIT-NEXT:   BLR implicit $lr, implicit $rm
1950  ;
1951  ; 64BIT-LABEL: name: mix_floats_caller
1952  ; 64BIT: bb.0.entry:
1953  ; 64BIT-NEXT:   ADJCALLSTACKDOWN 224, 0, implicit-def dead $r1, implicit $r1
1954  ; 64BIT-NEXT:   renamable $x3 = LI8 1023
1955  ; 64BIT-NEXT:   renamable $x4 = LI8 511
1956  ; 64BIT-NEXT:   renamable $x5 = LIS8 16374
1957  ; 64BIT-NEXT:   renamable $x6 = LIS8 16371
1958  ; 64BIT-NEXT:   renamable $x7 = LIS8 16358
1959  ; 64BIT-NEXT:   renamable $x8 = LIS8 16355
1960  ; 64BIT-NEXT:   renamable $x9 = LIS8 16339
1961  ; 64BIT-NEXT:   renamable $x10 = LIS8 4093
1962  ; 64BIT-NEXT:   renamable $x11 = LDtocCPT %const.0, $x2 :: (load (s64) from got)
1963  ; 64BIT-NEXT:   renamable $x29 = LIS8 16369
1964  ; 64BIT-NEXT:   renamable $x28 = LIS8 4091
1965  ; 64BIT-NEXT:   renamable $x12 = LDtocCPT %const.1, $x2 :: (load (s64) from got)
1966  ; 64BIT-NEXT:   renamable $x27 = LIS8 16361
1967  ; 64BIT-NEXT:   renamable $x31 = LDtocCPT %const.2, $x2 :: (load (s64) from got)
1968  ; 64BIT-NEXT:   renamable $f1 = LFD 0, killed renamable $x11 :: (load (s64) from constant-pool)
1969  ; 64BIT-NEXT:   renamable $x26 = LIS8 16345
1970  ; 64BIT-NEXT:   renamable $x11 = LDtocCPT %const.3, $x2 :: (load (s64) from got)
1971  ; 64BIT-NEXT:   renamable $f2 = LFD 0, killed renamable $x12 :: (load (s64) from constant-pool)
1972  ; 64BIT-NEXT:   renamable $x25 = LIS8 16329
1973  ; 64BIT-NEXT:   renamable $f3 = LFD 0, killed renamable $x31 :: (load (s64) from constant-pool)
1974  ; 64BIT-NEXT:   renamable $x24 = LIS8 16313
1975  ; 64BIT-NEXT:   renamable $x23 = LDtocCPT %const.4, $x2 :: (load (s64) from got)
1976  ; 64BIT-NEXT:   renamable $x22 = LDtocCPT %const.5, $x2 :: (load (s64) from got)
1977  ; 64BIT-NEXT:   renamable $x21 = LDtocCPT %const.6, $x2 :: (load (s64) from got)
1978  ; 64BIT-NEXT:   renamable $x20 = LDtocCPT %const.7, $x2 :: (load (s64) from got)
1979  ; 64BIT-NEXT:   renamable $x19 = LDtocCPT %const.8, $x2 :: (load (s64) from got)
1980  ; 64BIT-NEXT:   renamable $x18 = LDtocCPT %const.9, $x2 :: (load (s64) from got)
1981  ; 64BIT-NEXT:   renamable $x17 = LDtocCPT %const.10, $x2 :: (load (s64) from got)
1982  ; 64BIT-NEXT:   renamable $f4 = LFD 0, killed renamable $x11 :: (load (s64) from constant-pool)
1983  ; 64BIT-NEXT:   renamable $x16 = LDtocCPT %const.11, $x2 :: (load (s64) from got)
1984  ; 64BIT-NEXT:   renamable $x11 = ORI8 killed renamable $x5, 26214
1985  ; 64BIT-NEXT:   renamable $x12 = ORI8 killed renamable $x6, 13107
1986  ; 64BIT-NEXT:   renamable $x0 = ORI8 killed renamable $x7, 26214
1987  ; 64BIT-NEXT:   renamable $x31 = ORI8 killed renamable $x8, 13107
1988  ; 64BIT-NEXT:   renamable $x30 = ORI8 killed renamable $x9, 13107
1989  ; 64BIT-NEXT:   renamable $x5 = ORI8 killed renamable $x10, 13107
1990  ; 64BIT-NEXT:   renamable $x6 = ORI8 killed renamable $x29, 39321
1991  ; 64BIT-NEXT:   renamable $x7 = ORI8 killed renamable $x28, 13107
1992  ; 64BIT-NEXT:   renamable $x8 = ORI8 killed renamable $x27, 39321
1993  ; 64BIT-NEXT:   renamable $x9 = ORI8 killed renamable $x26, 39321
1994  ; 64BIT-NEXT:   renamable $x10 = ORI8 killed renamable $x25, 39321
1995  ; 64BIT-NEXT:   renamable $x27 = ORI8 killed renamable $x24, 39321
1996  ; 64BIT-NEXT:   renamable $f6 = LFD 0, killed renamable $x23 :: (load (s64) from constant-pool)
1997  ; 64BIT-NEXT:   renamable $x26 = LDtocCPT %const.12, $x2 :: (load (s64) from got)
1998  ; 64BIT-NEXT:   renamable $x29 = RLDIC killed renamable $x3, 52, 2
1999  ; 64BIT-NEXT:   renamable $x28 = RLDIC killed renamable $x4, 53, 2
2000  ; 64BIT-NEXT:   renamable $x11 = RLDIMI killed renamable $x11, renamable $x11, 32, 0
2001  ; 64BIT-NEXT:   renamable $x12 = RLDIMI killed renamable $x12, renamable $x12, 32, 0
2002  ; 64BIT-NEXT:   renamable $x0 = RLDIMI killed renamable $x0, renamable $x0, 32, 0
2003  ; 64BIT-NEXT:   renamable $x31 = RLDIMI killed renamable $x31, renamable $x31, 32, 0
2004  ; 64BIT-NEXT:   renamable $x30 = RLDIMI killed renamable $x30, renamable $x30, 32, 0
2005  ; 64BIT-NEXT:   renamable $x3 = RLDIC killed renamable $x5, 34, 2
2006  ; 64BIT-NEXT:   renamable $x4 = RLDIC killed renamable $x6, 32, 2
2007  ; 64BIT-NEXT:   renamable $x5 = RLDIC killed renamable $x7, 34, 2
2008  ; 64BIT-NEXT:   renamable $x6 = RLDIC killed renamable $x8, 32, 2
2009  ; 64BIT-NEXT:   renamable $x7 = RLDIC killed renamable $x9, 32, 2
2010  ; 64BIT-NEXT:   renamable $x8 = RLDIC killed renamable $x10, 32, 2
2011  ; 64BIT-NEXT:   renamable $x9 = RLDIC killed renamable $x27, 32, 2
2012  ; 64BIT-NEXT:   renamable $x11 = RLWIMI8 killed renamable $x11, renamable $x11, 16, 0, 15
2013  ; 64BIT-NEXT:   renamable $x12 = RLWIMI8 killed renamable $x12, renamable $x12, 16, 0, 15
2014  ; 64BIT-NEXT:   renamable $x0 = RLWIMI8 killed renamable $x0, renamable $x0, 16, 0, 15
2015  ; 64BIT-NEXT:   renamable $x31 = RLWIMI8 killed renamable $x31, renamable $x31, 16, 0, 15
2016  ; 64BIT-NEXT:   renamable $x30 = RLWIMI8 killed renamable $x30, renamable $x30, 16, 0, 15
2017  ; 64BIT-NEXT:   renamable $x3 = ORIS8 killed renamable $x3, 52428
2018  ; 64BIT-NEXT:   renamable $x4 = ORIS8 killed renamable $x4, 39321
2019  ; 64BIT-NEXT:   renamable $x5 = ORIS8 killed renamable $x5, 52428
2020  ; 64BIT-NEXT:   renamable $x6 = ORIS8 killed renamable $x6, 39321
2021  ; 64BIT-NEXT:   renamable $x7 = ORIS8 killed renamable $x7, 39321
2022  ; 64BIT-NEXT:   renamable $x8 = ORIS8 killed renamable $x8, 39321
2023  ; 64BIT-NEXT:   renamable $x9 = ORIS8 killed renamable $x9, 39321
2024  ; 64BIT-NEXT:   renamable $f7 = LFD 0, killed renamable $x22 :: (load (s64) from constant-pool)
2025  ; 64BIT-NEXT:   renamable $x27 = ORI8 killed renamable $x3, 52429
2026  ; 64BIT-NEXT:   renamable $f8 = LFD 0, killed renamable $x21 :: (load (s64) from constant-pool)
2027  ; 64BIT-NEXT:   renamable $x25 = ORI8 killed renamable $x4, 39322
2028  ; 64BIT-NEXT:   renamable $f9 = LFD 0, killed renamable $x20 :: (load (s64) from constant-pool)
2029  ; 64BIT-NEXT:   renamable $x24 = ORI8 killed renamable $x5, 52429
2030  ; 64BIT-NEXT:   renamable $f11 = LFD 0, killed renamable $x19 :: (load (s64) from constant-pool)
2031  ; 64BIT-NEXT:   renamable $x23 = ORI8 killed renamable $x6, 39322
2032  ; 64BIT-NEXT:   renamable $f12 = LFD 0, killed renamable $x18 :: (load (s64) from constant-pool)
2033  ; 64BIT-NEXT:   renamable $x22 = ORI8 killed renamable $x7, 39322
2034  ; 64BIT-NEXT:   renamable $f13 = LFD 0, killed renamable $x17 :: (load (s64) from constant-pool)
2035  ; 64BIT-NEXT:   renamable $x21 = ORI8 killed renamable $x8, 39322
2036  ; 64BIT-NEXT:   renamable $f5 = LFS 0, killed renamable $x16 :: (load (s32) from constant-pool)
2037  ; 64BIT-NEXT:   renamable $x20 = ORI8 killed renamable $x9, 39322
2038  ; 64BIT-NEXT:   renamable $f10 = LFS 0, killed renamable $x26 :: (load (s32) from constant-pool)
2039  ; 64BIT-NEXT:   $x3 = LI8 1
2040  ; 64BIT-NEXT:   $x4 = LI8 2
2041  ; 64BIT-NEXT:   $x5 = LI8 3
2042  ; 64BIT-NEXT:   $x6 = LI8 4
2043  ; 64BIT-NEXT:   $x7 = LI8 5
2044  ; 64BIT-NEXT:   $x8 = LI8 6
2045  ; 64BIT-NEXT:   $x9 = LI8 7
2046  ; 64BIT-NEXT:   $x10 = LI8 8
2047  ; 64BIT-NEXT:   STD killed renamable $x29, 184, $x1 :: (store (s64))
2048  ; 64BIT-NEXT:   STD killed renamable $x28, 144, $x1 :: (store (s64))
2049  ; 64BIT-NEXT:   STD killed renamable $x11, 216, $x1 :: (store (s64))
2050  ; 64BIT-NEXT:   STD killed renamable $x12, 200, $x1 :: (store (s64))
2051  ; 64BIT-NEXT:   STD killed renamable $x0, 160, $x1 :: (store (s64))
2052  ; 64BIT-NEXT:   STD killed renamable $x31, 152, $x1 :: (store (s64))
2053  ; 64BIT-NEXT:   STD killed renamable $x30, 128, $x1 :: (store (s64))
2054  ; 64BIT-NEXT:   STD killed renamable $x27, 208, $x1 :: (store (s64))
2055  ; 64BIT-NEXT:   STD killed renamable $x25, 192, $x1 :: (store (s64))
2056  ; 64BIT-NEXT:   STD killed renamable $x24, 176, $x1 :: (store (s64))
2057  ; 64BIT-NEXT:   STD killed renamable $x23, 168, $x1 :: (store (s64))
2058  ; 64BIT-NEXT:   STD killed renamable $x22, 136, $x1 :: (store (s64))
2059  ; 64BIT-NEXT:   STD killed renamable $x21, 120, $x1 :: (store (s64))
2060  ; 64BIT-NEXT:   STD killed renamable $x20, 112, $x1 :: (store (s64))
2061  ; 64BIT-NEXT:   BL8_NOP <mcsymbol .mix_floats>, csr_ppc64, implicit-def dead $lr8, implicit $rm, implicit $x3, implicit $x4, implicit $x5, implicit $x6, implicit $x7, implicit $x8, implicit $x9, implicit $x10, implicit $f1, implicit $f2, implicit $f3, implicit $f4, implicit $f5, implicit $f6, implicit $f7, implicit $f8, implicit $f9, implicit $f10, implicit $f11, implicit $f12, implicit $f13, implicit $x2, implicit-def $r1, implicit-def dead $x3
2062  ; 64BIT-NEXT:   ADJCALLSTACKUP 224, 0, implicit-def dead $r1, implicit $r1
2063  ; 64BIT-NEXT:   BLR8 implicit $lr8, implicit $rm
2064  entry:
2065    %call = call i32 @mix_floats(i32 1, i32 2, i32 3, i32 4, i32 5, i32 6, i32 7, i32 8, double 1.000000e-01, double 2.000000e-01, double 3.000000e-01, double 4.000000e-01, double 5.000000e-01, double 6.000000e-01, double 0x3FE6666666666666, double 8.000000e-01, double 9.000000e-01, double 1.000000e+00, double 1.100000e+00, double 1.200000e+00, double 1.300000e+00, double 1.400000e+00)
2066    ret void
2067  }
2068
2069