xref: /aosp_15_r20/external/llvm/test/CodeGen/PowerPC/varargs.ll (revision 9880d6810fe72a1726cb53787c6711e909410d58)
1*9880d681SAndroid Build Coastguard Worker; RUN: llc < %s -mtriple=powerpc-apple-darwin | FileCheck -check-prefix=P32 %s
2*9880d681SAndroid Build Coastguard Worker; RUN: llc < %s -mtriple=powerpc64-apple-darwin | FileCheck -check-prefix=P64 %s
3*9880d681SAndroid Build Coastguard Worker
4*9880d681SAndroid Build Coastguard Worker; PR8327
5*9880d681SAndroid Build Coastguard Workerdefine i8* @test1(i8** %foo) nounwind {
6*9880d681SAndroid Build Coastguard Worker  %A = va_arg i8** %foo, i8*
7*9880d681SAndroid Build Coastguard Worker  ret i8* %A
8*9880d681SAndroid Build Coastguard Worker}
9*9880d681SAndroid Build Coastguard Worker
10*9880d681SAndroid Build Coastguard Worker; P32-LABEL: test1:
11*9880d681SAndroid Build Coastguard Worker; P32: lwz r2, 0(r3)
12*9880d681SAndroid Build Coastguard Worker; P32: addi r4, r2, 4
13*9880d681SAndroid Build Coastguard Worker; P32: stw r4, 0(r3)
14*9880d681SAndroid Build Coastguard Worker; P32: lwz r3, 0(r2)
15*9880d681SAndroid Build Coastguard Worker; P32: blr
16*9880d681SAndroid Build Coastguard Worker
17*9880d681SAndroid Build Coastguard Worker; P64-LABEL: test1:
18*9880d681SAndroid Build Coastguard Worker; P64: ld r2, 0(r3)
19*9880d681SAndroid Build Coastguard Worker; P64: addi r4, r2, 8
20*9880d681SAndroid Build Coastguard Worker; P64: std r4, 0(r3)
21*9880d681SAndroid Build Coastguard Worker; P64: ld r3, 0(r2)
22*9880d681SAndroid Build Coastguard Worker; P64: blr
23*9880d681SAndroid Build Coastguard Worker
24