brintos

brintos / llvm-project-archived public Read only

0
0
Text · 24.5 KiB · 8967eac Raw
849 lines · plain
1; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py2; RUN: llc -verify-machineinstrs -mtriple=powerpc64-unknown-unknown \3; RUN:   -mcpu=pwr8 -ppc-asm-full-reg-names -enable-subreg-liveness \4; RUN:   < %s | FileCheck --check-prefix=P8 %s5; RUN: llc -verify-machineinstrs -mtriple=powerpc64-unknown-unknown -mcpu=pwr7 \6; RUN:   -ppc-asm-full-reg-names \7; RUN:   -enable-subreg-liveness < %s | FileCheck --check-prefix=PWR7 %s8; RUN: llc -verify-machineinstrs -mtriple=powerpc64le-unknown-linux-gnu -mcpu=pwr8 \9; RUN:   -ppc-asm-full-reg-names -enable-subreg-liveness < %s | FileCheck \10; RUN:   --check-prefix=LE-PWR8 %s11; RUN: llc -verify-machineinstrs -mtriple=powerpc64le-unknown-freebsd -mcpu=pwr8 \12; RUN:   -ppc-asm-full-reg-names -enable-subreg-liveness < %s | FileCheck \13; RUN:   --check-prefix=LE-PWR8 %s14; RUN: llc -verify-machineinstrs -mtriple=powerpc64-unknown-aix -mcpu=pwr8 \15; RUN:   -ppc-asm-full-reg-names -enable-subreg-liveness < %s | FileCheck \16; RUN:   --check-prefix=AIX64-PWR8 %s17; RUN: llc -verify-machineinstrs -mtriple=powerpc-unknown-unknown -mcpu=pwr8 \18; RUN:   -ppc-asm-full-reg-names -enable-subreg-liveness < %s \19; RUN: | FileCheck --check-prefix=PPC-PWR8 %s20 21define dso_local i128 @lq_unordered(ptr %src) {22; P8-LABEL: lq_unordered:23; P8:       # %bb.0: # %entry24; P8-NEXT:    lq r4, 0(r3)25; P8-NEXT:    mr r3, r426; P8-NEXT:    mr r4, r527; P8-NEXT:    blr28;29; PWR7-LABEL: lq_unordered:30; PWR7:       # %bb.0: # %entry31; PWR7-NEXT:    mflr r032; PWR7-NEXT:    stdu r1, -112(r1)33; PWR7-NEXT:    std r0, 128(r1)34; PWR7-NEXT:    .cfi_def_cfa_offset 11235; PWR7-NEXT:    .cfi_offset lr, 1636; PWR7-NEXT:    li r4, 037; PWR7-NEXT:    bl __atomic_load_1638; PWR7-NEXT:    nop39; PWR7-NEXT:    addi r1, r1, 11240; PWR7-NEXT:    ld r0, 16(r1)41; PWR7-NEXT:    mtlr r042; PWR7-NEXT:    blr43;44; LE-PWR8-LABEL: lq_unordered:45; LE-PWR8:       # %bb.0: # %entry46; LE-PWR8-NEXT:    lq r4, 0(r3)47; LE-PWR8-NEXT:    mr r3, r548; LE-PWR8-NEXT:    blr49;50; AIX64-PWR8-LABEL: lq_unordered:51; AIX64-PWR8:       # %bb.0: # %entry52; AIX64-PWR8-NEXT:    lq r4, 0(r3)53; AIX64-PWR8-NEXT:    mr r3, r454; AIX64-PWR8-NEXT:    mr r4, r555; AIX64-PWR8-NEXT:    blr56;57; PPC-PWR8-LABEL: lq_unordered:58; PPC-PWR8:       # %bb.0: # %entry59; PPC-PWR8-NEXT:    mflr r060; PPC-PWR8-NEXT:    stwu r1, -32(r1)61; PPC-PWR8-NEXT:    stw r0, 36(r1)62; PPC-PWR8-NEXT:    .cfi_def_cfa_offset 3263; PPC-PWR8-NEXT:    .cfi_offset lr, 464; PPC-PWR8-NEXT:    mr r4, r365; PPC-PWR8-NEXT:    addi r5, r1, 1666; PPC-PWR8-NEXT:    li r3, 1667; PPC-PWR8-NEXT:    li r6, 068; PPC-PWR8-NEXT:    bl __atomic_load69; PPC-PWR8-NEXT:    lwz r6, 28(r1)70; PPC-PWR8-NEXT:    lwz r5, 24(r1)71; PPC-PWR8-NEXT:    lwz r4, 20(r1)72; PPC-PWR8-NEXT:    lwz r3, 16(r1)73; PPC-PWR8-NEXT:    lwz r0, 36(r1)74; PPC-PWR8-NEXT:    addi r1, r1, 3275; PPC-PWR8-NEXT:    mtlr r076; PPC-PWR8-NEXT:    blr77entry:78  %0 = load atomic i128, ptr %src unordered, align 1679  ret i128 %080}81 82define dso_local i128 @lqx_unordered(ptr %src, i64 %idx) {83; P8-LABEL: lqx_unordered:84; P8:       # %bb.0: # %entry85; P8-NEXT:    sldi r4, r4, 486; P8-NEXT:    add r3, r3, r487; P8-NEXT:    lq r4, 0(r3)88; P8-NEXT:    mr r3, r489; P8-NEXT:    mr r4, r590; P8-NEXT:    blr91;92; PWR7-LABEL: lqx_unordered:93; PWR7:       # %bb.0: # %entry94; PWR7-NEXT:    mflr r095; PWR7-NEXT:    stdu r1, -112(r1)96; PWR7-NEXT:    std r0, 128(r1)97; PWR7-NEXT:    .cfi_def_cfa_offset 11298; PWR7-NEXT:    .cfi_offset lr, 1699; PWR7-NEXT:    sldi r4, r4, 4100; PWR7-NEXT:    add r3, r3, r4101; PWR7-NEXT:    li r4, 0102; PWR7-NEXT:    bl __atomic_load_16103; PWR7-NEXT:    nop104; PWR7-NEXT:    addi r1, r1, 112105; PWR7-NEXT:    ld r0, 16(r1)106; PWR7-NEXT:    mtlr r0107; PWR7-NEXT:    blr108;109; LE-PWR8-LABEL: lqx_unordered:110; LE-PWR8:       # %bb.0: # %entry111; LE-PWR8-NEXT:    sldi r4, r4, 4112; LE-PWR8-NEXT:    std r2, -8(r1) # 8-byte Folded Spill113; LE-PWR8-NEXT:    add r4, r3, r4114; LE-PWR8-NEXT:    lq r2, 0(r4)115; LE-PWR8-NEXT:    mr r4, r2116; LE-PWR8-NEXT:    ld r2, -8(r1) # 8-byte Folded Reload117; LE-PWR8-NEXT:    blr118;119; AIX64-PWR8-LABEL: lqx_unordered:120; AIX64-PWR8:       # %bb.0: # %entry121; AIX64-PWR8-NEXT:    sldi r4, r4, 4122; AIX64-PWR8-NEXT:    add r3, r3, r4123; AIX64-PWR8-NEXT:    lq r4, 0(r3)124; AIX64-PWR8-NEXT:    mr r3, r4125; AIX64-PWR8-NEXT:    mr r4, r5126; AIX64-PWR8-NEXT:    blr127;128; PPC-PWR8-LABEL: lqx_unordered:129; PPC-PWR8:       # %bb.0: # %entry130; PPC-PWR8-NEXT:    mflr r0131; PPC-PWR8-NEXT:    stwu r1, -32(r1)132; PPC-PWR8-NEXT:    stw r0, 36(r1)133; PPC-PWR8-NEXT:    .cfi_def_cfa_offset 32134; PPC-PWR8-NEXT:    .cfi_offset lr, 4135; PPC-PWR8-NEXT:    slwi r4, r6, 4136; PPC-PWR8-NEXT:    addi r5, r1, 16137; PPC-PWR8-NEXT:    li r6, 0138; PPC-PWR8-NEXT:    add r4, r3, r4139; PPC-PWR8-NEXT:    li r3, 16140; PPC-PWR8-NEXT:    bl __atomic_load141; PPC-PWR8-NEXT:    lwz r6, 28(r1)142; PPC-PWR8-NEXT:    lwz r5, 24(r1)143; PPC-PWR8-NEXT:    lwz r4, 20(r1)144; PPC-PWR8-NEXT:    lwz r3, 16(r1)145; PPC-PWR8-NEXT:    lwz r0, 36(r1)146; PPC-PWR8-NEXT:    addi r1, r1, 32147; PPC-PWR8-NEXT:    mtlr r0148; PPC-PWR8-NEXT:    blr149entry:150  %0 = getelementptr i128, ptr %src, i64 %idx151  %1 = load atomic i128, ptr %0 unordered, align 16152  ret i128 %1153}154 155define dso_local i128 @lq_big_offset_unordered(ptr %src) {156; P8-LABEL: lq_big_offset_unordered:157; P8:       # %bb.0: # %entry158; P8-NEXT:    lis r4, 32159; P8-NEXT:    add r3, r3, r4160; P8-NEXT:    lq r4, 0(r3)161; P8-NEXT:    mr r3, r4162; P8-NEXT:    mr r4, r5163; P8-NEXT:    blr164;165; PWR7-LABEL: lq_big_offset_unordered:166; PWR7:       # %bb.0: # %entry167; PWR7-NEXT:    mflr r0168; PWR7-NEXT:    stdu r1, -112(r1)169; PWR7-NEXT:    std r0, 128(r1)170; PWR7-NEXT:    .cfi_def_cfa_offset 112171; PWR7-NEXT:    .cfi_offset lr, 16172; PWR7-NEXT:    addis r3, r3, 32173; PWR7-NEXT:    li r4, 0174; PWR7-NEXT:    bl __atomic_load_16175; PWR7-NEXT:    nop176; PWR7-NEXT:    addi r1, r1, 112177; PWR7-NEXT:    ld r0, 16(r1)178; PWR7-NEXT:    mtlr r0179; PWR7-NEXT:    blr180;181; LE-PWR8-LABEL: lq_big_offset_unordered:182; LE-PWR8:       # %bb.0: # %entry183; LE-PWR8-NEXT:    lis r4, 32184; LE-PWR8-NEXT:    std r2, -8(r1) # 8-byte Folded Spill185; LE-PWR8-NEXT:    add r4, r3, r4186; LE-PWR8-NEXT:    lq r2, 0(r4)187; LE-PWR8-NEXT:    mr r4, r2188; LE-PWR8-NEXT:    ld r2, -8(r1) # 8-byte Folded Reload189; LE-PWR8-NEXT:    blr190;191; AIX64-PWR8-LABEL: lq_big_offset_unordered:192; AIX64-PWR8:       # %bb.0: # %entry193; AIX64-PWR8-NEXT:    lis r4, 32194; AIX64-PWR8-NEXT:    add r3, r3, r4195; AIX64-PWR8-NEXT:    lq r4, 0(r3)196; AIX64-PWR8-NEXT:    mr r3, r4197; AIX64-PWR8-NEXT:    mr r4, r5198; AIX64-PWR8-NEXT:    blr199;200; PPC-PWR8-LABEL: lq_big_offset_unordered:201; PPC-PWR8:       # %bb.0: # %entry202; PPC-PWR8-NEXT:    mflr r0203; PPC-PWR8-NEXT:    stwu r1, -32(r1)204; PPC-PWR8-NEXT:    stw r0, 36(r1)205; PPC-PWR8-NEXT:    .cfi_def_cfa_offset 32206; PPC-PWR8-NEXT:    .cfi_offset lr, 4207; PPC-PWR8-NEXT:    addis r4, r3, 32208; PPC-PWR8-NEXT:    addi r5, r1, 16209; PPC-PWR8-NEXT:    li r3, 16210; PPC-PWR8-NEXT:    li r6, 0211; PPC-PWR8-NEXT:    bl __atomic_load212; PPC-PWR8-NEXT:    lwz r6, 28(r1)213; PPC-PWR8-NEXT:    lwz r5, 24(r1)214; PPC-PWR8-NEXT:    lwz r4, 20(r1)215; PPC-PWR8-NEXT:    lwz r3, 16(r1)216; PPC-PWR8-NEXT:    lwz r0, 36(r1)217; PPC-PWR8-NEXT:    addi r1, r1, 32218; PPC-PWR8-NEXT:    mtlr r0219; PPC-PWR8-NEXT:    blr220entry:221  %0 = getelementptr i128, ptr %src, i64 131072222  %1 = load atomic i128, ptr %0 unordered, align 16223  ret i128 %1224}225 226define dso_local i128 @lq_monotonic(ptr %src) {227; P8-LABEL: lq_monotonic:228; P8:       # %bb.0: # %entry229; P8-NEXT:    lq r4, 0(r3)230; P8-NEXT:    mr r3, r4231; P8-NEXT:    mr r4, r5232; P8-NEXT:    blr233;234; PWR7-LABEL: lq_monotonic:235; PWR7:       # %bb.0: # %entry236; PWR7-NEXT:    mflr r0237; PWR7-NEXT:    stdu r1, -112(r1)238; PWR7-NEXT:    std r0, 128(r1)239; PWR7-NEXT:    .cfi_def_cfa_offset 112240; PWR7-NEXT:    .cfi_offset lr, 16241; PWR7-NEXT:    li r4, 0242; PWR7-NEXT:    bl __atomic_load_16243; PWR7-NEXT:    nop244; PWR7-NEXT:    addi r1, r1, 112245; PWR7-NEXT:    ld r0, 16(r1)246; PWR7-NEXT:    mtlr r0247; PWR7-NEXT:    blr248;249; LE-PWR8-LABEL: lq_monotonic:250; LE-PWR8:       # %bb.0: # %entry251; LE-PWR8-NEXT:    lq r4, 0(r3)252; LE-PWR8-NEXT:    mr r3, r5253; LE-PWR8-NEXT:    blr254;255; AIX64-PWR8-LABEL: lq_monotonic:256; AIX64-PWR8:       # %bb.0: # %entry257; AIX64-PWR8-NEXT:    lq r4, 0(r3)258; AIX64-PWR8-NEXT:    mr r3, r4259; AIX64-PWR8-NEXT:    mr r4, r5260; AIX64-PWR8-NEXT:    blr261;262; PPC-PWR8-LABEL: lq_monotonic:263; PPC-PWR8:       # %bb.0: # %entry264; PPC-PWR8-NEXT:    mflr r0265; PPC-PWR8-NEXT:    stwu r1, -32(r1)266; PPC-PWR8-NEXT:    stw r0, 36(r1)267; PPC-PWR8-NEXT:    .cfi_def_cfa_offset 32268; PPC-PWR8-NEXT:    .cfi_offset lr, 4269; PPC-PWR8-NEXT:    mr r4, r3270; PPC-PWR8-NEXT:    addi r5, r1, 16271; PPC-PWR8-NEXT:    li r3, 16272; PPC-PWR8-NEXT:    li r6, 0273; PPC-PWR8-NEXT:    bl __atomic_load274; PPC-PWR8-NEXT:    lwz r6, 28(r1)275; PPC-PWR8-NEXT:    lwz r5, 24(r1)276; PPC-PWR8-NEXT:    lwz r4, 20(r1)277; PPC-PWR8-NEXT:    lwz r3, 16(r1)278; PPC-PWR8-NEXT:    lwz r0, 36(r1)279; PPC-PWR8-NEXT:    addi r1, r1, 32280; PPC-PWR8-NEXT:    mtlr r0281; PPC-PWR8-NEXT:    blr282entry:283  %0 = load atomic i128, ptr %src monotonic, align 16284  ret i128 %0285}286 287define dso_local i128 @lq_acquire(ptr %src) {288; P8-LABEL: lq_acquire:289; P8:       # %bb.0: # %entry290; P8-NEXT:    lq r4, 0(r3)291; P8-NEXT:    cmpd cr7, r5, r5292; P8-NEXT:    mr r3, r4293; P8-NEXT:    mr r4, r5294; P8-NEXT:    bne- cr7, .+4295; P8-NEXT:    isync296; P8-NEXT:    blr297;298; PWR7-LABEL: lq_acquire:299; PWR7:       # %bb.0: # %entry300; PWR7-NEXT:    mflr r0301; PWR7-NEXT:    stdu r1, -112(r1)302; PWR7-NEXT:    std r0, 128(r1)303; PWR7-NEXT:    .cfi_def_cfa_offset 112304; PWR7-NEXT:    .cfi_offset lr, 16305; PWR7-NEXT:    li r4, 2306; PWR7-NEXT:    bl __atomic_load_16307; PWR7-NEXT:    nop308; PWR7-NEXT:    addi r1, r1, 112309; PWR7-NEXT:    ld r0, 16(r1)310; PWR7-NEXT:    mtlr r0311; PWR7-NEXT:    blr312;313; LE-PWR8-LABEL: lq_acquire:314; LE-PWR8:       # %bb.0: # %entry315; LE-PWR8-NEXT:    lq r4, 0(r3)316; LE-PWR8-NEXT:    cmpd cr7, r5, r5317; LE-PWR8-NEXT:    mr r3, r5318; LE-PWR8-NEXT:    bne- cr7, .+4319; LE-PWR8-NEXT:    isync320; LE-PWR8-NEXT:    blr321;322; AIX64-PWR8-LABEL: lq_acquire:323; AIX64-PWR8:       # %bb.0: # %entry324; AIX64-PWR8-NEXT:    lq r4, 0(r3)325; AIX64-PWR8-NEXT:    cmpd cr7, r5, r5326; AIX64-PWR8-NEXT:    mr r3, r4327; AIX64-PWR8-NEXT:    mr r4, r5328; AIX64-PWR8-NEXT:    bne- cr7, $+4329; AIX64-PWR8-NEXT:    isync330; AIX64-PWR8-NEXT:    blr331;332; PPC-PWR8-LABEL: lq_acquire:333; PPC-PWR8:       # %bb.0: # %entry334; PPC-PWR8-NEXT:    mflr r0335; PPC-PWR8-NEXT:    stwu r1, -32(r1)336; PPC-PWR8-NEXT:    stw r0, 36(r1)337; PPC-PWR8-NEXT:    .cfi_def_cfa_offset 32338; PPC-PWR8-NEXT:    .cfi_offset lr, 4339; PPC-PWR8-NEXT:    mr r4, r3340; PPC-PWR8-NEXT:    addi r5, r1, 16341; PPC-PWR8-NEXT:    li r3, 16342; PPC-PWR8-NEXT:    li r6, 2343; PPC-PWR8-NEXT:    bl __atomic_load344; PPC-PWR8-NEXT:    lwz r6, 28(r1)345; PPC-PWR8-NEXT:    lwz r5, 24(r1)346; PPC-PWR8-NEXT:    lwz r4, 20(r1)347; PPC-PWR8-NEXT:    lwz r3, 16(r1)348; PPC-PWR8-NEXT:    lwz r0, 36(r1)349; PPC-PWR8-NEXT:    addi r1, r1, 32350; PPC-PWR8-NEXT:    mtlr r0351; PPC-PWR8-NEXT:    blr352entry:353  %0 = load atomic i128, ptr %src acquire, align 16354  ret i128 %0355}356 357define dso_local i128 @lq_seqcst(ptr %src) {358; P8-LABEL: lq_seqcst:359; P8:       # %bb.0: # %entry360; P8-NEXT:    sync361; P8-NEXT:    lq r4, 0(r3)362; P8-NEXT:    cmpd cr7, r5, r5363; P8-NEXT:    mr r3, r4364; P8-NEXT:    bne- cr7, .+4365; P8-NEXT:    isync366; P8-NEXT:    mr r4, r5367; P8-NEXT:    blr368;369; PWR7-LABEL: lq_seqcst:370; PWR7:       # %bb.0: # %entry371; PWR7-NEXT:    mflr r0372; PWR7-NEXT:    stdu r1, -112(r1)373; PWR7-NEXT:    std r0, 128(r1)374; PWR7-NEXT:    .cfi_def_cfa_offset 112375; PWR7-NEXT:    .cfi_offset lr, 16376; PWR7-NEXT:    li r4, 5377; PWR7-NEXT:    bl __atomic_load_16378; PWR7-NEXT:    nop379; PWR7-NEXT:    addi r1, r1, 112380; PWR7-NEXT:    ld r0, 16(r1)381; PWR7-NEXT:    mtlr r0382; PWR7-NEXT:    blr383;384; LE-PWR8-LABEL: lq_seqcst:385; LE-PWR8:       # %bb.0: # %entry386; LE-PWR8-NEXT:    sync387; LE-PWR8-NEXT:    lq r4, 0(r3)388; LE-PWR8-NEXT:    cmpd cr7, r5, r5389; LE-PWR8-NEXT:    mr r3, r5390; LE-PWR8-NEXT:    bne- cr7, .+4391; LE-PWR8-NEXT:    isync392; LE-PWR8-NEXT:    blr393;394; AIX64-PWR8-LABEL: lq_seqcst:395; AIX64-PWR8:       # %bb.0: # %entry396; AIX64-PWR8-NEXT:    sync397; AIX64-PWR8-NEXT:    lq r4, 0(r3)398; AIX64-PWR8-NEXT:    cmpd cr7, r5, r5399; AIX64-PWR8-NEXT:    mr r3, r4400; AIX64-PWR8-NEXT:    bne- cr7, $+4401; AIX64-PWR8-NEXT:    isync402; AIX64-PWR8-NEXT:    mr r4, r5403; AIX64-PWR8-NEXT:    blr404;405; PPC-PWR8-LABEL: lq_seqcst:406; PPC-PWR8:       # %bb.0: # %entry407; PPC-PWR8-NEXT:    mflr r0408; PPC-PWR8-NEXT:    stwu r1, -32(r1)409; PPC-PWR8-NEXT:    stw r0, 36(r1)410; PPC-PWR8-NEXT:    .cfi_def_cfa_offset 32411; PPC-PWR8-NEXT:    .cfi_offset lr, 4412; PPC-PWR8-NEXT:    mr r4, r3413; PPC-PWR8-NEXT:    addi r5, r1, 16414; PPC-PWR8-NEXT:    li r3, 16415; PPC-PWR8-NEXT:    li r6, 5416; PPC-PWR8-NEXT:    bl __atomic_load417; PPC-PWR8-NEXT:    lwz r6, 28(r1)418; PPC-PWR8-NEXT:    lwz r5, 24(r1)419; PPC-PWR8-NEXT:    lwz r4, 20(r1)420; PPC-PWR8-NEXT:    lwz r3, 16(r1)421; PPC-PWR8-NEXT:    lwz r0, 36(r1)422; PPC-PWR8-NEXT:    addi r1, r1, 32423; PPC-PWR8-NEXT:    mtlr r0424; PPC-PWR8-NEXT:    blr425entry:426  %0 = load atomic i128, ptr %src seq_cst, align 16427  ret i128 %0428}429 430define dso_local void @stq_unordered(i128 %val, ptr %dst) {431; P8-LABEL: stq_unordered:432; P8:       # %bb.0: # %entry433; P8-NEXT:    mr r7, r4434; P8-NEXT:    mr r6, r3435; P8-NEXT:    stq r6, 0(r5)436; P8-NEXT:    blr437;438; PWR7-LABEL: stq_unordered:439; PWR7:       # %bb.0: # %entry440; PWR7-NEXT:    mflr r0441; PWR7-NEXT:    stdu r1, -112(r1)442; PWR7-NEXT:    std r0, 128(r1)443; PWR7-NEXT:    .cfi_def_cfa_offset 112444; PWR7-NEXT:    .cfi_offset lr, 16445; PWR7-NEXT:    mr r6, r4446; PWR7-NEXT:    mr r4, r3447; PWR7-NEXT:    mr r3, r5448; PWR7-NEXT:    mr r5, r6449; PWR7-NEXT:    li r6, 0450; PWR7-NEXT:    bl __atomic_store_16451; PWR7-NEXT:    nop452; PWR7-NEXT:    addi r1, r1, 112453; PWR7-NEXT:    ld r0, 16(r1)454; PWR7-NEXT:    mtlr r0455; PWR7-NEXT:    blr456;457; LE-PWR8-LABEL: stq_unordered:458; LE-PWR8:       # %bb.0: # %entry459; LE-PWR8-NEXT:    mr r7, r3460; LE-PWR8-NEXT:    mr r6, r4461; LE-PWR8-NEXT:    stq r6, 0(r5)462; LE-PWR8-NEXT:    blr463;464; AIX64-PWR8-LABEL: stq_unordered:465; AIX64-PWR8:       # %bb.0: # %entry466; AIX64-PWR8-NEXT:    mr r7, r4467; AIX64-PWR8-NEXT:    mr r6, r3468; AIX64-PWR8-NEXT:    stq r6, 0(r5)469; AIX64-PWR8-NEXT:    blr470;471; PPC-PWR8-LABEL: stq_unordered:472; PPC-PWR8:       # %bb.0: # %entry473; PPC-PWR8-NEXT:    mflr r0474; PPC-PWR8-NEXT:    stwu r1, -32(r1)475; PPC-PWR8-NEXT:    stw r0, 36(r1)476; PPC-PWR8-NEXT:    .cfi_def_cfa_offset 32477; PPC-PWR8-NEXT:    .cfi_offset lr, 4478; PPC-PWR8-NEXT:    stw r6, 28(r1)479; PPC-PWR8-NEXT:    stw r5, 24(r1)480; PPC-PWR8-NEXT:    addi r5, r1, 16481; PPC-PWR8-NEXT:    li r6, 0482; PPC-PWR8-NEXT:    stw r4, 20(r1)483; PPC-PWR8-NEXT:    stw r3, 16(r1)484; PPC-PWR8-NEXT:    li r3, 16485; PPC-PWR8-NEXT:    mr r4, r7486; PPC-PWR8-NEXT:    bl __atomic_store487; PPC-PWR8-NEXT:    lwz r0, 36(r1)488; PPC-PWR8-NEXT:    addi r1, r1, 32489; PPC-PWR8-NEXT:    mtlr r0490; PPC-PWR8-NEXT:    blr491entry:492  store atomic i128 %val, ptr %dst unordered, align 16493  ret void494}495 496define dso_local void @stqx_unordered(i128 %val, ptr %dst, i64 %idx) {497; P8-LABEL: stqx_unordered:498; P8:       # %bb.0: # %entry499; P8-NEXT:    sldi r6, r6, 4500; P8-NEXT:    mr r9, r4501; P8-NEXT:    mr r8, r3502; P8-NEXT:    add r3, r5, r6503; P8-NEXT:    stq r8, 0(r3)504; P8-NEXT:    blr505;506; PWR7-LABEL: stqx_unordered:507; PWR7:       # %bb.0: # %entry508; PWR7-NEXT:    mflr r0509; PWR7-NEXT:    stdu r1, -112(r1)510; PWR7-NEXT:    std r0, 128(r1)511; PWR7-NEXT:    .cfi_def_cfa_offset 112512; PWR7-NEXT:    .cfi_offset lr, 16513; PWR7-NEXT:    mr r7, r4514; PWR7-NEXT:    mr r4, r3515; PWR7-NEXT:    sldi r3, r6, 4516; PWR7-NEXT:    li r6, 0517; PWR7-NEXT:    add r3, r5, r3518; PWR7-NEXT:    mr r5, r7519; PWR7-NEXT:    bl __atomic_store_16520; PWR7-NEXT:    nop521; PWR7-NEXT:    addi r1, r1, 112522; PWR7-NEXT:    ld r0, 16(r1)523; PWR7-NEXT:    mtlr r0524; PWR7-NEXT:    blr525;526; LE-PWR8-LABEL: stqx_unordered:527; LE-PWR8:       # %bb.0: # %entry528; LE-PWR8-NEXT:    sldi r6, r6, 4529; LE-PWR8-NEXT:    mr r9, r3530; LE-PWR8-NEXT:    mr r8, r4531; LE-PWR8-NEXT:    add r3, r5, r6532; LE-PWR8-NEXT:    stq r8, 0(r3)533; LE-PWR8-NEXT:    blr534;535; AIX64-PWR8-LABEL: stqx_unordered:536; AIX64-PWR8:       # %bb.0: # %entry537; AIX64-PWR8-NEXT:    sldi r6, r6, 4538; AIX64-PWR8-NEXT:    mr r9, r4539; AIX64-PWR8-NEXT:    mr r8, r3540; AIX64-PWR8-NEXT:    add r3, r5, r6541; AIX64-PWR8-NEXT:    stq r8, 0(r3)542; AIX64-PWR8-NEXT:    blr543;544; PPC-PWR8-LABEL: stqx_unordered:545; PPC-PWR8:       # %bb.0: # %entry546; PPC-PWR8-NEXT:    mflr r0547; PPC-PWR8-NEXT:    stwu r1, -32(r1)548; PPC-PWR8-NEXT:    stw r0, 36(r1)549; PPC-PWR8-NEXT:    .cfi_def_cfa_offset 32550; PPC-PWR8-NEXT:    .cfi_offset lr, 4551; PPC-PWR8-NEXT:    slwi r8, r10, 4552; PPC-PWR8-NEXT:    stw r6, 28(r1)553; PPC-PWR8-NEXT:    stw r5, 24(r1)554; PPC-PWR8-NEXT:    addi r5, r1, 16555; PPC-PWR8-NEXT:    stw r4, 20(r1)556; PPC-PWR8-NEXT:    stw r3, 16(r1)557; PPC-PWR8-NEXT:    li r3, 16558; PPC-PWR8-NEXT:    add r6, r7, r8559; PPC-PWR8-NEXT:    mr r4, r6560; PPC-PWR8-NEXT:    li r6, 0561; PPC-PWR8-NEXT:    bl __atomic_store562; PPC-PWR8-NEXT:    lwz r0, 36(r1)563; PPC-PWR8-NEXT:    addi r1, r1, 32564; PPC-PWR8-NEXT:    mtlr r0565; PPC-PWR8-NEXT:    blr566entry:567  %0 = getelementptr i128, ptr %dst, i64 %idx568  store atomic i128 %val, ptr %0 unordered, align 16569  ret void570}571 572define dso_local void @stq_big_offset_unordered(i128 %val, ptr %dst) {573; P8-LABEL: stq_big_offset_unordered:574; P8:       # %bb.0: # %entry575; P8-NEXT:    mr r7, r4576; P8-NEXT:    mr r6, r3577; P8-NEXT:    lis r3, 32578; P8-NEXT:    add r3, r5, r3579; P8-NEXT:    stq r6, 0(r3)580; P8-NEXT:    blr581;582; PWR7-LABEL: stq_big_offset_unordered:583; PWR7:       # %bb.0: # %entry584; PWR7-NEXT:    mflr r0585; PWR7-NEXT:    stdu r1, -112(r1)586; PWR7-NEXT:    std r0, 128(r1)587; PWR7-NEXT:    .cfi_def_cfa_offset 112588; PWR7-NEXT:    .cfi_offset lr, 16589; PWR7-NEXT:    mr r6, r4590; PWR7-NEXT:    mr r4, r3591; PWR7-NEXT:    addis r3, r5, 32592; PWR7-NEXT:    mr r5, r6593; PWR7-NEXT:    li r6, 0594; PWR7-NEXT:    bl __atomic_store_16595; PWR7-NEXT:    nop596; PWR7-NEXT:    addi r1, r1, 112597; PWR7-NEXT:    ld r0, 16(r1)598; PWR7-NEXT:    mtlr r0599; PWR7-NEXT:    blr600;601; LE-PWR8-LABEL: stq_big_offset_unordered:602; LE-PWR8:       # %bb.0: # %entry603; LE-PWR8-NEXT:    mr r7, r3604; LE-PWR8-NEXT:    mr r6, r4605; LE-PWR8-NEXT:    lis r3, 32606; LE-PWR8-NEXT:    add r3, r5, r3607; LE-PWR8-NEXT:    stq r6, 0(r3)608; LE-PWR8-NEXT:    blr609;610; AIX64-PWR8-LABEL: stq_big_offset_unordered:611; AIX64-PWR8:       # %bb.0: # %entry612; AIX64-PWR8-NEXT:    mr r7, r4613; AIX64-PWR8-NEXT:    mr r6, r3614; AIX64-PWR8-NEXT:    lis r3, 32615; AIX64-PWR8-NEXT:    add r3, r5, r3616; AIX64-PWR8-NEXT:    stq r6, 0(r3)617; AIX64-PWR8-NEXT:    blr618;619; PPC-PWR8-LABEL: stq_big_offset_unordered:620; PPC-PWR8:       # %bb.0: # %entry621; PPC-PWR8-NEXT:    mflr r0622; PPC-PWR8-NEXT:    stwu r1, -32(r1)623; PPC-PWR8-NEXT:    stw r0, 36(r1)624; PPC-PWR8-NEXT:    .cfi_def_cfa_offset 32625; PPC-PWR8-NEXT:    .cfi_offset lr, 4626; PPC-PWR8-NEXT:    stw r6, 28(r1)627; PPC-PWR8-NEXT:    addis r6, r7, 32628; PPC-PWR8-NEXT:    stw r5, 24(r1)629; PPC-PWR8-NEXT:    addi r5, r1, 16630; PPC-PWR8-NEXT:    stw r4, 20(r1)631; PPC-PWR8-NEXT:    stw r3, 16(r1)632; PPC-PWR8-NEXT:    li r3, 16633; PPC-PWR8-NEXT:    mr r4, r6634; PPC-PWR8-NEXT:    li r6, 0635; PPC-PWR8-NEXT:    bl __atomic_store636; PPC-PWR8-NEXT:    lwz r0, 36(r1)637; PPC-PWR8-NEXT:    addi r1, r1, 32638; PPC-PWR8-NEXT:    mtlr r0639; PPC-PWR8-NEXT:    blr640entry:641  %0 = getelementptr i128, ptr %dst, i64 131072642  store atomic i128 %val, ptr %0 unordered, align 16643  ret void644}645 646define dso_local void @stq_monotonic(i128 %val, ptr %dst) {647; P8-LABEL: stq_monotonic:648; P8:       # %bb.0: # %entry649; P8-NEXT:    mr r7, r4650; P8-NEXT:    mr r6, r3651; P8-NEXT:    stq r6, 0(r5)652; P8-NEXT:    blr653;654; PWR7-LABEL: stq_monotonic:655; PWR7:       # %bb.0: # %entry656; PWR7-NEXT:    mflr r0657; PWR7-NEXT:    stdu r1, -112(r1)658; PWR7-NEXT:    std r0, 128(r1)659; PWR7-NEXT:    .cfi_def_cfa_offset 112660; PWR7-NEXT:    .cfi_offset lr, 16661; PWR7-NEXT:    mr r6, r4662; PWR7-NEXT:    mr r4, r3663; PWR7-NEXT:    mr r3, r5664; PWR7-NEXT:    mr r5, r6665; PWR7-NEXT:    li r6, 0666; PWR7-NEXT:    bl __atomic_store_16667; PWR7-NEXT:    nop668; PWR7-NEXT:    addi r1, r1, 112669; PWR7-NEXT:    ld r0, 16(r1)670; PWR7-NEXT:    mtlr r0671; PWR7-NEXT:    blr672;673; LE-PWR8-LABEL: stq_monotonic:674; LE-PWR8:       # %bb.0: # %entry675; LE-PWR8-NEXT:    mr r7, r3676; LE-PWR8-NEXT:    mr r6, r4677; LE-PWR8-NEXT:    stq r6, 0(r5)678; LE-PWR8-NEXT:    blr679;680; AIX64-PWR8-LABEL: stq_monotonic:681; AIX64-PWR8:       # %bb.0: # %entry682; AIX64-PWR8-NEXT:    mr r7, r4683; AIX64-PWR8-NEXT:    mr r6, r3684; AIX64-PWR8-NEXT:    stq r6, 0(r5)685; AIX64-PWR8-NEXT:    blr686;687; PPC-PWR8-LABEL: stq_monotonic:688; PPC-PWR8:       # %bb.0: # %entry689; PPC-PWR8-NEXT:    mflr r0690; PPC-PWR8-NEXT:    stwu r1, -32(r1)691; PPC-PWR8-NEXT:    stw r0, 36(r1)692; PPC-PWR8-NEXT:    .cfi_def_cfa_offset 32693; PPC-PWR8-NEXT:    .cfi_offset lr, 4694; PPC-PWR8-NEXT:    stw r6, 28(r1)695; PPC-PWR8-NEXT:    stw r5, 24(r1)696; PPC-PWR8-NEXT:    addi r5, r1, 16697; PPC-PWR8-NEXT:    li r6, 0698; PPC-PWR8-NEXT:    stw r4, 20(r1)699; PPC-PWR8-NEXT:    stw r3, 16(r1)700; PPC-PWR8-NEXT:    li r3, 16701; PPC-PWR8-NEXT:    mr r4, r7702; PPC-PWR8-NEXT:    bl __atomic_store703; PPC-PWR8-NEXT:    lwz r0, 36(r1)704; PPC-PWR8-NEXT:    addi r1, r1, 32705; PPC-PWR8-NEXT:    mtlr r0706; PPC-PWR8-NEXT:    blr707entry:708  store atomic i128 %val, ptr %dst monotonic, align 16709  ret void710}711 712define dso_local void @stq_release(i128 %val, ptr %dst) {713; P8-LABEL: stq_release:714; P8:       # %bb.0: # %entry715; P8-NEXT:    lwsync716; P8-NEXT:    mr r7, r4717; P8-NEXT:    mr r6, r3718; P8-NEXT:    stq r6, 0(r5)719; P8-NEXT:    blr720;721; PWR7-LABEL: stq_release:722; PWR7:       # %bb.0: # %entry723; PWR7-NEXT:    mflr r0724; PWR7-NEXT:    stdu r1, -112(r1)725; PWR7-NEXT:    std r0, 128(r1)726; PWR7-NEXT:    .cfi_def_cfa_offset 112727; PWR7-NEXT:    .cfi_offset lr, 16728; PWR7-NEXT:    mr r6, r4729; PWR7-NEXT:    mr r4, r3730; PWR7-NEXT:    mr r3, r5731; PWR7-NEXT:    mr r5, r6732; PWR7-NEXT:    li r6, 3733; PWR7-NEXT:    bl __atomic_store_16734; PWR7-NEXT:    nop735; PWR7-NEXT:    addi r1, r1, 112736; PWR7-NEXT:    ld r0, 16(r1)737; PWR7-NEXT:    mtlr r0738; PWR7-NEXT:    blr739;740; LE-PWR8-LABEL: stq_release:741; LE-PWR8:       # %bb.0: # %entry742; LE-PWR8-NEXT:    lwsync743; LE-PWR8-NEXT:    mr r7, r3744; LE-PWR8-NEXT:    mr r6, r4745; LE-PWR8-NEXT:    stq r6, 0(r5)746; LE-PWR8-NEXT:    blr747;748; AIX64-PWR8-LABEL: stq_release:749; AIX64-PWR8:       # %bb.0: # %entry750; AIX64-PWR8-NEXT:    lwsync751; AIX64-PWR8-NEXT:    mr r7, r4752; AIX64-PWR8-NEXT:    mr r6, r3753; AIX64-PWR8-NEXT:    stq r6, 0(r5)754; AIX64-PWR8-NEXT:    blr755;756; PPC-PWR8-LABEL: stq_release:757; PPC-PWR8:       # %bb.0: # %entry758; PPC-PWR8-NEXT:    mflr r0759; PPC-PWR8-NEXT:    stwu r1, -32(r1)760; PPC-PWR8-NEXT:    stw r0, 36(r1)761; PPC-PWR8-NEXT:    .cfi_def_cfa_offset 32762; PPC-PWR8-NEXT:    .cfi_offset lr, 4763; PPC-PWR8-NEXT:    stw r6, 28(r1)764; PPC-PWR8-NEXT:    stw r5, 24(r1)765; PPC-PWR8-NEXT:    addi r5, r1, 16766; PPC-PWR8-NEXT:    li r6, 3767; PPC-PWR8-NEXT:    stw r4, 20(r1)768; PPC-PWR8-NEXT:    stw r3, 16(r1)769; PPC-PWR8-NEXT:    li r3, 16770; PPC-PWR8-NEXT:    mr r4, r7771; PPC-PWR8-NEXT:    bl __atomic_store772; PPC-PWR8-NEXT:    lwz r0, 36(r1)773; PPC-PWR8-NEXT:    addi r1, r1, 32774; PPC-PWR8-NEXT:    mtlr r0775; PPC-PWR8-NEXT:    blr776entry:777  store atomic i128 %val, ptr %dst release, align 16778  ret void779}780 781define dso_local void @stq_seqcst(i128 %val, ptr %dst) {782; P8-LABEL: stq_seqcst:783; P8:       # %bb.0: # %entry784; P8-NEXT:    sync785; P8-NEXT:    mr r7, r4786; P8-NEXT:    mr r6, r3787; P8-NEXT:    stq r6, 0(r5)788; P8-NEXT:    blr789;790; PWR7-LABEL: stq_seqcst:791; PWR7:       # %bb.0: # %entry792; PWR7-NEXT:    mflr r0793; PWR7-NEXT:    stdu r1, -112(r1)794; PWR7-NEXT:    std r0, 128(r1)795; PWR7-NEXT:    .cfi_def_cfa_offset 112796; PWR7-NEXT:    .cfi_offset lr, 16797; PWR7-NEXT:    mr r6, r4798; PWR7-NEXT:    mr r4, r3799; PWR7-NEXT:    mr r3, r5800; PWR7-NEXT:    mr r5, r6801; PWR7-NEXT:    li r6, 5802; PWR7-NEXT:    bl __atomic_store_16803; PWR7-NEXT:    nop804; PWR7-NEXT:    addi r1, r1, 112805; PWR7-NEXT:    ld r0, 16(r1)806; PWR7-NEXT:    mtlr r0807; PWR7-NEXT:    blr808;809; LE-PWR8-LABEL: stq_seqcst:810; LE-PWR8:       # %bb.0: # %entry811; LE-PWR8-NEXT:    sync812; LE-PWR8-NEXT:    mr r7, r3813; LE-PWR8-NEXT:    mr r6, r4814; LE-PWR8-NEXT:    stq r6, 0(r5)815; LE-PWR8-NEXT:    blr816;817; AIX64-PWR8-LABEL: stq_seqcst:818; AIX64-PWR8:       # %bb.0: # %entry819; AIX64-PWR8-NEXT:    sync820; AIX64-PWR8-NEXT:    mr r7, r4821; AIX64-PWR8-NEXT:    mr r6, r3822; AIX64-PWR8-NEXT:    stq r6, 0(r5)823; AIX64-PWR8-NEXT:    blr824;825; PPC-PWR8-LABEL: stq_seqcst:826; PPC-PWR8:       # %bb.0: # %entry827; PPC-PWR8-NEXT:    mflr r0828; PPC-PWR8-NEXT:    stwu r1, -32(r1)829; PPC-PWR8-NEXT:    stw r0, 36(r1)830; PPC-PWR8-NEXT:    .cfi_def_cfa_offset 32831; PPC-PWR8-NEXT:    .cfi_offset lr, 4832; PPC-PWR8-NEXT:    stw r6, 28(r1)833; PPC-PWR8-NEXT:    stw r5, 24(r1)834; PPC-PWR8-NEXT:    addi r5, r1, 16835; PPC-PWR8-NEXT:    li r6, 5836; PPC-PWR8-NEXT:    stw r4, 20(r1)837; PPC-PWR8-NEXT:    stw r3, 16(r1)838; PPC-PWR8-NEXT:    li r3, 16839; PPC-PWR8-NEXT:    mr r4, r7840; PPC-PWR8-NEXT:    bl __atomic_store841; PPC-PWR8-NEXT:    lwz r0, 36(r1)842; PPC-PWR8-NEXT:    addi r1, r1, 32843; PPC-PWR8-NEXT:    mtlr r0844; PPC-PWR8-NEXT:    blr845entry:846  store atomic i128 %val, ptr %dst seq_cst, align 16847  ret void848}849