1 ; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py
2 ; RUN: llc -mtriple=powerpc64-- -verify-machineinstrs \
3 ; RUN: -ppc-asm-full-reg-names < %s | FileCheck %s
4 %struct.e.0.1.2.3.12.29 = type { [10 x i32] }
6 define dso_local void @g(ptr %agg.result) local_unnamed_addr #0 {
8 ; CHECK: # %bb.0: # %entry
10 ; CHECK-NEXT: stdu r1, -112(r1)
11 ; CHECK-NEXT: std r0, 128(r1)
14 ; CHECK-NEXT: addis r4, r2, g@toc@ha
15 ; CHECK-NEXT: addi r5, r4, g@toc@l
16 ; CHECK-NEXT: ld r6, 16(r5)
17 ; CHECK-NEXT: std r6, 16(r3)
18 ; CHECK-NEXT: ld r4, g@toc@l(r4)
19 ; CHECK-NEXT: std r4, 0(r3)
20 ; CHECK-NEXT: rldicl r4, r4, 32, 32
21 ; CHECK-NEXT: ld r7, 8(r5)
22 ; CHECK-NEXT: std r7, 8(r3)
23 ; CHECK-NEXT: ld r7, 24(r5)
24 ; CHECK-NEXT: std r7, 24(r3)
25 ; CHECK-NEXT: ld r5, 32(r5)
26 ; CHECK-NEXT: std r5, 32(r3)
27 ; CHECK-NEXT: stwbrx r4, 0, r3
28 ; CHECK-NEXT: li r4, 20
29 ; CHECK-NEXT: stwbrx r6, r3, r4
30 ; CHECK-NEXT: addi r1, r1, 112
31 ; CHECK-NEXT: ld r0, 16(r1)
35 %call = tail call signext i32 @i()
36 %conv = sext i32 %call to i64
37 %0 = inttoptr i64 %conv to ptr
38 tail call void @llvm.memcpy.p0.p0.i64(ptr nonnull align 4 dereferenceable(40) %0, ptr nonnull align 4 dereferenceable(40) @g, i64 40, i1 false)
39 %1 = inttoptr i64 %conv to ptr
40 %2 = load i32, ptr %1, align 4
41 %rev.i = tail call i32 @llvm.bswap.i32(i32 %2)
42 store i32 %rev.i, ptr %1, align 4
43 %incdec.ptr.i.4 = getelementptr inbounds i32, ptr %1, i64 5
44 %3 = load i32, ptr %incdec.ptr.i.4, align 4
45 %rev.i.5 = tail call i32 @llvm.bswap.i32(i32 %3)
46 store i32 %rev.i.5, ptr %incdec.ptr.i.4, align 4
50 declare i32 @i(...) local_unnamed_addr
52 ; Function Attrs: argmemonly nounwind willreturn
53 declare void @llvm.memcpy.p0.p0.i64(ptr noalias nocapture writeonly, ptr noalias nocapture readonly, i64, i1 immarg) #1
55 ; Function Attrs: nounwind readnone speculatable willreturn
56 declare i32 @llvm.bswap.i32(i32)
58 attributes #0 = { nounwind }