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 %struct.StructA { [16 x i8] c"\0B\0C\0D\0E\0F\10\11\12\13\14\15\16\17\18\19\1A" }, align 16
9 define dso_local void @test() {
11 ; CHECK: # %bb.0: # %entry
12 ; CHECK-NEXT: plxv vs0, s1@PCREL(0), 1
13 ; CHECK-NEXT: stxv vs0, -48(r1)
14 ; CHECK-NEXT: ld r3, -40(r1)
15 ; CHECK-NEXT: ld r4, -48(r1)
17 ; CHECK-NEXT: mr r5, r4
18 ; CHECK-NEXT: mr r4, r3
19 ; CHECK-NEXT: stq r4, -16(r1)
21 ; CHECK-NEXT: lq r4, -16(r1)
22 ; CHECK-NEXT: cmpd cr7, r5, r5
23 ; CHECK-NEXT: bne- cr7, .+4
25 ; CHECK-NEXT: std r4, -24(r1)
26 ; CHECK-NEXT: std r5, -32(r1)
29 %s2 = alloca %struct.StructA, align 16
30 %s3 = alloca %struct.StructA, align 16
31 %agg.tmp.ensured = alloca %struct.StructA, align 16
32 call void @llvm.memcpy.p0.p0.i64(ptr align 16 %agg.tmp.ensured, ptr align 16 @s1, i64 16, i1 false)
33 %0 = load i128, ptr %agg.tmp.ensured, align 16
34 store atomic i128 %0, ptr %s2 seq_cst, align 16
35 %atomic-load = load atomic i128, ptr %s2 seq_cst, align 16
36 store i128 %atomic-load, ptr %s3, align 16
40 declare void @llvm.memcpy.p0.p0.i64(ptr noalias nocapture writeonly, ptr noalias nocapture readonly, i64, i1 immarg)