1 ; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py
2 ; RUN: llc -ppc-asm-full-reg-names -mtriple=powerpc64le-unknown-linux-gnu \
3 ; RUN: %s -o - -verify-machineinstrs | FileCheck %s --check-prefix=LE
4 ; RUN: llc -ppc-asm-full-reg-names -mtriple=powerpc64-ibm-aix-xcoff \
5 ; RUN: %s -o - -verify-machineinstrs | FileCheck %s --check-prefix=AIX
7 %struct.type8 = type { i32, i32 }
8 %struct.type16 = type { i32, i32, i32, i32 }
10 declare ptr @f0(ptr noundef byval(%struct.type8) align 8)
11 declare ptr @f1(ptr noundef byval(%struct.type16) align 8)
13 define void @bar1(i64 %a) nounwind {
17 ; LE-NEXT: stdu r1, -48(r1)
18 ; LE-NEXT: std r0, 64(r1)
19 ; LE-NEXT: std r3, 40(r1)
22 ; LE-NEXT: addi r1, r1, 48
23 ; LE-NEXT: ld r0, 16(r1)
30 ; AIX-NEXT: stdu r1, -128(r1)
31 ; AIX-NEXT: std r0, 144(r1)
32 ; AIX-NEXT: std r3, 120(r1)
33 ; AIX-NEXT: bl .f0[PR]
35 ; AIX-NEXT: addi r1, r1, 128
36 ; AIX-NEXT: ld r0, 16(r1)
39 %s = alloca %struct.type8, align 8
40 store i64 %a, ptr %s, align 8
41 %call = tail call ptr @f0(ptr noundef nonnull byval(%struct.type8) align 8 %s)
45 define void @bar2(i64 %a) nounwind {
49 ; LE-NEXT: stdu r1, -48(r1)
51 ; LE-NEXT: std r0, 64(r1)
52 ; LE-NEXT: std r3, 32(r1)
53 ; LE-NEXT: std r3, 40(r1)
56 ; LE-NEXT: addi r1, r1, 48
57 ; LE-NEXT: ld r0, 16(r1)
64 ; AIX-NEXT: stdu r1, -128(r1)
66 ; AIX-NEXT: std r0, 144(r1)
67 ; AIX-NEXT: std r3, 112(r1)
68 ; AIX-NEXT: std r3, 120(r1)
69 ; AIX-NEXT: bl .f1[PR]
71 ; AIX-NEXT: addi r1, r1, 128
72 ; AIX-NEXT: ld r0, 16(r1)
75 %s = alloca %struct.type16, align 8
76 %index1 = getelementptr inbounds i64, ptr %s, i32 0
77 store i64 %a, ptr %index1, align 8
78 %index2 = getelementptr inbounds i64, ptr %s, i32 1
79 store i64 %a, ptr %index2, align 8
80 %call = tail call ptr @f1(ptr noundef nonnull byval(%struct.type16) align 8 %s)