1 ; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py
2 ; RUN: llc -mcpu=pwr10 -verify-machineinstrs -mtriple=powerpc64le-unknown-linux-gnu \
3 ; RUN: -mattr=+quadword-atomics -ppc-asm-full-reg-names -o - %s | FileCheck %s
5 %struct.StructA = type { [16 x i8] }
7 @s1 = dso_local global i128 324929342, align 16
9 ; Function Attrs: mustprogress noinline nounwind optnone uwtable
10 define dso_local void @STQ() #0 {
12 ; CHECK: # %bb.0: # %entry
13 ; CHECK-NEXT: lis r0, -16
14 ; CHECK-NEXT: ori r0, r0, 51488
15 ; CHECK-NEXT: stdux r1, r1, r0
16 ; CHECK-NEXT: .cfi_def_cfa_offset 997088
17 ; CHECK-NEXT: pld r3, s1@PCREL+8(0), 1
18 ; CHECK-NEXT: std r3, 40(r1)
19 ; CHECK-NEXT: pld r3, s1@PCREL(0), 1
20 ; CHECK-NEXT: std r3, 32(r1)
21 ; CHECK-NEXT: ld r3, 40(r1)
22 ; CHECK-NEXT: ld r4, 32(r1)
24 ; CHECK-NEXT: mr r5, r4
25 ; CHECK-NEXT: mr r4, r3
26 ; CHECK-NEXT: lis r3, 15
27 ; CHECK-NEXT: ori r3, r3, 14032
28 ; CHECK-NEXT: add r3, r3, r1
29 ; CHECK-NEXT: stq r4, 0(r3)
30 ; CHECK-NEXT: ld r1, 0(r1)
33 %s2 = alloca %struct.StructA, align 16
34 %s3 = alloca %struct.StructA, align 16
35 %arr = alloca [997003 x i8], align 1
36 %tmp = alloca %struct.StructA, align 16
37 call void @llvm.memcpy.p0.p0.i64(ptr align 16 %tmp, ptr align 16 @s1, i64 16, i1 false)
38 %0 = load i128, ptr %tmp, align 16
39 store atomic i128 %0, ptr %s2 seq_cst, align 16
43 define dso_local void @LQ() #0 {
45 ; CHECK: # %bb.0: # %entry
46 ; CHECK-NEXT: lis r0, -16
47 ; CHECK-NEXT: ori r0, r0, 51488
48 ; CHECK-NEXT: stdux r1, r1, r0
49 ; CHECK-NEXT: .cfi_def_cfa_offset 997088
50 ; CHECK-NEXT: pld r3, s1@PCREL+8(0), 1
51 ; CHECK-NEXT: std r3, 40(r1)
52 ; CHECK-NEXT: pld r3, s1@PCREL(0), 1
53 ; CHECK-NEXT: std r3, 32(r1)
55 ; CHECK-NEXT: lis r3, 15
56 ; CHECK-NEXT: ori r3, r3, 14016
57 ; CHECK-NEXT: add r3, r3, r1
58 ; CHECK-NEXT: lq r4, 0(r3)
59 ; CHECK-NEXT: cmpd cr7, r5, r5
60 ; CHECK-NEXT: bne- cr7, .+4
62 ; CHECK-NEXT: ld r1, 0(r1)
65 %s2 = alloca %struct.StructA, align 16
66 %s3 = alloca %struct.StructA, align 16
67 %arr = alloca [997003 x i8], align 1
68 %tmp = alloca %struct.StructA, align 16
69 call void @llvm.memcpy.p0.p0.i64(ptr align 16 %tmp, ptr align 16 @s1, i64 16, i1 false)
70 %0 = load i128, ptr %tmp, align 16
71 %1 = load atomic i128, ptr %s3 seq_cst, align 16
75 ; Function Attrs: argmemonly nofree nounwind willreturn
76 declare void @llvm.memcpy.p0.p0.i64(ptr noalias nocapture writeonly, ptr noalias nocapture readonly, i64, i1 immarg) #1
78 attributes #0 = { noinline optnone }