brintos

brintos / llvm-project-archived public Read only

0
0
Text · 608.1 KiB · 69ae1f1 Raw
19812 lines · plain
1; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py2;3; Test that atomic ops in IR marked with !pcsections end up in a PC section in4; asm. All functions start with a non-atomic access, continue with an atomic5; access, and end with another non-atomic access; this is to test that the6; !pcsections propagation doesn't accidentally touch adjacent instructions.7;8; RUN: llc -O0 -mattr=cx16 < %s | FileCheck %s --check-prefixes=O09; RUN: llc -O1 -mattr=cx16 < %s | FileCheck %s --check-prefixes=O110; RUN: llc -O2 -mattr=cx16 < %s | FileCheck %s --check-prefixes=O211; RUN: llc -O3 -mattr=cx16 < %s | FileCheck %s --check-prefixes=O312; RUN: llc -O3 -mcpu=haswell -mattr=cx16 < %s | FileCheck %s --check-prefixes=HASWELL-O313 14target triple = "x86_64-unknown-linux-gnu"15 16@foo = dso_local global i64 0, align 817 18define void @mixed_atomic_non_atomic(ptr %a) {19; O0-LABEL: mixed_atomic_non_atomic:20; O0:       # %bb.0: # %entry21; O0-NEXT:    movl (%rdi), %eax22; O0-NEXT:    incl %eax23; O0-NEXT:    movl %eax, (%rdi)24; O0-NEXT:  .Lpcsection0:25; O0-NEXT:    movl $1, (%rdi)26; O0-NEXT:    movl (%rdi), %eax27; O0-NEXT:    addl $-1, %eax28; O0-NEXT:    movl %eax, (%rdi)29; O0-NEXT:    retq30;31; O1-LABEL: mixed_atomic_non_atomic:32; O1:       # %bb.0: # %entry33; O1-NEXT:    incl (%rdi)34; O1-NEXT:  .Lpcsection0:35; O1-NEXT:    movl $1, (%rdi)36; O1-NEXT:    decl (%rdi)37; O1-NEXT:    retq38;39; O2-LABEL: mixed_atomic_non_atomic:40; O2:       # %bb.0: # %entry41; O2-NEXT:    incl (%rdi)42; O2-NEXT:  .Lpcsection0:43; O2-NEXT:    movl $1, (%rdi)44; O2-NEXT:    decl (%rdi)45; O2-NEXT:    retq46;47; O3-LABEL: mixed_atomic_non_atomic:48; O3:       # %bb.0: # %entry49; O3-NEXT:    incl (%rdi)50; O3-NEXT:  .Lpcsection0:51; O3-NEXT:    movl $1, (%rdi)52; O3-NEXT:    decl (%rdi)53; O3-NEXT:    retq54;55; HASWELL-O3-LABEL: mixed_atomic_non_atomic:56; HASWELL-O3:       # %bb.0: # %entry57; HASWELL-O3-NEXT:    incl (%rdi)58; HASWELL-O3-NEXT:  .Lpcsection0:59; HASWELL-O3-NEXT:    movl $1, (%rdi)60; HASWELL-O3-NEXT:    decl (%rdi)61; HASWELL-O3-NEXT:    retq62entry:63  ; Accesses the same location atomically and non-atomically.64  %0 = load volatile i32, ptr %a, align 465  %inc = add nsw i32 %0, 166  store volatile i32 %inc, ptr %a, align 467  store atomic volatile i32 1, ptr %a monotonic, align 4, !pcsections !068  %1 = load volatile i32, ptr %a, align 469  %dec = add nsw i32 %1, -170  store volatile i32 %dec, ptr %a, align 471  ret void72}73 74define i64 @mixed_complex_atomic_non_atomic(ptr %a, ptr %b) {75; O0-LABEL: mixed_complex_atomic_non_atomic:76; O0:       # %bb.0: # %entry77; O0-NEXT:    movl $1, %ecx78; O0-NEXT:  .Lpcsection1:79; O0-NEXT:    lock xaddq %rcx, (%rdi)80; O0-NEXT:    movq (%rsi), %rax81; O0-NEXT:    movq %rax, %rdx82; O0-NEXT:    addq $1, %rdx83; O0-NEXT:    movq %rdx, (%rsi)84; O0-NEXT:    addq %rcx, %rax85; O0-NEXT:    retq86;87; O1-LABEL: mixed_complex_atomic_non_atomic:88; O1:       # %bb.0: # %entry89; O1-NEXT:    movl $1, %eax90; O1-NEXT:  .Lpcsection1:91; O1-NEXT:    lock xaddq %rax, (%rdi)92; O1-NEXT:    movq (%rsi), %rcx93; O1-NEXT:    leaq 1(%rcx), %rdx94; O1-NEXT:    movq %rdx, (%rsi)95; O1-NEXT:    addq %rcx, %rax96; O1-NEXT:    retq97;98; O2-LABEL: mixed_complex_atomic_non_atomic:99; O2:       # %bb.0: # %entry100; O2-NEXT:    movl $1, %eax101; O2-NEXT:  .Lpcsection1:102; O2-NEXT:    lock xaddq %rax, (%rdi)103; O2-NEXT:    movq (%rsi), %rcx104; O2-NEXT:    leaq 1(%rcx), %rdx105; O2-NEXT:    movq %rdx, (%rsi)106; O2-NEXT:    addq %rcx, %rax107; O2-NEXT:    retq108;109; O3-LABEL: mixed_complex_atomic_non_atomic:110; O3:       # %bb.0: # %entry111; O3-NEXT:    movl $1, %eax112; O3-NEXT:  .Lpcsection1:113; O3-NEXT:    lock xaddq %rax, (%rdi)114; O3-NEXT:    movq (%rsi), %rcx115; O3-NEXT:    leaq 1(%rcx), %rdx116; O3-NEXT:    movq %rdx, (%rsi)117; O3-NEXT:    addq %rcx, %rax118; O3-NEXT:    retq119;120; HASWELL-O3-LABEL: mixed_complex_atomic_non_atomic:121; HASWELL-O3:       # %bb.0: # %entry122; HASWELL-O3-NEXT:    movl $1, %eax123; HASWELL-O3-NEXT:  .Lpcsection1:124; HASWELL-O3-NEXT:    lock xaddq %rax, (%rdi)125; HASWELL-O3-NEXT:    movq (%rsi), %rcx126; HASWELL-O3-NEXT:    leaq 1(%rcx), %rdx127; HASWELL-O3-NEXT:    movq %rdx, (%rsi)128; HASWELL-O3-NEXT:    addq %rcx, %rax129; HASWELL-O3-NEXT:    retq130entry:131  %0 = atomicrmw add ptr %a, i64 1 monotonic, align 8, !pcsections !0132  %1 = load i64, ptr %b, align 8133  %inc = add nsw i64 %1, 1134  store i64 %inc, ptr %b, align 8135  %add = add nsw i64 %1, %0136  ret i64 %add137}138 139define i8 @atomic8_load_unordered(ptr %a) {140; O0-LABEL: atomic8_load_unordered:141; O0:       # %bb.0: # %entry142; O0-NEXT:    movq foo(%rip), %rax143; O0-NEXT:  .Lpcsection2:144; O0-NEXT:    movb (%rdi), %al145; O0-NEXT:    movq $1, foo146; O0-NEXT:    retq147;148; O1-LABEL: atomic8_load_unordered:149; O1:       # %bb.0: # %entry150; O1-NEXT:    movq foo(%rip), %rax151; O1-NEXT:  .Lpcsection2:152; O1-NEXT:    movzbl (%rdi), %eax153; O1-NEXT:    movq $1, foo(%rip)154; O1-NEXT:    retq155;156; O2-LABEL: atomic8_load_unordered:157; O2:       # %bb.0: # %entry158; O2-NEXT:    movq foo(%rip), %rax159; O2-NEXT:  .Lpcsection2:160; O2-NEXT:    movzbl (%rdi), %eax161; O2-NEXT:    movq $1, foo(%rip)162; O2-NEXT:    retq163;164; O3-LABEL: atomic8_load_unordered:165; O3:       # %bb.0: # %entry166; O3-NEXT:    movq foo(%rip), %rax167; O3-NEXT:  .Lpcsection2:168; O3-NEXT:    movzbl (%rdi), %eax169; O3-NEXT:    movq $1, foo(%rip)170; O3-NEXT:    retq171;172; HASWELL-O3-LABEL: atomic8_load_unordered:173; HASWELL-O3:       # %bb.0: # %entry174; HASWELL-O3-NEXT:    movq foo(%rip), %rax175; HASWELL-O3-NEXT:  .Lpcsection2:176; HASWELL-O3-NEXT:    movzbl (%rdi), %eax177; HASWELL-O3-NEXT:    movq $1, foo(%rip)178; HASWELL-O3-NEXT:    retq179entry:180  load volatile i64, ptr @foo, align 8181  %x = load atomic i8, ptr %a unordered, align 1, !pcsections !0182  store volatile i64 1, ptr @foo, align 8183  ret i8 %x184}185 186define i8 @atomic8_load_monotonic(ptr %a) {187; O0-LABEL: atomic8_load_monotonic:188; O0:       # %bb.0: # %entry189; O0-NEXT:    movq foo(%rip), %rax190; O0-NEXT:  .Lpcsection3:191; O0-NEXT:    movb (%rdi), %al192; O0-NEXT:    movq $1, foo193; O0-NEXT:    retq194;195; O1-LABEL: atomic8_load_monotonic:196; O1:       # %bb.0: # %entry197; O1-NEXT:    movq foo(%rip), %rax198; O1-NEXT:  .Lpcsection3:199; O1-NEXT:    movzbl (%rdi), %eax200; O1-NEXT:    movq $1, foo(%rip)201; O1-NEXT:    retq202;203; O2-LABEL: atomic8_load_monotonic:204; O2:       # %bb.0: # %entry205; O2-NEXT:    movq foo(%rip), %rax206; O2-NEXT:  .Lpcsection3:207; O2-NEXT:    movzbl (%rdi), %eax208; O2-NEXT:    movq $1, foo(%rip)209; O2-NEXT:    retq210;211; O3-LABEL: atomic8_load_monotonic:212; O3:       # %bb.0: # %entry213; O3-NEXT:    movq foo(%rip), %rax214; O3-NEXT:  .Lpcsection3:215; O3-NEXT:    movzbl (%rdi), %eax216; O3-NEXT:    movq $1, foo(%rip)217; O3-NEXT:    retq218;219; HASWELL-O3-LABEL: atomic8_load_monotonic:220; HASWELL-O3:       # %bb.0: # %entry221; HASWELL-O3-NEXT:    movq foo(%rip), %rax222; HASWELL-O3-NEXT:  .Lpcsection3:223; HASWELL-O3-NEXT:    movzbl (%rdi), %eax224; HASWELL-O3-NEXT:    movq $1, foo(%rip)225; HASWELL-O3-NEXT:    retq226entry:227  load volatile i64, ptr @foo, align 8228  %x = load atomic i8, ptr %a monotonic, align 1, !pcsections !0229  store volatile i64 1, ptr @foo, align 8230  ret i8 %x231}232 233define i8 @atomic8_load_acquire(ptr %a) {234; O0-LABEL: atomic8_load_acquire:235; O0:       # %bb.0: # %entry236; O0-NEXT:    movq foo(%rip), %rax237; O0-NEXT:  .Lpcsection4:238; O0-NEXT:    movb (%rdi), %al239; O0-NEXT:    movq $1, foo240; O0-NEXT:    retq241;242; O1-LABEL: atomic8_load_acquire:243; O1:       # %bb.0: # %entry244; O1-NEXT:    movq foo(%rip), %rax245; O1-NEXT:  .Lpcsection4:246; O1-NEXT:    movzbl (%rdi), %eax247; O1-NEXT:    movq $1, foo(%rip)248; O1-NEXT:    retq249;250; O2-LABEL: atomic8_load_acquire:251; O2:       # %bb.0: # %entry252; O2-NEXT:    movq foo(%rip), %rax253; O2-NEXT:  .Lpcsection4:254; O2-NEXT:    movzbl (%rdi), %eax255; O2-NEXT:    movq $1, foo(%rip)256; O2-NEXT:    retq257;258; O3-LABEL: atomic8_load_acquire:259; O3:       # %bb.0: # %entry260; O3-NEXT:    movq foo(%rip), %rax261; O3-NEXT:  .Lpcsection4:262; O3-NEXT:    movzbl (%rdi), %eax263; O3-NEXT:    movq $1, foo(%rip)264; O3-NEXT:    retq265;266; HASWELL-O3-LABEL: atomic8_load_acquire:267; HASWELL-O3:       # %bb.0: # %entry268; HASWELL-O3-NEXT:    movq foo(%rip), %rax269; HASWELL-O3-NEXT:  .Lpcsection4:270; HASWELL-O3-NEXT:    movzbl (%rdi), %eax271; HASWELL-O3-NEXT:    movq $1, foo(%rip)272; HASWELL-O3-NEXT:    retq273entry:274  load volatile i64, ptr @foo, align 8275  %x = load atomic i8, ptr %a acquire, align 1, !pcsections !0276  store volatile i64 1, ptr @foo, align 8277  ret i8 %x278}279 280define i8 @atomic8_load_seq_cst(ptr %a) {281; O0-LABEL: atomic8_load_seq_cst:282; O0:       # %bb.0: # %entry283; O0-NEXT:    movq foo(%rip), %rax284; O0-NEXT:  .Lpcsection5:285; O0-NEXT:    movb (%rdi), %al286; O0-NEXT:    movq $1, foo287; O0-NEXT:    retq288;289; O1-LABEL: atomic8_load_seq_cst:290; O1:       # %bb.0: # %entry291; O1-NEXT:    movq foo(%rip), %rax292; O1-NEXT:  .Lpcsection5:293; O1-NEXT:    movzbl (%rdi), %eax294; O1-NEXT:    movq $1, foo(%rip)295; O1-NEXT:    retq296;297; O2-LABEL: atomic8_load_seq_cst:298; O2:       # %bb.0: # %entry299; O2-NEXT:    movq foo(%rip), %rax300; O2-NEXT:  .Lpcsection5:301; O2-NEXT:    movzbl (%rdi), %eax302; O2-NEXT:    movq $1, foo(%rip)303; O2-NEXT:    retq304;305; O3-LABEL: atomic8_load_seq_cst:306; O3:       # %bb.0: # %entry307; O3-NEXT:    movq foo(%rip), %rax308; O3-NEXT:  .Lpcsection5:309; O3-NEXT:    movzbl (%rdi), %eax310; O3-NEXT:    movq $1, foo(%rip)311; O3-NEXT:    retq312;313; HASWELL-O3-LABEL: atomic8_load_seq_cst:314; HASWELL-O3:       # %bb.0: # %entry315; HASWELL-O3-NEXT:    movq foo(%rip), %rax316; HASWELL-O3-NEXT:  .Lpcsection5:317; HASWELL-O3-NEXT:    movzbl (%rdi), %eax318; HASWELL-O3-NEXT:    movq $1, foo(%rip)319; HASWELL-O3-NEXT:    retq320entry:321  load volatile i64, ptr @foo, align 8322  %x = load atomic i8, ptr %a seq_cst, align 1, !pcsections !0323  store volatile i64 1, ptr @foo, align 8324  ret i8 %x325}326 327define void @atomic8_store_unordered(ptr %a) {328; O0-LABEL: atomic8_store_unordered:329; O0:       # %bb.0: # %entry330; O0-NEXT:    movq foo(%rip), %rax331; O0-NEXT:  .Lpcsection6:332; O0-NEXT:    movb $42, (%rdi)333; O0-NEXT:    movq $1, foo334; O0-NEXT:    retq335;336; O1-LABEL: atomic8_store_unordered:337; O1:       # %bb.0: # %entry338; O1-NEXT:    movq foo(%rip), %rax339; O1-NEXT:  .Lpcsection6:340; O1-NEXT:    movb $42, (%rdi)341; O1-NEXT:    movq $1, foo(%rip)342; O1-NEXT:    retq343;344; O2-LABEL: atomic8_store_unordered:345; O2:       # %bb.0: # %entry346; O2-NEXT:    movq foo(%rip), %rax347; O2-NEXT:  .Lpcsection6:348; O2-NEXT:    movb $42, (%rdi)349; O2-NEXT:    movq $1, foo(%rip)350; O2-NEXT:    retq351;352; O3-LABEL: atomic8_store_unordered:353; O3:       # %bb.0: # %entry354; O3-NEXT:    movq foo(%rip), %rax355; O3-NEXT:  .Lpcsection6:356; O3-NEXT:    movb $42, (%rdi)357; O3-NEXT:    movq $1, foo(%rip)358; O3-NEXT:    retq359;360; HASWELL-O3-LABEL: atomic8_store_unordered:361; HASWELL-O3:       # %bb.0: # %entry362; HASWELL-O3-NEXT:    movq foo(%rip), %rax363; HASWELL-O3-NEXT:  .Lpcsection6:364; HASWELL-O3-NEXT:    movb $42, (%rdi)365; HASWELL-O3-NEXT:    movq $1, foo(%rip)366; HASWELL-O3-NEXT:    retq367entry:368  load volatile i64, ptr @foo, align 8369  store atomic i8 42, ptr %a unordered, align 1, !pcsections !0370  store volatile i64 1, ptr @foo, align 8371  ret void372}373 374define void @atomic8_store_monotonic(ptr %a) {375; O0-LABEL: atomic8_store_monotonic:376; O0:       # %bb.0: # %entry377; O0-NEXT:    movq foo(%rip), %rax378; O0-NEXT:  .Lpcsection7:379; O0-NEXT:    movb $42, (%rdi)380; O0-NEXT:    movq $1, foo381; O0-NEXT:    retq382;383; O1-LABEL: atomic8_store_monotonic:384; O1:       # %bb.0: # %entry385; O1-NEXT:    movq foo(%rip), %rax386; O1-NEXT:  .Lpcsection7:387; O1-NEXT:    movb $42, (%rdi)388; O1-NEXT:    movq $1, foo(%rip)389; O1-NEXT:    retq390;391; O2-LABEL: atomic8_store_monotonic:392; O2:       # %bb.0: # %entry393; O2-NEXT:    movq foo(%rip), %rax394; O2-NEXT:  .Lpcsection7:395; O2-NEXT:    movb $42, (%rdi)396; O2-NEXT:    movq $1, foo(%rip)397; O2-NEXT:    retq398;399; O3-LABEL: atomic8_store_monotonic:400; O3:       # %bb.0: # %entry401; O3-NEXT:    movq foo(%rip), %rax402; O3-NEXT:  .Lpcsection7:403; O3-NEXT:    movb $42, (%rdi)404; O3-NEXT:    movq $1, foo(%rip)405; O3-NEXT:    retq406;407; HASWELL-O3-LABEL: atomic8_store_monotonic:408; HASWELL-O3:       # %bb.0: # %entry409; HASWELL-O3-NEXT:    movq foo(%rip), %rax410; HASWELL-O3-NEXT:  .Lpcsection7:411; HASWELL-O3-NEXT:    movb $42, (%rdi)412; HASWELL-O3-NEXT:    movq $1, foo(%rip)413; HASWELL-O3-NEXT:    retq414entry:415  load volatile i64, ptr @foo, align 8416  store atomic i8 42, ptr %a monotonic, align 1, !pcsections !0417  store volatile i64 1, ptr @foo, align 8418  ret void419}420 421define void @atomic8_store_release(ptr %a) {422; O0-LABEL: atomic8_store_release:423; O0:       # %bb.0: # %entry424; O0-NEXT:    movq foo(%rip), %rax425; O0-NEXT:  .Lpcsection8:426; O0-NEXT:    movb $42, (%rdi)427; O0-NEXT:    movq $1, foo428; O0-NEXT:    retq429;430; O1-LABEL: atomic8_store_release:431; O1:       # %bb.0: # %entry432; O1-NEXT:    movq foo(%rip), %rax433; O1-NEXT:  .Lpcsection8:434; O1-NEXT:    movb $42, (%rdi)435; O1-NEXT:    movq $1, foo(%rip)436; O1-NEXT:    retq437;438; O2-LABEL: atomic8_store_release:439; O2:       # %bb.0: # %entry440; O2-NEXT:    movq foo(%rip), %rax441; O2-NEXT:  .Lpcsection8:442; O2-NEXT:    movb $42, (%rdi)443; O2-NEXT:    movq $1, foo(%rip)444; O2-NEXT:    retq445;446; O3-LABEL: atomic8_store_release:447; O3:       # %bb.0: # %entry448; O3-NEXT:    movq foo(%rip), %rax449; O3-NEXT:  .Lpcsection8:450; O3-NEXT:    movb $42, (%rdi)451; O3-NEXT:    movq $1, foo(%rip)452; O3-NEXT:    retq453;454; HASWELL-O3-LABEL: atomic8_store_release:455; HASWELL-O3:       # %bb.0: # %entry456; HASWELL-O3-NEXT:    movq foo(%rip), %rax457; HASWELL-O3-NEXT:  .Lpcsection8:458; HASWELL-O3-NEXT:    movb $42, (%rdi)459; HASWELL-O3-NEXT:    movq $1, foo(%rip)460; HASWELL-O3-NEXT:    retq461entry:462  load volatile i64, ptr @foo, align 8463  store atomic i8 42, ptr %a release, align 1, !pcsections !0464  store volatile i64 1, ptr @foo, align 8465  ret void466}467 468define void @atomic8_store_seq_cst(ptr %a) {469; O0-LABEL: atomic8_store_seq_cst:470; O0:       # %bb.0: # %entry471; O0-NEXT:    movq foo(%rip), %rax472; O0-NEXT:    movb $42, %al473; O0-NEXT:  .Lpcsection9:474; O0-NEXT:    xchgb %al, (%rdi)475; O0-NEXT:    movq $1, foo476; O0-NEXT:    retq477;478; O1-LABEL: atomic8_store_seq_cst:479; O1:       # %bb.0: # %entry480; O1-NEXT:    movq foo(%rip), %rax481; O1-NEXT:    movb $42, %al482; O1-NEXT:  .Lpcsection9:483; O1-NEXT:    xchgb %al, (%rdi)484; O1-NEXT:    movq $1, foo(%rip)485; O1-NEXT:    retq486;487; O2-LABEL: atomic8_store_seq_cst:488; O2:       # %bb.0: # %entry489; O2-NEXT:    movq foo(%rip), %rax490; O2-NEXT:    movb $42, %al491; O2-NEXT:  .Lpcsection9:492; O2-NEXT:    xchgb %al, (%rdi)493; O2-NEXT:    movq $1, foo(%rip)494; O2-NEXT:    retq495;496; O3-LABEL: atomic8_store_seq_cst:497; O3:       # %bb.0: # %entry498; O3-NEXT:    movq foo(%rip), %rax499; O3-NEXT:    movb $42, %al500; O3-NEXT:  .Lpcsection9:501; O3-NEXT:    xchgb %al, (%rdi)502; O3-NEXT:    movq $1, foo(%rip)503; O3-NEXT:    retq504;505; HASWELL-O3-LABEL: atomic8_store_seq_cst:506; HASWELL-O3:       # %bb.0: # %entry507; HASWELL-O3-NEXT:    movq foo(%rip), %rax508; HASWELL-O3-NEXT:    movb $42, %al509; HASWELL-O3-NEXT:  .Lpcsection9:510; HASWELL-O3-NEXT:    xchgb %al, (%rdi)511; HASWELL-O3-NEXT:    movq $1, foo(%rip)512; HASWELL-O3-NEXT:    retq513entry:514  load volatile i64, ptr @foo, align 8515  store atomic i8 42, ptr %a seq_cst, align 1, !pcsections !0516  store volatile i64 1, ptr @foo, align 8517  ret void518}519 520define void @atomic8_xchg_monotonic(ptr %a) {521; O0-LABEL: atomic8_xchg_monotonic:522; O0:       # %bb.0: # %entry523; O0-NEXT:    movq foo(%rip), %rax524; O0-NEXT:    movb $42, %al525; O0-NEXT:  .Lpcsection10:526; O0-NEXT:    xchgb %al, (%rdi)527; O0-NEXT:    movq $1, foo528; O0-NEXT:    retq529;530; O1-LABEL: atomic8_xchg_monotonic:531; O1:       # %bb.0: # %entry532; O1-NEXT:    movq foo(%rip), %rax533; O1-NEXT:    movb $42, %al534; O1-NEXT:  .Lpcsection10:535; O1-NEXT:    xchgb %al, (%rdi)536; O1-NEXT:    movq $1, foo(%rip)537; O1-NEXT:    retq538;539; O2-LABEL: atomic8_xchg_monotonic:540; O2:       # %bb.0: # %entry541; O2-NEXT:    movq foo(%rip), %rax542; O2-NEXT:    movb $42, %al543; O2-NEXT:  .Lpcsection10:544; O2-NEXT:    xchgb %al, (%rdi)545; O2-NEXT:    movq $1, foo(%rip)546; O2-NEXT:    retq547;548; O3-LABEL: atomic8_xchg_monotonic:549; O3:       # %bb.0: # %entry550; O3-NEXT:    movq foo(%rip), %rax551; O3-NEXT:    movb $42, %al552; O3-NEXT:  .Lpcsection10:553; O3-NEXT:    xchgb %al, (%rdi)554; O3-NEXT:    movq $1, foo(%rip)555; O3-NEXT:    retq556;557; HASWELL-O3-LABEL: atomic8_xchg_monotonic:558; HASWELL-O3:       # %bb.0: # %entry559; HASWELL-O3-NEXT:    movq foo(%rip), %rax560; HASWELL-O3-NEXT:    movb $42, %al561; HASWELL-O3-NEXT:  .Lpcsection10:562; HASWELL-O3-NEXT:    xchgb %al, (%rdi)563; HASWELL-O3-NEXT:    movq $1, foo(%rip)564; HASWELL-O3-NEXT:    retq565entry:566  load volatile i64, ptr @foo, align 8567  %x = atomicrmw xchg ptr %a, i8 42 monotonic, align 1, !pcsections !0568  store volatile i64 1, ptr @foo, align 8569  ret void570}571 572define void @atomic8_add_monotonic(ptr %a) {573; O0-LABEL: atomic8_add_monotonic:574; O0:       # %bb.0: # %entry575; O0-NEXT:    movq foo(%rip), %rax576; O0-NEXT:  .Lpcsection11:577; O0-NEXT:    lock addb $42, (%rdi)578; O0-NEXT:    movq $1, foo579; O0-NEXT:    retq580;581; O1-LABEL: atomic8_add_monotonic:582; O1:       # %bb.0: # %entry583; O1-NEXT:    movq foo(%rip), %rax584; O1-NEXT:  .Lpcsection11:585; O1-NEXT:    lock addb $42, (%rdi)586; O1-NEXT:    movq $1, foo(%rip)587; O1-NEXT:    retq588;589; O2-LABEL: atomic8_add_monotonic:590; O2:       # %bb.0: # %entry591; O2-NEXT:    movq foo(%rip), %rax592; O2-NEXT:  .Lpcsection11:593; O2-NEXT:    lock addb $42, (%rdi)594; O2-NEXT:    movq $1, foo(%rip)595; O2-NEXT:    retq596;597; O3-LABEL: atomic8_add_monotonic:598; O3:       # %bb.0: # %entry599; O3-NEXT:    movq foo(%rip), %rax600; O3-NEXT:  .Lpcsection11:601; O3-NEXT:    lock addb $42, (%rdi)602; O3-NEXT:    movq $1, foo(%rip)603; O3-NEXT:    retq604;605; HASWELL-O3-LABEL: atomic8_add_monotonic:606; HASWELL-O3:       # %bb.0: # %entry607; HASWELL-O3-NEXT:    movq foo(%rip), %rax608; HASWELL-O3-NEXT:  .Lpcsection11:609; HASWELL-O3-NEXT:    lock addb $42, (%rdi)610; HASWELL-O3-NEXT:    movq $1, foo(%rip)611; HASWELL-O3-NEXT:    retq612entry:613  load volatile i64, ptr @foo, align 8614  %x = atomicrmw add ptr %a, i8 42 monotonic, align 1, !pcsections !0615  store volatile i64 1, ptr @foo, align 8616  ret void617}618 619define void @atomic8_sub_monotonic(ptr %a) {620; O0-LABEL: atomic8_sub_monotonic:621; O0:       # %bb.0: # %entry622; O0-NEXT:    movq foo(%rip), %rax623; O0-NEXT:  .Lpcsection12:624; O0-NEXT:    lock subb $42, (%rdi)625; O0-NEXT:    movq $1, foo626; O0-NEXT:    retq627;628; O1-LABEL: atomic8_sub_monotonic:629; O1:       # %bb.0: # %entry630; O1-NEXT:    movq foo(%rip), %rax631; O1-NEXT:  .Lpcsection12:632; O1-NEXT:    lock subb $42, (%rdi)633; O1-NEXT:    movq $1, foo(%rip)634; O1-NEXT:    retq635;636; O2-LABEL: atomic8_sub_monotonic:637; O2:       # %bb.0: # %entry638; O2-NEXT:    movq foo(%rip), %rax639; O2-NEXT:  .Lpcsection12:640; O2-NEXT:    lock subb $42, (%rdi)641; O2-NEXT:    movq $1, foo(%rip)642; O2-NEXT:    retq643;644; O3-LABEL: atomic8_sub_monotonic:645; O3:       # %bb.0: # %entry646; O3-NEXT:    movq foo(%rip), %rax647; O3-NEXT:  .Lpcsection12:648; O3-NEXT:    lock subb $42, (%rdi)649; O3-NEXT:    movq $1, foo(%rip)650; O3-NEXT:    retq651;652; HASWELL-O3-LABEL: atomic8_sub_monotonic:653; HASWELL-O3:       # %bb.0: # %entry654; HASWELL-O3-NEXT:    movq foo(%rip), %rax655; HASWELL-O3-NEXT:  .Lpcsection12:656; HASWELL-O3-NEXT:    lock subb $42, (%rdi)657; HASWELL-O3-NEXT:    movq $1, foo(%rip)658; HASWELL-O3-NEXT:    retq659entry:660  load volatile i64, ptr @foo, align 8661  %x = atomicrmw sub ptr %a, i8 42 monotonic, align 1, !pcsections !0662  store volatile i64 1, ptr @foo, align 8663  ret void664}665 666define void @atomic8_and_monotonic(ptr %a) {667; O0-LABEL: atomic8_and_monotonic:668; O0:       # %bb.0: # %entry669; O0-NEXT:    movq foo(%rip), %rax670; O0-NEXT:  .Lpcsection13:671; O0-NEXT:    lock andb $42, (%rdi)672; O0-NEXT:    movq $1, foo673; O0-NEXT:    retq674;675; O1-LABEL: atomic8_and_monotonic:676; O1:       # %bb.0: # %entry677; O1-NEXT:    movq foo(%rip), %rax678; O1-NEXT:  .Lpcsection13:679; O1-NEXT:    lock andb $42, (%rdi)680; O1-NEXT:    movq $1, foo(%rip)681; O1-NEXT:    retq682;683; O2-LABEL: atomic8_and_monotonic:684; O2:       # %bb.0: # %entry685; O2-NEXT:    movq foo(%rip), %rax686; O2-NEXT:  .Lpcsection13:687; O2-NEXT:    lock andb $42, (%rdi)688; O2-NEXT:    movq $1, foo(%rip)689; O2-NEXT:    retq690;691; O3-LABEL: atomic8_and_monotonic:692; O3:       # %bb.0: # %entry693; O3-NEXT:    movq foo(%rip), %rax694; O3-NEXT:  .Lpcsection13:695; O3-NEXT:    lock andb $42, (%rdi)696; O3-NEXT:    movq $1, foo(%rip)697; O3-NEXT:    retq698;699; HASWELL-O3-LABEL: atomic8_and_monotonic:700; HASWELL-O3:       # %bb.0: # %entry701; HASWELL-O3-NEXT:    movq foo(%rip), %rax702; HASWELL-O3-NEXT:  .Lpcsection13:703; HASWELL-O3-NEXT:    lock andb $42, (%rdi)704; HASWELL-O3-NEXT:    movq $1, foo(%rip)705; HASWELL-O3-NEXT:    retq706entry:707  load volatile i64, ptr @foo, align 8708  %x = atomicrmw and ptr %a, i8 42 monotonic, align 1, !pcsections !0709  store volatile i64 1, ptr @foo, align 8710  ret void711}712 713define void @atomic8_or_monotonic(ptr %a) {714; O0-LABEL: atomic8_or_monotonic:715; O0:       # %bb.0: # %entry716; O0-NEXT:    movq foo(%rip), %rax717; O0-NEXT:  .Lpcsection14:718; O0-NEXT:    lock orb $42, (%rdi)719; O0-NEXT:    movq $1, foo720; O0-NEXT:    retq721;722; O1-LABEL: atomic8_or_monotonic:723; O1:       # %bb.0: # %entry724; O1-NEXT:    movq foo(%rip), %rax725; O1-NEXT:  .Lpcsection14:726; O1-NEXT:    lock orb $42, (%rdi)727; O1-NEXT:    movq $1, foo(%rip)728; O1-NEXT:    retq729;730; O2-LABEL: atomic8_or_monotonic:731; O2:       # %bb.0: # %entry732; O2-NEXT:    movq foo(%rip), %rax733; O2-NEXT:  .Lpcsection14:734; O2-NEXT:    lock orb $42, (%rdi)735; O2-NEXT:    movq $1, foo(%rip)736; O2-NEXT:    retq737;738; O3-LABEL: atomic8_or_monotonic:739; O3:       # %bb.0: # %entry740; O3-NEXT:    movq foo(%rip), %rax741; O3-NEXT:  .Lpcsection14:742; O3-NEXT:    lock orb $42, (%rdi)743; O3-NEXT:    movq $1, foo(%rip)744; O3-NEXT:    retq745;746; HASWELL-O3-LABEL: atomic8_or_monotonic:747; HASWELL-O3:       # %bb.0: # %entry748; HASWELL-O3-NEXT:    movq foo(%rip), %rax749; HASWELL-O3-NEXT:  .Lpcsection14:750; HASWELL-O3-NEXT:    lock orb $42, (%rdi)751; HASWELL-O3-NEXT:    movq $1, foo(%rip)752; HASWELL-O3-NEXT:    retq753entry:754  load volatile i64, ptr @foo, align 8755  %x = atomicrmw or ptr %a, i8 42 monotonic, align 1, !pcsections !0756  store volatile i64 1, ptr @foo, align 8757  ret void758}759 760define void @atomic8_xor_monotonic(ptr %a) {761; O0-LABEL: atomic8_xor_monotonic:762; O0:       # %bb.0: # %entry763; O0-NEXT:    movq foo(%rip), %rax764; O0-NEXT:  .Lpcsection15:765; O0-NEXT:    lock xorb $42, (%rdi)766; O0-NEXT:    movq $1, foo767; O0-NEXT:    retq768;769; O1-LABEL: atomic8_xor_monotonic:770; O1:       # %bb.0: # %entry771; O1-NEXT:    movq foo(%rip), %rax772; O1-NEXT:  .Lpcsection15:773; O1-NEXT:    lock xorb $42, (%rdi)774; O1-NEXT:    movq $1, foo(%rip)775; O1-NEXT:    retq776;777; O2-LABEL: atomic8_xor_monotonic:778; O2:       # %bb.0: # %entry779; O2-NEXT:    movq foo(%rip), %rax780; O2-NEXT:  .Lpcsection15:781; O2-NEXT:    lock xorb $42, (%rdi)782; O2-NEXT:    movq $1, foo(%rip)783; O2-NEXT:    retq784;785; O3-LABEL: atomic8_xor_monotonic:786; O3:       # %bb.0: # %entry787; O3-NEXT:    movq foo(%rip), %rax788; O3-NEXT:  .Lpcsection15:789; O3-NEXT:    lock xorb $42, (%rdi)790; O3-NEXT:    movq $1, foo(%rip)791; O3-NEXT:    retq792;793; HASWELL-O3-LABEL: atomic8_xor_monotonic:794; HASWELL-O3:       # %bb.0: # %entry795; HASWELL-O3-NEXT:    movq foo(%rip), %rax796; HASWELL-O3-NEXT:  .Lpcsection15:797; HASWELL-O3-NEXT:    lock xorb $42, (%rdi)798; HASWELL-O3-NEXT:    movq $1, foo(%rip)799; HASWELL-O3-NEXT:    retq800entry:801  load volatile i64, ptr @foo, align 8802  %x = atomicrmw xor ptr %a, i8 42 monotonic, align 1, !pcsections !0803  store volatile i64 1, ptr @foo, align 8804  ret void805}806 807define void @atomic8_nand_monotonic(ptr %a) {808; O0-LABEL: atomic8_nand_monotonic:809; O0:       # %bb.0: # %entry810; O0-NEXT:    movq %rdi, {{[-0-9]+}}(%r{{[sb]}}p) # 8-byte Spill811; O0-NEXT:    movq foo, %rax812; O0-NEXT:  .Lpcsection16:813; O0-NEXT:    movb (%rdi), %al814; O0-NEXT:    movb %al, {{[-0-9]+}}(%r{{[sb]}}p) # 1-byte Spill815; O0-NEXT:  .LBB16_1: # %atomicrmw.start816; O0-NEXT:    # =>This Inner Loop Header: Depth=1817; O0-NEXT:    movb {{[-0-9]+}}(%r{{[sb]}}p), %al # 1-byte Reload818; O0-NEXT:    movq {{[-0-9]+}}(%r{{[sb]}}p), %rcx # 8-byte Reload819; O0-NEXT:    movb %al, %dl820; O0-NEXT:  .Lpcsection17:821; O0-NEXT:    notb %dl822; O0-NEXT:  .Lpcsection18:823; O0-NEXT:    orb $-43, %dl824; O0-NEXT:  .Lpcsection19:825; O0-NEXT:    lock cmpxchgb %dl, (%rcx)826; O0-NEXT:  .Lpcsection20:827; O0-NEXT:    sete %cl828; O0-NEXT:  .Lpcsection21:829; O0-NEXT:    testb $1, %cl830; O0-NEXT:    movb %al, {{[-0-9]+}}(%r{{[sb]}}p) # 1-byte Spill831; O0-NEXT:  .Lpcsection22:832; O0-NEXT:    jne .LBB16_2833; O0-NEXT:    jmp .LBB16_1834; O0-NEXT:  .LBB16_2: # %atomicrmw.end835; O0-NEXT:    movq $1, foo836; O0-NEXT:    retq837;838; O1-LABEL: atomic8_nand_monotonic:839; O1:       # %bb.0: # %entry840; O1-NEXT:    movq foo(%rip), %rax841; O1-NEXT:  .Lpcsection16:842; O1-NEXT:    movzbl (%rdi), %eax843; O1-NEXT:    .p2align 4844; O1-NEXT:  .LBB16_1: # %atomicrmw.start845; O1-NEXT:    # =>This Inner Loop Header: Depth=1846; O1-NEXT:    movl %eax, %ecx847; O1-NEXT:  .Lpcsection17:848; O1-NEXT:    notb %cl849; O1-NEXT:  .Lpcsection18:850; O1-NEXT:    orb $-43, %cl851; O1-NEXT:  .Lpcsection19:852; O1-NEXT:    lock cmpxchgb %cl, (%rdi)853; O1-NEXT:  .Lpcsection20:854; O1-NEXT:    jne .LBB16_1855; O1-NEXT:  # %bb.2: # %atomicrmw.end856; O1-NEXT:    movq $1, foo(%rip)857; O1-NEXT:    retq858;859; O2-LABEL: atomic8_nand_monotonic:860; O2:       # %bb.0: # %entry861; O2-NEXT:    movq foo(%rip), %rax862; O2-NEXT:  .Lpcsection16:863; O2-NEXT:    movzbl (%rdi), %eax864; O2-NEXT:    .p2align 4865; O2-NEXT:  .LBB16_1: # %atomicrmw.start866; O2-NEXT:    # =>This Inner Loop Header: Depth=1867; O2-NEXT:    movl %eax, %ecx868; O2-NEXT:  .Lpcsection17:869; O2-NEXT:    notb %cl870; O2-NEXT:  .Lpcsection18:871; O2-NEXT:    orb $-43, %cl872; O2-NEXT:  .Lpcsection19:873; O2-NEXT:    lock cmpxchgb %cl, (%rdi)874; O2-NEXT:  .Lpcsection20:875; O2-NEXT:    jne .LBB16_1876; O2-NEXT:  # %bb.2: # %atomicrmw.end877; O2-NEXT:    movq $1, foo(%rip)878; O2-NEXT:    retq879;880; O3-LABEL: atomic8_nand_monotonic:881; O3:       # %bb.0: # %entry882; O3-NEXT:    movq foo(%rip), %rax883; O3-NEXT:  .Lpcsection16:884; O3-NEXT:    movzbl (%rdi), %eax885; O3-NEXT:    .p2align 4886; O3-NEXT:  .LBB16_1: # %atomicrmw.start887; O3-NEXT:    # =>This Inner Loop Header: Depth=1888; O3-NEXT:    movl %eax, %ecx889; O3-NEXT:  .Lpcsection17:890; O3-NEXT:    notb %cl891; O3-NEXT:  .Lpcsection18:892; O3-NEXT:    orb $-43, %cl893; O3-NEXT:  .Lpcsection19:894; O3-NEXT:    lock cmpxchgb %cl, (%rdi)895; O3-NEXT:  .Lpcsection20:896; O3-NEXT:    jne .LBB16_1897; O3-NEXT:  # %bb.2: # %atomicrmw.end898; O3-NEXT:    movq $1, foo(%rip)899; O3-NEXT:    retq900;901; HASWELL-O3-LABEL: atomic8_nand_monotonic:902; HASWELL-O3:       # %bb.0: # %entry903; HASWELL-O3-NEXT:    movq foo(%rip), %rax904; HASWELL-O3-NEXT:  .Lpcsection16:905; HASWELL-O3-NEXT:    movzbl (%rdi), %eax906; HASWELL-O3-NEXT:    .p2align 4907; HASWELL-O3-NEXT:  .LBB16_1: # %atomicrmw.start908; HASWELL-O3-NEXT:    # =>This Inner Loop Header: Depth=1909; HASWELL-O3-NEXT:    movl %eax, %ecx910; HASWELL-O3-NEXT:  .Lpcsection17:911; HASWELL-O3-NEXT:    notb %cl912; HASWELL-O3-NEXT:  .Lpcsection18:913; HASWELL-O3-NEXT:    orb $-43, %cl914; HASWELL-O3-NEXT:  .Lpcsection19:915; HASWELL-O3-NEXT:    lock cmpxchgb %cl, (%rdi)916; HASWELL-O3-NEXT:  .Lpcsection20:917; HASWELL-O3-NEXT:    jne .LBB16_1918; HASWELL-O3-NEXT:  # %bb.2: # %atomicrmw.end919; HASWELL-O3-NEXT:    movq $1, foo(%rip)920; HASWELL-O3-NEXT:    retq921entry:922  load volatile i64, ptr @foo, align 8923  %x = atomicrmw nand ptr %a, i8 42 monotonic, align 1, !pcsections !0924  store volatile i64 1, ptr @foo, align 8925  ret void926}927 928define void @atomic8_xchg_acquire(ptr %a) {929; O0-LABEL: atomic8_xchg_acquire:930; O0:       # %bb.0: # %entry931; O0-NEXT:    movq foo(%rip), %rax932; O0-NEXT:    movb $42, %al933; O0-NEXT:  .Lpcsection23:934; O0-NEXT:    xchgb %al, (%rdi)935; O0-NEXT:    movq $1, foo936; O0-NEXT:    retq937;938; O1-LABEL: atomic8_xchg_acquire:939; O1:       # %bb.0: # %entry940; O1-NEXT:    movq foo(%rip), %rax941; O1-NEXT:    movb $42, %al942; O1-NEXT:  .Lpcsection21:943; O1-NEXT:    xchgb %al, (%rdi)944; O1-NEXT:    movq $1, foo(%rip)945; O1-NEXT:    retq946;947; O2-LABEL: atomic8_xchg_acquire:948; O2:       # %bb.0: # %entry949; O2-NEXT:    movq foo(%rip), %rax950; O2-NEXT:    movb $42, %al951; O2-NEXT:  .Lpcsection21:952; O2-NEXT:    xchgb %al, (%rdi)953; O2-NEXT:    movq $1, foo(%rip)954; O2-NEXT:    retq955;956; O3-LABEL: atomic8_xchg_acquire:957; O3:       # %bb.0: # %entry958; O3-NEXT:    movq foo(%rip), %rax959; O3-NEXT:    movb $42, %al960; O3-NEXT:  .Lpcsection21:961; O3-NEXT:    xchgb %al, (%rdi)962; O3-NEXT:    movq $1, foo(%rip)963; O3-NEXT:    retq964;965; HASWELL-O3-LABEL: atomic8_xchg_acquire:966; HASWELL-O3:       # %bb.0: # %entry967; HASWELL-O3-NEXT:    movq foo(%rip), %rax968; HASWELL-O3-NEXT:    movb $42, %al969; HASWELL-O3-NEXT:  .Lpcsection21:970; HASWELL-O3-NEXT:    xchgb %al, (%rdi)971; HASWELL-O3-NEXT:    movq $1, foo(%rip)972; HASWELL-O3-NEXT:    retq973entry:974  load volatile i64, ptr @foo, align 8975  %x = atomicrmw xchg ptr %a, i8 42 acquire, align 1, !pcsections !0976  store volatile i64 1, ptr @foo, align 8977  ret void978}979 980define void @atomic8_add_acquire(ptr %a) {981; O0-LABEL: atomic8_add_acquire:982; O0:       # %bb.0: # %entry983; O0-NEXT:    movq foo(%rip), %rax984; O0-NEXT:  .Lpcsection24:985; O0-NEXT:    lock addb $42, (%rdi)986; O0-NEXT:    movq $1, foo987; O0-NEXT:    retq988;989; O1-LABEL: atomic8_add_acquire:990; O1:       # %bb.0: # %entry991; O1-NEXT:    movq foo(%rip), %rax992; O1-NEXT:  .Lpcsection22:993; O1-NEXT:    lock addb $42, (%rdi)994; O1-NEXT:    movq $1, foo(%rip)995; O1-NEXT:    retq996;997; O2-LABEL: atomic8_add_acquire:998; O2:       # %bb.0: # %entry999; O2-NEXT:    movq foo(%rip), %rax1000; O2-NEXT:  .Lpcsection22:1001; O2-NEXT:    lock addb $42, (%rdi)1002; O2-NEXT:    movq $1, foo(%rip)1003; O2-NEXT:    retq1004;1005; O3-LABEL: atomic8_add_acquire:1006; O3:       # %bb.0: # %entry1007; O3-NEXT:    movq foo(%rip), %rax1008; O3-NEXT:  .Lpcsection22:1009; O3-NEXT:    lock addb $42, (%rdi)1010; O3-NEXT:    movq $1, foo(%rip)1011; O3-NEXT:    retq1012;1013; HASWELL-O3-LABEL: atomic8_add_acquire:1014; HASWELL-O3:       # %bb.0: # %entry1015; HASWELL-O3-NEXT:    movq foo(%rip), %rax1016; HASWELL-O3-NEXT:  .Lpcsection22:1017; HASWELL-O3-NEXT:    lock addb $42, (%rdi)1018; HASWELL-O3-NEXT:    movq $1, foo(%rip)1019; HASWELL-O3-NEXT:    retq1020entry:1021  load volatile i64, ptr @foo, align 81022  %x = atomicrmw add ptr %a, i8 42 acquire, align 1, !pcsections !01023  store volatile i64 1, ptr @foo, align 81024  ret void1025}1026 1027define void @atomic8_sub_acquire(ptr %a) {1028; O0-LABEL: atomic8_sub_acquire:1029; O0:       # %bb.0: # %entry1030; O0-NEXT:    movq foo(%rip), %rax1031; O0-NEXT:  .Lpcsection25:1032; O0-NEXT:    lock subb $42, (%rdi)1033; O0-NEXT:    movq $1, foo1034; O0-NEXT:    retq1035;1036; O1-LABEL: atomic8_sub_acquire:1037; O1:       # %bb.0: # %entry1038; O1-NEXT:    movq foo(%rip), %rax1039; O1-NEXT:  .Lpcsection23:1040; O1-NEXT:    lock subb $42, (%rdi)1041; O1-NEXT:    movq $1, foo(%rip)1042; O1-NEXT:    retq1043;1044; O2-LABEL: atomic8_sub_acquire:1045; O2:       # %bb.0: # %entry1046; O2-NEXT:    movq foo(%rip), %rax1047; O2-NEXT:  .Lpcsection23:1048; O2-NEXT:    lock subb $42, (%rdi)1049; O2-NEXT:    movq $1, foo(%rip)1050; O2-NEXT:    retq1051;1052; O3-LABEL: atomic8_sub_acquire:1053; O3:       # %bb.0: # %entry1054; O3-NEXT:    movq foo(%rip), %rax1055; O3-NEXT:  .Lpcsection23:1056; O3-NEXT:    lock subb $42, (%rdi)1057; O3-NEXT:    movq $1, foo(%rip)1058; O3-NEXT:    retq1059;1060; HASWELL-O3-LABEL: atomic8_sub_acquire:1061; HASWELL-O3:       # %bb.0: # %entry1062; HASWELL-O3-NEXT:    movq foo(%rip), %rax1063; HASWELL-O3-NEXT:  .Lpcsection23:1064; HASWELL-O3-NEXT:    lock subb $42, (%rdi)1065; HASWELL-O3-NEXT:    movq $1, foo(%rip)1066; HASWELL-O3-NEXT:    retq1067entry:1068  load volatile i64, ptr @foo, align 81069  %x = atomicrmw sub ptr %a, i8 42 acquire, align 1, !pcsections !01070  store volatile i64 1, ptr @foo, align 81071  ret void1072}1073 1074define void @atomic8_and_acquire(ptr %a) {1075; O0-LABEL: atomic8_and_acquire:1076; O0:       # %bb.0: # %entry1077; O0-NEXT:    movq foo(%rip), %rax1078; O0-NEXT:  .Lpcsection26:1079; O0-NEXT:    lock andb $42, (%rdi)1080; O0-NEXT:    movq $1, foo1081; O0-NEXT:    retq1082;1083; O1-LABEL: atomic8_and_acquire:1084; O1:       # %bb.0: # %entry1085; O1-NEXT:    movq foo(%rip), %rax1086; O1-NEXT:  .Lpcsection24:1087; O1-NEXT:    lock andb $42, (%rdi)1088; O1-NEXT:    movq $1, foo(%rip)1089; O1-NEXT:    retq1090;1091; O2-LABEL: atomic8_and_acquire:1092; O2:       # %bb.0: # %entry1093; O2-NEXT:    movq foo(%rip), %rax1094; O2-NEXT:  .Lpcsection24:1095; O2-NEXT:    lock andb $42, (%rdi)1096; O2-NEXT:    movq $1, foo(%rip)1097; O2-NEXT:    retq1098;1099; O3-LABEL: atomic8_and_acquire:1100; O3:       # %bb.0: # %entry1101; O3-NEXT:    movq foo(%rip), %rax1102; O3-NEXT:  .Lpcsection24:1103; O3-NEXT:    lock andb $42, (%rdi)1104; O3-NEXT:    movq $1, foo(%rip)1105; O3-NEXT:    retq1106;1107; HASWELL-O3-LABEL: atomic8_and_acquire:1108; HASWELL-O3:       # %bb.0: # %entry1109; HASWELL-O3-NEXT:    movq foo(%rip), %rax1110; HASWELL-O3-NEXT:  .Lpcsection24:1111; HASWELL-O3-NEXT:    lock andb $42, (%rdi)1112; HASWELL-O3-NEXT:    movq $1, foo(%rip)1113; HASWELL-O3-NEXT:    retq1114entry:1115  load volatile i64, ptr @foo, align 81116  %x = atomicrmw and ptr %a, i8 42 acquire, align 1, !pcsections !01117  store volatile i64 1, ptr @foo, align 81118  ret void1119}1120 1121define void @atomic8_or_acquire(ptr %a) {1122; O0-LABEL: atomic8_or_acquire:1123; O0:       # %bb.0: # %entry1124; O0-NEXT:    movq foo(%rip), %rax1125; O0-NEXT:  .Lpcsection27:1126; O0-NEXT:    lock orb $42, (%rdi)1127; O0-NEXT:    movq $1, foo1128; O0-NEXT:    retq1129;1130; O1-LABEL: atomic8_or_acquire:1131; O1:       # %bb.0: # %entry1132; O1-NEXT:    movq foo(%rip), %rax1133; O1-NEXT:  .Lpcsection25:1134; O1-NEXT:    lock orb $42, (%rdi)1135; O1-NEXT:    movq $1, foo(%rip)1136; O1-NEXT:    retq1137;1138; O2-LABEL: atomic8_or_acquire:1139; O2:       # %bb.0: # %entry1140; O2-NEXT:    movq foo(%rip), %rax1141; O2-NEXT:  .Lpcsection25:1142; O2-NEXT:    lock orb $42, (%rdi)1143; O2-NEXT:    movq $1, foo(%rip)1144; O2-NEXT:    retq1145;1146; O3-LABEL: atomic8_or_acquire:1147; O3:       # %bb.0: # %entry1148; O3-NEXT:    movq foo(%rip), %rax1149; O3-NEXT:  .Lpcsection25:1150; O3-NEXT:    lock orb $42, (%rdi)1151; O3-NEXT:    movq $1, foo(%rip)1152; O3-NEXT:    retq1153;1154; HASWELL-O3-LABEL: atomic8_or_acquire:1155; HASWELL-O3:       # %bb.0: # %entry1156; HASWELL-O3-NEXT:    movq foo(%rip), %rax1157; HASWELL-O3-NEXT:  .Lpcsection25:1158; HASWELL-O3-NEXT:    lock orb $42, (%rdi)1159; HASWELL-O3-NEXT:    movq $1, foo(%rip)1160; HASWELL-O3-NEXT:    retq1161entry:1162  load volatile i64, ptr @foo, align 81163  %x = atomicrmw or ptr %a, i8 42 acquire, align 1, !pcsections !01164  store volatile i64 1, ptr @foo, align 81165  ret void1166}1167 1168define void @atomic8_xor_acquire(ptr %a) {1169; O0-LABEL: atomic8_xor_acquire:1170; O0:       # %bb.0: # %entry1171; O0-NEXT:    movq foo(%rip), %rax1172; O0-NEXT:  .Lpcsection28:1173; O0-NEXT:    lock xorb $42, (%rdi)1174; O0-NEXT:    movq $1, foo1175; O0-NEXT:    retq1176;1177; O1-LABEL: atomic8_xor_acquire:1178; O1:       # %bb.0: # %entry1179; O1-NEXT:    movq foo(%rip), %rax1180; O1-NEXT:  .Lpcsection26:1181; O1-NEXT:    lock xorb $42, (%rdi)1182; O1-NEXT:    movq $1, foo(%rip)1183; O1-NEXT:    retq1184;1185; O2-LABEL: atomic8_xor_acquire:1186; O2:       # %bb.0: # %entry1187; O2-NEXT:    movq foo(%rip), %rax1188; O2-NEXT:  .Lpcsection26:1189; O2-NEXT:    lock xorb $42, (%rdi)1190; O2-NEXT:    movq $1, foo(%rip)1191; O2-NEXT:    retq1192;1193; O3-LABEL: atomic8_xor_acquire:1194; O3:       # %bb.0: # %entry1195; O3-NEXT:    movq foo(%rip), %rax1196; O3-NEXT:  .Lpcsection26:1197; O3-NEXT:    lock xorb $42, (%rdi)1198; O3-NEXT:    movq $1, foo(%rip)1199; O3-NEXT:    retq1200;1201; HASWELL-O3-LABEL: atomic8_xor_acquire:1202; HASWELL-O3:       # %bb.0: # %entry1203; HASWELL-O3-NEXT:    movq foo(%rip), %rax1204; HASWELL-O3-NEXT:  .Lpcsection26:1205; HASWELL-O3-NEXT:    lock xorb $42, (%rdi)1206; HASWELL-O3-NEXT:    movq $1, foo(%rip)1207; HASWELL-O3-NEXT:    retq1208entry:1209  load volatile i64, ptr @foo, align 81210  %x = atomicrmw xor ptr %a, i8 42 acquire, align 1, !pcsections !01211  store volatile i64 1, ptr @foo, align 81212  ret void1213}1214 1215define void @atomic8_nand_acquire(ptr %a) {1216; O0-LABEL: atomic8_nand_acquire:1217; O0:       # %bb.0: # %entry1218; O0-NEXT:    movq %rdi, {{[-0-9]+}}(%r{{[sb]}}p) # 8-byte Spill1219; O0-NEXT:    movq foo, %rax1220; O0-NEXT:  .Lpcsection29:1221; O0-NEXT:    movb (%rdi), %al1222; O0-NEXT:    movb %al, {{[-0-9]+}}(%r{{[sb]}}p) # 1-byte Spill1223; O0-NEXT:  .LBB23_1: # %atomicrmw.start1224; O0-NEXT:    # =>This Inner Loop Header: Depth=11225; O0-NEXT:    movb {{[-0-9]+}}(%r{{[sb]}}p), %al # 1-byte Reload1226; O0-NEXT:    movq {{[-0-9]+}}(%r{{[sb]}}p), %rcx # 8-byte Reload1227; O0-NEXT:    movb %al, %dl1228; O0-NEXT:  .Lpcsection30:1229; O0-NEXT:    notb %dl1230; O0-NEXT:  .Lpcsection31:1231; O0-NEXT:    orb $-43, %dl1232; O0-NEXT:  .Lpcsection32:1233; O0-NEXT:    lock cmpxchgb %dl, (%rcx)1234; O0-NEXT:  .Lpcsection33:1235; O0-NEXT:    sete %cl1236; O0-NEXT:  .Lpcsection34:1237; O0-NEXT:    testb $1, %cl1238; O0-NEXT:    movb %al, {{[-0-9]+}}(%r{{[sb]}}p) # 1-byte Spill1239; O0-NEXT:  .Lpcsection35:1240; O0-NEXT:    jne .LBB23_21241; O0-NEXT:    jmp .LBB23_11242; O0-NEXT:  .LBB23_2: # %atomicrmw.end1243; O0-NEXT:    movq $1, foo1244; O0-NEXT:    retq1245;1246; O1-LABEL: atomic8_nand_acquire:1247; O1:       # %bb.0: # %entry1248; O1-NEXT:    movq foo(%rip), %rax1249; O1-NEXT:  .Lpcsection27:1250; O1-NEXT:    movzbl (%rdi), %eax1251; O1-NEXT:    .p2align 41252; O1-NEXT:  .LBB23_1: # %atomicrmw.start1253; O1-NEXT:    # =>This Inner Loop Header: Depth=11254; O1-NEXT:    movl %eax, %ecx1255; O1-NEXT:  .Lpcsection28:1256; O1-NEXT:    notb %cl1257; O1-NEXT:  .Lpcsection29:1258; O1-NEXT:    orb $-43, %cl1259; O1-NEXT:  .Lpcsection30:1260; O1-NEXT:    lock cmpxchgb %cl, (%rdi)1261; O1-NEXT:  .Lpcsection31:1262; O1-NEXT:    jne .LBB23_11263; O1-NEXT:  # %bb.2: # %atomicrmw.end1264; O1-NEXT:    movq $1, foo(%rip)1265; O1-NEXT:    retq1266;1267; O2-LABEL: atomic8_nand_acquire:1268; O2:       # %bb.0: # %entry1269; O2-NEXT:    movq foo(%rip), %rax1270; O2-NEXT:  .Lpcsection27:1271; O2-NEXT:    movzbl (%rdi), %eax1272; O2-NEXT:    .p2align 41273; O2-NEXT:  .LBB23_1: # %atomicrmw.start1274; O2-NEXT:    # =>This Inner Loop Header: Depth=11275; O2-NEXT:    movl %eax, %ecx1276; O2-NEXT:  .Lpcsection28:1277; O2-NEXT:    notb %cl1278; O2-NEXT:  .Lpcsection29:1279; O2-NEXT:    orb $-43, %cl1280; O2-NEXT:  .Lpcsection30:1281; O2-NEXT:    lock cmpxchgb %cl, (%rdi)1282; O2-NEXT:  .Lpcsection31:1283; O2-NEXT:    jne .LBB23_11284; O2-NEXT:  # %bb.2: # %atomicrmw.end1285; O2-NEXT:    movq $1, foo(%rip)1286; O2-NEXT:    retq1287;1288; O3-LABEL: atomic8_nand_acquire:1289; O3:       # %bb.0: # %entry1290; O3-NEXT:    movq foo(%rip), %rax1291; O3-NEXT:  .Lpcsection27:1292; O3-NEXT:    movzbl (%rdi), %eax1293; O3-NEXT:    .p2align 41294; O3-NEXT:  .LBB23_1: # %atomicrmw.start1295; O3-NEXT:    # =>This Inner Loop Header: Depth=11296; O3-NEXT:    movl %eax, %ecx1297; O3-NEXT:  .Lpcsection28:1298; O3-NEXT:    notb %cl1299; O3-NEXT:  .Lpcsection29:1300; O3-NEXT:    orb $-43, %cl1301; O3-NEXT:  .Lpcsection30:1302; O3-NEXT:    lock cmpxchgb %cl, (%rdi)1303; O3-NEXT:  .Lpcsection31:1304; O3-NEXT:    jne .LBB23_11305; O3-NEXT:  # %bb.2: # %atomicrmw.end1306; O3-NEXT:    movq $1, foo(%rip)1307; O3-NEXT:    retq1308;1309; HASWELL-O3-LABEL: atomic8_nand_acquire:1310; HASWELL-O3:       # %bb.0: # %entry1311; HASWELL-O3-NEXT:    movq foo(%rip), %rax1312; HASWELL-O3-NEXT:  .Lpcsection27:1313; HASWELL-O3-NEXT:    movzbl (%rdi), %eax1314; HASWELL-O3-NEXT:    .p2align 41315; HASWELL-O3-NEXT:  .LBB23_1: # %atomicrmw.start1316; HASWELL-O3-NEXT:    # =>This Inner Loop Header: Depth=11317; HASWELL-O3-NEXT:    movl %eax, %ecx1318; HASWELL-O3-NEXT:  .Lpcsection28:1319; HASWELL-O3-NEXT:    notb %cl1320; HASWELL-O3-NEXT:  .Lpcsection29:1321; HASWELL-O3-NEXT:    orb $-43, %cl1322; HASWELL-O3-NEXT:  .Lpcsection30:1323; HASWELL-O3-NEXT:    lock cmpxchgb %cl, (%rdi)1324; HASWELL-O3-NEXT:  .Lpcsection31:1325; HASWELL-O3-NEXT:    jne .LBB23_11326; HASWELL-O3-NEXT:  # %bb.2: # %atomicrmw.end1327; HASWELL-O3-NEXT:    movq $1, foo(%rip)1328; HASWELL-O3-NEXT:    retq1329entry:1330  load volatile i64, ptr @foo, align 81331  %x = atomicrmw nand ptr %a, i8 42 acquire, align 1, !pcsections !01332  store volatile i64 1, ptr @foo, align 81333  ret void1334}1335 1336define void @atomic8_xchg_release(ptr %a) {1337; O0-LABEL: atomic8_xchg_release:1338; O0:       # %bb.0: # %entry1339; O0-NEXT:    movq foo(%rip), %rax1340; O0-NEXT:    movb $42, %al1341; O0-NEXT:  .Lpcsection36:1342; O0-NEXT:    xchgb %al, (%rdi)1343; O0-NEXT:    movq $1, foo1344; O0-NEXT:    retq1345;1346; O1-LABEL: atomic8_xchg_release:1347; O1:       # %bb.0: # %entry1348; O1-NEXT:    movq foo(%rip), %rax1349; O1-NEXT:    movb $42, %al1350; O1-NEXT:  .Lpcsection32:1351; O1-NEXT:    xchgb %al, (%rdi)1352; O1-NEXT:    movq $1, foo(%rip)1353; O1-NEXT:    retq1354;1355; O2-LABEL: atomic8_xchg_release:1356; O2:       # %bb.0: # %entry1357; O2-NEXT:    movq foo(%rip), %rax1358; O2-NEXT:    movb $42, %al1359; O2-NEXT:  .Lpcsection32:1360; O2-NEXT:    xchgb %al, (%rdi)1361; O2-NEXT:    movq $1, foo(%rip)1362; O2-NEXT:    retq1363;1364; O3-LABEL: atomic8_xchg_release:1365; O3:       # %bb.0: # %entry1366; O3-NEXT:    movq foo(%rip), %rax1367; O3-NEXT:    movb $42, %al1368; O3-NEXT:  .Lpcsection32:1369; O3-NEXT:    xchgb %al, (%rdi)1370; O3-NEXT:    movq $1, foo(%rip)1371; O3-NEXT:    retq1372;1373; HASWELL-O3-LABEL: atomic8_xchg_release:1374; HASWELL-O3:       # %bb.0: # %entry1375; HASWELL-O3-NEXT:    movq foo(%rip), %rax1376; HASWELL-O3-NEXT:    movb $42, %al1377; HASWELL-O3-NEXT:  .Lpcsection32:1378; HASWELL-O3-NEXT:    xchgb %al, (%rdi)1379; HASWELL-O3-NEXT:    movq $1, foo(%rip)1380; HASWELL-O3-NEXT:    retq1381entry:1382  load volatile i64, ptr @foo, align 81383  %x = atomicrmw xchg ptr %a, i8 42 release, align 1, !pcsections !01384  store volatile i64 1, ptr @foo, align 81385  ret void1386}1387 1388define void @atomic8_add_release(ptr %a) {1389; O0-LABEL: atomic8_add_release:1390; O0:       # %bb.0: # %entry1391; O0-NEXT:    movq foo(%rip), %rax1392; O0-NEXT:  .Lpcsection37:1393; O0-NEXT:    lock addb $42, (%rdi)1394; O0-NEXT:    movq $1, foo1395; O0-NEXT:    retq1396;1397; O1-LABEL: atomic8_add_release:1398; O1:       # %bb.0: # %entry1399; O1-NEXT:    movq foo(%rip), %rax1400; O1-NEXT:  .Lpcsection33:1401; O1-NEXT:    lock addb $42, (%rdi)1402; O1-NEXT:    movq $1, foo(%rip)1403; O1-NEXT:    retq1404;1405; O2-LABEL: atomic8_add_release:1406; O2:       # %bb.0: # %entry1407; O2-NEXT:    movq foo(%rip), %rax1408; O2-NEXT:  .Lpcsection33:1409; O2-NEXT:    lock addb $42, (%rdi)1410; O2-NEXT:    movq $1, foo(%rip)1411; O2-NEXT:    retq1412;1413; O3-LABEL: atomic8_add_release:1414; O3:       # %bb.0: # %entry1415; O3-NEXT:    movq foo(%rip), %rax1416; O3-NEXT:  .Lpcsection33:1417; O3-NEXT:    lock addb $42, (%rdi)1418; O3-NEXT:    movq $1, foo(%rip)1419; O3-NEXT:    retq1420;1421; HASWELL-O3-LABEL: atomic8_add_release:1422; HASWELL-O3:       # %bb.0: # %entry1423; HASWELL-O3-NEXT:    movq foo(%rip), %rax1424; HASWELL-O3-NEXT:  .Lpcsection33:1425; HASWELL-O3-NEXT:    lock addb $42, (%rdi)1426; HASWELL-O3-NEXT:    movq $1, foo(%rip)1427; HASWELL-O3-NEXT:    retq1428entry:1429  load volatile i64, ptr @foo, align 81430  %x = atomicrmw add ptr %a, i8 42 release, align 1, !pcsections !01431  store volatile i64 1, ptr @foo, align 81432  ret void1433}1434 1435define void @atomic8_sub_release(ptr %a) {1436; O0-LABEL: atomic8_sub_release:1437; O0:       # %bb.0: # %entry1438; O0-NEXT:    movq foo(%rip), %rax1439; O0-NEXT:  .Lpcsection38:1440; O0-NEXT:    lock subb $42, (%rdi)1441; O0-NEXT:    movq $1, foo1442; O0-NEXT:    retq1443;1444; O1-LABEL: atomic8_sub_release:1445; O1:       # %bb.0: # %entry1446; O1-NEXT:    movq foo(%rip), %rax1447; O1-NEXT:  .Lpcsection34:1448; O1-NEXT:    lock subb $42, (%rdi)1449; O1-NEXT:    movq $1, foo(%rip)1450; O1-NEXT:    retq1451;1452; O2-LABEL: atomic8_sub_release:1453; O2:       # %bb.0: # %entry1454; O2-NEXT:    movq foo(%rip), %rax1455; O2-NEXT:  .Lpcsection34:1456; O2-NEXT:    lock subb $42, (%rdi)1457; O2-NEXT:    movq $1, foo(%rip)1458; O2-NEXT:    retq1459;1460; O3-LABEL: atomic8_sub_release:1461; O3:       # %bb.0: # %entry1462; O3-NEXT:    movq foo(%rip), %rax1463; O3-NEXT:  .Lpcsection34:1464; O3-NEXT:    lock subb $42, (%rdi)1465; O3-NEXT:    movq $1, foo(%rip)1466; O3-NEXT:    retq1467;1468; HASWELL-O3-LABEL: atomic8_sub_release:1469; HASWELL-O3:       # %bb.0: # %entry1470; HASWELL-O3-NEXT:    movq foo(%rip), %rax1471; HASWELL-O3-NEXT:  .Lpcsection34:1472; HASWELL-O3-NEXT:    lock subb $42, (%rdi)1473; HASWELL-O3-NEXT:    movq $1, foo(%rip)1474; HASWELL-O3-NEXT:    retq1475entry:1476  load volatile i64, ptr @foo, align 81477  %x = atomicrmw sub ptr %a, i8 42 release, align 1, !pcsections !01478  store volatile i64 1, ptr @foo, align 81479  ret void1480}1481 1482define void @atomic8_and_release(ptr %a) {1483; O0-LABEL: atomic8_and_release:1484; O0:       # %bb.0: # %entry1485; O0-NEXT:    movq foo(%rip), %rax1486; O0-NEXT:  .Lpcsection39:1487; O0-NEXT:    lock andb $42, (%rdi)1488; O0-NEXT:    movq $1, foo1489; O0-NEXT:    retq1490;1491; O1-LABEL: atomic8_and_release:1492; O1:       # %bb.0: # %entry1493; O1-NEXT:    movq foo(%rip), %rax1494; O1-NEXT:  .Lpcsection35:1495; O1-NEXT:    lock andb $42, (%rdi)1496; O1-NEXT:    movq $1, foo(%rip)1497; O1-NEXT:    retq1498;1499; O2-LABEL: atomic8_and_release:1500; O2:       # %bb.0: # %entry1501; O2-NEXT:    movq foo(%rip), %rax1502; O2-NEXT:  .Lpcsection35:1503; O2-NEXT:    lock andb $42, (%rdi)1504; O2-NEXT:    movq $1, foo(%rip)1505; O2-NEXT:    retq1506;1507; O3-LABEL: atomic8_and_release:1508; O3:       # %bb.0: # %entry1509; O3-NEXT:    movq foo(%rip), %rax1510; O3-NEXT:  .Lpcsection35:1511; O3-NEXT:    lock andb $42, (%rdi)1512; O3-NEXT:    movq $1, foo(%rip)1513; O3-NEXT:    retq1514;1515; HASWELL-O3-LABEL: atomic8_and_release:1516; HASWELL-O3:       # %bb.0: # %entry1517; HASWELL-O3-NEXT:    movq foo(%rip), %rax1518; HASWELL-O3-NEXT:  .Lpcsection35:1519; HASWELL-O3-NEXT:    lock andb $42, (%rdi)1520; HASWELL-O3-NEXT:    movq $1, foo(%rip)1521; HASWELL-O3-NEXT:    retq1522entry:1523  load volatile i64, ptr @foo, align 81524  %x = atomicrmw and ptr %a, i8 42 release, align 1, !pcsections !01525  store volatile i64 1, ptr @foo, align 81526  ret void1527}1528 1529define void @atomic8_or_release(ptr %a) {1530; O0-LABEL: atomic8_or_release:1531; O0:       # %bb.0: # %entry1532; O0-NEXT:    movq foo(%rip), %rax1533; O0-NEXT:  .Lpcsection40:1534; O0-NEXT:    lock orb $42, (%rdi)1535; O0-NEXT:    movq $1, foo1536; O0-NEXT:    retq1537;1538; O1-LABEL: atomic8_or_release:1539; O1:       # %bb.0: # %entry1540; O1-NEXT:    movq foo(%rip), %rax1541; O1-NEXT:  .Lpcsection36:1542; O1-NEXT:    lock orb $42, (%rdi)1543; O1-NEXT:    movq $1, foo(%rip)1544; O1-NEXT:    retq1545;1546; O2-LABEL: atomic8_or_release:1547; O2:       # %bb.0: # %entry1548; O2-NEXT:    movq foo(%rip), %rax1549; O2-NEXT:  .Lpcsection36:1550; O2-NEXT:    lock orb $42, (%rdi)1551; O2-NEXT:    movq $1, foo(%rip)1552; O2-NEXT:    retq1553;1554; O3-LABEL: atomic8_or_release:1555; O3:       # %bb.0: # %entry1556; O3-NEXT:    movq foo(%rip), %rax1557; O3-NEXT:  .Lpcsection36:1558; O3-NEXT:    lock orb $42, (%rdi)1559; O3-NEXT:    movq $1, foo(%rip)1560; O3-NEXT:    retq1561;1562; HASWELL-O3-LABEL: atomic8_or_release:1563; HASWELL-O3:       # %bb.0: # %entry1564; HASWELL-O3-NEXT:    movq foo(%rip), %rax1565; HASWELL-O3-NEXT:  .Lpcsection36:1566; HASWELL-O3-NEXT:    lock orb $42, (%rdi)1567; HASWELL-O3-NEXT:    movq $1, foo(%rip)1568; HASWELL-O3-NEXT:    retq1569entry:1570  load volatile i64, ptr @foo, align 81571  %x = atomicrmw or ptr %a, i8 42 release, align 1, !pcsections !01572  store volatile i64 1, ptr @foo, align 81573  ret void1574}1575 1576define void @atomic8_xor_release(ptr %a) {1577; O0-LABEL: atomic8_xor_release:1578; O0:       # %bb.0: # %entry1579; O0-NEXT:    movq foo(%rip), %rax1580; O0-NEXT:  .Lpcsection41:1581; O0-NEXT:    lock xorb $42, (%rdi)1582; O0-NEXT:    movq $1, foo1583; O0-NEXT:    retq1584;1585; O1-LABEL: atomic8_xor_release:1586; O1:       # %bb.0: # %entry1587; O1-NEXT:    movq foo(%rip), %rax1588; O1-NEXT:  .Lpcsection37:1589; O1-NEXT:    lock xorb $42, (%rdi)1590; O1-NEXT:    movq $1, foo(%rip)1591; O1-NEXT:    retq1592;1593; O2-LABEL: atomic8_xor_release:1594; O2:       # %bb.0: # %entry1595; O2-NEXT:    movq foo(%rip), %rax1596; O2-NEXT:  .Lpcsection37:1597; O2-NEXT:    lock xorb $42, (%rdi)1598; O2-NEXT:    movq $1, foo(%rip)1599; O2-NEXT:    retq1600;1601; O3-LABEL: atomic8_xor_release:1602; O3:       # %bb.0: # %entry1603; O3-NEXT:    movq foo(%rip), %rax1604; O3-NEXT:  .Lpcsection37:1605; O3-NEXT:    lock xorb $42, (%rdi)1606; O3-NEXT:    movq $1, foo(%rip)1607; O3-NEXT:    retq1608;1609; HASWELL-O3-LABEL: atomic8_xor_release:1610; HASWELL-O3:       # %bb.0: # %entry1611; HASWELL-O3-NEXT:    movq foo(%rip), %rax1612; HASWELL-O3-NEXT:  .Lpcsection37:1613; HASWELL-O3-NEXT:    lock xorb $42, (%rdi)1614; HASWELL-O3-NEXT:    movq $1, foo(%rip)1615; HASWELL-O3-NEXT:    retq1616entry:1617  load volatile i64, ptr @foo, align 81618  %x = atomicrmw xor ptr %a, i8 42 release, align 1, !pcsections !01619  store volatile i64 1, ptr @foo, align 81620  ret void1621}1622 1623define void @atomic8_nand_release(ptr %a) {1624; O0-LABEL: atomic8_nand_release:1625; O0:       # %bb.0: # %entry1626; O0-NEXT:    movq %rdi, {{[-0-9]+}}(%r{{[sb]}}p) # 8-byte Spill1627; O0-NEXT:    movq foo, %rax1628; O0-NEXT:  .Lpcsection42:1629; O0-NEXT:    movb (%rdi), %al1630; O0-NEXT:    movb %al, {{[-0-9]+}}(%r{{[sb]}}p) # 1-byte Spill1631; O0-NEXT:  .LBB30_1: # %atomicrmw.start1632; O0-NEXT:    # =>This Inner Loop Header: Depth=11633; O0-NEXT:    movb {{[-0-9]+}}(%r{{[sb]}}p), %al # 1-byte Reload1634; O0-NEXT:    movq {{[-0-9]+}}(%r{{[sb]}}p), %rcx # 8-byte Reload1635; O0-NEXT:    movb %al, %dl1636; O0-NEXT:  .Lpcsection43:1637; O0-NEXT:    notb %dl1638; O0-NEXT:  .Lpcsection44:1639; O0-NEXT:    orb $-43, %dl1640; O0-NEXT:  .Lpcsection45:1641; O0-NEXT:    lock cmpxchgb %dl, (%rcx)1642; O0-NEXT:  .Lpcsection46:1643; O0-NEXT:    sete %cl1644; O0-NEXT:  .Lpcsection47:1645; O0-NEXT:    testb $1, %cl1646; O0-NEXT:    movb %al, {{[-0-9]+}}(%r{{[sb]}}p) # 1-byte Spill1647; O0-NEXT:  .Lpcsection48:1648; O0-NEXT:    jne .LBB30_21649; O0-NEXT:    jmp .LBB30_11650; O0-NEXT:  .LBB30_2: # %atomicrmw.end1651; O0-NEXT:    movq $1, foo1652; O0-NEXT:    retq1653;1654; O1-LABEL: atomic8_nand_release:1655; O1:       # %bb.0: # %entry1656; O1-NEXT:    movq foo(%rip), %rax1657; O1-NEXT:  .Lpcsection38:1658; O1-NEXT:    movzbl (%rdi), %eax1659; O1-NEXT:    .p2align 41660; O1-NEXT:  .LBB30_1: # %atomicrmw.start1661; O1-NEXT:    # =>This Inner Loop Header: Depth=11662; O1-NEXT:    movl %eax, %ecx1663; O1-NEXT:  .Lpcsection39:1664; O1-NEXT:    notb %cl1665; O1-NEXT:  .Lpcsection40:1666; O1-NEXT:    orb $-43, %cl1667; O1-NEXT:  .Lpcsection41:1668; O1-NEXT:    lock cmpxchgb %cl, (%rdi)1669; O1-NEXT:  .Lpcsection42:1670; O1-NEXT:    jne .LBB30_11671; O1-NEXT:  # %bb.2: # %atomicrmw.end1672; O1-NEXT:    movq $1, foo(%rip)1673; O1-NEXT:    retq1674;1675; O2-LABEL: atomic8_nand_release:1676; O2:       # %bb.0: # %entry1677; O2-NEXT:    movq foo(%rip), %rax1678; O2-NEXT:  .Lpcsection38:1679; O2-NEXT:    movzbl (%rdi), %eax1680; O2-NEXT:    .p2align 41681; O2-NEXT:  .LBB30_1: # %atomicrmw.start1682; O2-NEXT:    # =>This Inner Loop Header: Depth=11683; O2-NEXT:    movl %eax, %ecx1684; O2-NEXT:  .Lpcsection39:1685; O2-NEXT:    notb %cl1686; O2-NEXT:  .Lpcsection40:1687; O2-NEXT:    orb $-43, %cl1688; O2-NEXT:  .Lpcsection41:1689; O2-NEXT:    lock cmpxchgb %cl, (%rdi)1690; O2-NEXT:  .Lpcsection42:1691; O2-NEXT:    jne .LBB30_11692; O2-NEXT:  # %bb.2: # %atomicrmw.end1693; O2-NEXT:    movq $1, foo(%rip)1694; O2-NEXT:    retq1695;1696; O3-LABEL: atomic8_nand_release:1697; O3:       # %bb.0: # %entry1698; O3-NEXT:    movq foo(%rip), %rax1699; O3-NEXT:  .Lpcsection38:1700; O3-NEXT:    movzbl (%rdi), %eax1701; O3-NEXT:    .p2align 41702; O3-NEXT:  .LBB30_1: # %atomicrmw.start1703; O3-NEXT:    # =>This Inner Loop Header: Depth=11704; O3-NEXT:    movl %eax, %ecx1705; O3-NEXT:  .Lpcsection39:1706; O3-NEXT:    notb %cl1707; O3-NEXT:  .Lpcsection40:1708; O3-NEXT:    orb $-43, %cl1709; O3-NEXT:  .Lpcsection41:1710; O3-NEXT:    lock cmpxchgb %cl, (%rdi)1711; O3-NEXT:  .Lpcsection42:1712; O3-NEXT:    jne .LBB30_11713; O3-NEXT:  # %bb.2: # %atomicrmw.end1714; O3-NEXT:    movq $1, foo(%rip)1715; O3-NEXT:    retq1716;1717; HASWELL-O3-LABEL: atomic8_nand_release:1718; HASWELL-O3:       # %bb.0: # %entry1719; HASWELL-O3-NEXT:    movq foo(%rip), %rax1720; HASWELL-O3-NEXT:  .Lpcsection38:1721; HASWELL-O3-NEXT:    movzbl (%rdi), %eax1722; HASWELL-O3-NEXT:    .p2align 41723; HASWELL-O3-NEXT:  .LBB30_1: # %atomicrmw.start1724; HASWELL-O3-NEXT:    # =>This Inner Loop Header: Depth=11725; HASWELL-O3-NEXT:    movl %eax, %ecx1726; HASWELL-O3-NEXT:  .Lpcsection39:1727; HASWELL-O3-NEXT:    notb %cl1728; HASWELL-O3-NEXT:  .Lpcsection40:1729; HASWELL-O3-NEXT:    orb $-43, %cl1730; HASWELL-O3-NEXT:  .Lpcsection41:1731; HASWELL-O3-NEXT:    lock cmpxchgb %cl, (%rdi)1732; HASWELL-O3-NEXT:  .Lpcsection42:1733; HASWELL-O3-NEXT:    jne .LBB30_11734; HASWELL-O3-NEXT:  # %bb.2: # %atomicrmw.end1735; HASWELL-O3-NEXT:    movq $1, foo(%rip)1736; HASWELL-O3-NEXT:    retq1737entry:1738  load volatile i64, ptr @foo, align 81739  %x = atomicrmw nand ptr %a, i8 42 release, align 1, !pcsections !01740  store volatile i64 1, ptr @foo, align 81741  ret void1742}1743 1744define void @atomic8_xchg_acq_rel(ptr %a) {1745; O0-LABEL: atomic8_xchg_acq_rel:1746; O0:       # %bb.0: # %entry1747; O0-NEXT:    movq foo(%rip), %rax1748; O0-NEXT:    movb $42, %al1749; O0-NEXT:  .Lpcsection49:1750; O0-NEXT:    xchgb %al, (%rdi)1751; O0-NEXT:    movq $1, foo1752; O0-NEXT:    retq1753;1754; O1-LABEL: atomic8_xchg_acq_rel:1755; O1:       # %bb.0: # %entry1756; O1-NEXT:    movq foo(%rip), %rax1757; O1-NEXT:    movb $42, %al1758; O1-NEXT:  .Lpcsection43:1759; O1-NEXT:    xchgb %al, (%rdi)1760; O1-NEXT:    movq $1, foo(%rip)1761; O1-NEXT:    retq1762;1763; O2-LABEL: atomic8_xchg_acq_rel:1764; O2:       # %bb.0: # %entry1765; O2-NEXT:    movq foo(%rip), %rax1766; O2-NEXT:    movb $42, %al1767; O2-NEXT:  .Lpcsection43:1768; O2-NEXT:    xchgb %al, (%rdi)1769; O2-NEXT:    movq $1, foo(%rip)1770; O2-NEXT:    retq1771;1772; O3-LABEL: atomic8_xchg_acq_rel:1773; O3:       # %bb.0: # %entry1774; O3-NEXT:    movq foo(%rip), %rax1775; O3-NEXT:    movb $42, %al1776; O3-NEXT:  .Lpcsection43:1777; O3-NEXT:    xchgb %al, (%rdi)1778; O3-NEXT:    movq $1, foo(%rip)1779; O3-NEXT:    retq1780;1781; HASWELL-O3-LABEL: atomic8_xchg_acq_rel:1782; HASWELL-O3:       # %bb.0: # %entry1783; HASWELL-O3-NEXT:    movq foo(%rip), %rax1784; HASWELL-O3-NEXT:    movb $42, %al1785; HASWELL-O3-NEXT:  .Lpcsection43:1786; HASWELL-O3-NEXT:    xchgb %al, (%rdi)1787; HASWELL-O3-NEXT:    movq $1, foo(%rip)1788; HASWELL-O3-NEXT:    retq1789entry:1790  load volatile i64, ptr @foo, align 81791  %x = atomicrmw xchg ptr %a, i8 42 acq_rel, align 1, !pcsections !01792  store volatile i64 1, ptr @foo, align 81793  ret void1794}1795 1796define void @atomic8_add_acq_rel(ptr %a) {1797; O0-LABEL: atomic8_add_acq_rel:1798; O0:       # %bb.0: # %entry1799; O0-NEXT:    movq foo(%rip), %rax1800; O0-NEXT:  .Lpcsection50:1801; O0-NEXT:    lock addb $42, (%rdi)1802; O0-NEXT:    movq $1, foo1803; O0-NEXT:    retq1804;1805; O1-LABEL: atomic8_add_acq_rel:1806; O1:       # %bb.0: # %entry1807; O1-NEXT:    movq foo(%rip), %rax1808; O1-NEXT:  .Lpcsection44:1809; O1-NEXT:    lock addb $42, (%rdi)1810; O1-NEXT:    movq $1, foo(%rip)1811; O1-NEXT:    retq1812;1813; O2-LABEL: atomic8_add_acq_rel:1814; O2:       # %bb.0: # %entry1815; O2-NEXT:    movq foo(%rip), %rax1816; O2-NEXT:  .Lpcsection44:1817; O2-NEXT:    lock addb $42, (%rdi)1818; O2-NEXT:    movq $1, foo(%rip)1819; O2-NEXT:    retq1820;1821; O3-LABEL: atomic8_add_acq_rel:1822; O3:       # %bb.0: # %entry1823; O3-NEXT:    movq foo(%rip), %rax1824; O3-NEXT:  .Lpcsection44:1825; O3-NEXT:    lock addb $42, (%rdi)1826; O3-NEXT:    movq $1, foo(%rip)1827; O3-NEXT:    retq1828;1829; HASWELL-O3-LABEL: atomic8_add_acq_rel:1830; HASWELL-O3:       # %bb.0: # %entry1831; HASWELL-O3-NEXT:    movq foo(%rip), %rax1832; HASWELL-O3-NEXT:  .Lpcsection44:1833; HASWELL-O3-NEXT:    lock addb $42, (%rdi)1834; HASWELL-O3-NEXT:    movq $1, foo(%rip)1835; HASWELL-O3-NEXT:    retq1836entry:1837  load volatile i64, ptr @foo, align 81838  %x = atomicrmw add ptr %a, i8 42 acq_rel, align 1, !pcsections !01839  store volatile i64 1, ptr @foo, align 81840  ret void1841}1842 1843define void @atomic8_sub_acq_rel(ptr %a) {1844; O0-LABEL: atomic8_sub_acq_rel:1845; O0:       # %bb.0: # %entry1846; O0-NEXT:    movq foo(%rip), %rax1847; O0-NEXT:  .Lpcsection51:1848; O0-NEXT:    lock subb $42, (%rdi)1849; O0-NEXT:    movq $1, foo1850; O0-NEXT:    retq1851;1852; O1-LABEL: atomic8_sub_acq_rel:1853; O1:       # %bb.0: # %entry1854; O1-NEXT:    movq foo(%rip), %rax1855; O1-NEXT:  .Lpcsection45:1856; O1-NEXT:    lock subb $42, (%rdi)1857; O1-NEXT:    movq $1, foo(%rip)1858; O1-NEXT:    retq1859;1860; O2-LABEL: atomic8_sub_acq_rel:1861; O2:       # %bb.0: # %entry1862; O2-NEXT:    movq foo(%rip), %rax1863; O2-NEXT:  .Lpcsection45:1864; O2-NEXT:    lock subb $42, (%rdi)1865; O2-NEXT:    movq $1, foo(%rip)1866; O2-NEXT:    retq1867;1868; O3-LABEL: atomic8_sub_acq_rel:1869; O3:       # %bb.0: # %entry1870; O3-NEXT:    movq foo(%rip), %rax1871; O3-NEXT:  .Lpcsection45:1872; O3-NEXT:    lock subb $42, (%rdi)1873; O3-NEXT:    movq $1, foo(%rip)1874; O3-NEXT:    retq1875;1876; HASWELL-O3-LABEL: atomic8_sub_acq_rel:1877; HASWELL-O3:       # %bb.0: # %entry1878; HASWELL-O3-NEXT:    movq foo(%rip), %rax1879; HASWELL-O3-NEXT:  .Lpcsection45:1880; HASWELL-O3-NEXT:    lock subb $42, (%rdi)1881; HASWELL-O3-NEXT:    movq $1, foo(%rip)1882; HASWELL-O3-NEXT:    retq1883entry:1884  load volatile i64, ptr @foo, align 81885  %x = atomicrmw sub ptr %a, i8 42 acq_rel, align 1, !pcsections !01886  store volatile i64 1, ptr @foo, align 81887  ret void1888}1889 1890define void @atomic8_and_acq_rel(ptr %a) {1891; O0-LABEL: atomic8_and_acq_rel:1892; O0:       # %bb.0: # %entry1893; O0-NEXT:    movq foo(%rip), %rax1894; O0-NEXT:  .Lpcsection52:1895; O0-NEXT:    lock andb $42, (%rdi)1896; O0-NEXT:    movq $1, foo1897; O0-NEXT:    retq1898;1899; O1-LABEL: atomic8_and_acq_rel:1900; O1:       # %bb.0: # %entry1901; O1-NEXT:    movq foo(%rip), %rax1902; O1-NEXT:  .Lpcsection46:1903; O1-NEXT:    lock andb $42, (%rdi)1904; O1-NEXT:    movq $1, foo(%rip)1905; O1-NEXT:    retq1906;1907; O2-LABEL: atomic8_and_acq_rel:1908; O2:       # %bb.0: # %entry1909; O2-NEXT:    movq foo(%rip), %rax1910; O2-NEXT:  .Lpcsection46:1911; O2-NEXT:    lock andb $42, (%rdi)1912; O2-NEXT:    movq $1, foo(%rip)1913; O2-NEXT:    retq1914;1915; O3-LABEL: atomic8_and_acq_rel:1916; O3:       # %bb.0: # %entry1917; O3-NEXT:    movq foo(%rip), %rax1918; O3-NEXT:  .Lpcsection46:1919; O3-NEXT:    lock andb $42, (%rdi)1920; O3-NEXT:    movq $1, foo(%rip)1921; O3-NEXT:    retq1922;1923; HASWELL-O3-LABEL: atomic8_and_acq_rel:1924; HASWELL-O3:       # %bb.0: # %entry1925; HASWELL-O3-NEXT:    movq foo(%rip), %rax1926; HASWELL-O3-NEXT:  .Lpcsection46:1927; HASWELL-O3-NEXT:    lock andb $42, (%rdi)1928; HASWELL-O3-NEXT:    movq $1, foo(%rip)1929; HASWELL-O3-NEXT:    retq1930entry:1931  load volatile i64, ptr @foo, align 81932  %x = atomicrmw and ptr %a, i8 42 acq_rel, align 1, !pcsections !01933  store volatile i64 1, ptr @foo, align 81934  ret void1935}1936 1937define void @atomic8_or_acq_rel(ptr %a) {1938; O0-LABEL: atomic8_or_acq_rel:1939; O0:       # %bb.0: # %entry1940; O0-NEXT:    movq foo(%rip), %rax1941; O0-NEXT:  .Lpcsection53:1942; O0-NEXT:    lock orb $42, (%rdi)1943; O0-NEXT:    movq $1, foo1944; O0-NEXT:    retq1945;1946; O1-LABEL: atomic8_or_acq_rel:1947; O1:       # %bb.0: # %entry1948; O1-NEXT:    movq foo(%rip), %rax1949; O1-NEXT:  .Lpcsection47:1950; O1-NEXT:    lock orb $42, (%rdi)1951; O1-NEXT:    movq $1, foo(%rip)1952; O1-NEXT:    retq1953;1954; O2-LABEL: atomic8_or_acq_rel:1955; O2:       # %bb.0: # %entry1956; O2-NEXT:    movq foo(%rip), %rax1957; O2-NEXT:  .Lpcsection47:1958; O2-NEXT:    lock orb $42, (%rdi)1959; O2-NEXT:    movq $1, foo(%rip)1960; O2-NEXT:    retq1961;1962; O3-LABEL: atomic8_or_acq_rel:1963; O3:       # %bb.0: # %entry1964; O3-NEXT:    movq foo(%rip), %rax1965; O3-NEXT:  .Lpcsection47:1966; O3-NEXT:    lock orb $42, (%rdi)1967; O3-NEXT:    movq $1, foo(%rip)1968; O3-NEXT:    retq1969;1970; HASWELL-O3-LABEL: atomic8_or_acq_rel:1971; HASWELL-O3:       # %bb.0: # %entry1972; HASWELL-O3-NEXT:    movq foo(%rip), %rax1973; HASWELL-O3-NEXT:  .Lpcsection47:1974; HASWELL-O3-NEXT:    lock orb $42, (%rdi)1975; HASWELL-O3-NEXT:    movq $1, foo(%rip)1976; HASWELL-O3-NEXT:    retq1977entry:1978  load volatile i64, ptr @foo, align 81979  %x = atomicrmw or ptr %a, i8 42 acq_rel, align 1, !pcsections !01980  store volatile i64 1, ptr @foo, align 81981  ret void1982}1983 1984define void @atomic8_xor_acq_rel(ptr %a) {1985; O0-LABEL: atomic8_xor_acq_rel:1986; O0:       # %bb.0: # %entry1987; O0-NEXT:    movq foo(%rip), %rax1988; O0-NEXT:  .Lpcsection54:1989; O0-NEXT:    lock xorb $42, (%rdi)1990; O0-NEXT:    movq $1, foo1991; O0-NEXT:    retq1992;1993; O1-LABEL: atomic8_xor_acq_rel:1994; O1:       # %bb.0: # %entry1995; O1-NEXT:    movq foo(%rip), %rax1996; O1-NEXT:  .Lpcsection48:1997; O1-NEXT:    lock xorb $42, (%rdi)1998; O1-NEXT:    movq $1, foo(%rip)1999; O1-NEXT:    retq2000;2001; O2-LABEL: atomic8_xor_acq_rel:2002; O2:       # %bb.0: # %entry2003; O2-NEXT:    movq foo(%rip), %rax2004; O2-NEXT:  .Lpcsection48:2005; O2-NEXT:    lock xorb $42, (%rdi)2006; O2-NEXT:    movq $1, foo(%rip)2007; O2-NEXT:    retq2008;2009; O3-LABEL: atomic8_xor_acq_rel:2010; O3:       # %bb.0: # %entry2011; O3-NEXT:    movq foo(%rip), %rax2012; O3-NEXT:  .Lpcsection48:2013; O3-NEXT:    lock xorb $42, (%rdi)2014; O3-NEXT:    movq $1, foo(%rip)2015; O3-NEXT:    retq2016;2017; HASWELL-O3-LABEL: atomic8_xor_acq_rel:2018; HASWELL-O3:       # %bb.0: # %entry2019; HASWELL-O3-NEXT:    movq foo(%rip), %rax2020; HASWELL-O3-NEXT:  .Lpcsection48:2021; HASWELL-O3-NEXT:    lock xorb $42, (%rdi)2022; HASWELL-O3-NEXT:    movq $1, foo(%rip)2023; HASWELL-O3-NEXT:    retq2024entry:2025  load volatile i64, ptr @foo, align 82026  %x = atomicrmw xor ptr %a, i8 42 acq_rel, align 1, !pcsections !02027  store volatile i64 1, ptr @foo, align 82028  ret void2029}2030 2031define void @atomic8_nand_acq_rel(ptr %a) {2032; O0-LABEL: atomic8_nand_acq_rel:2033; O0:       # %bb.0: # %entry2034; O0-NEXT:    movq %rdi, {{[-0-9]+}}(%r{{[sb]}}p) # 8-byte Spill2035; O0-NEXT:    movq foo, %rax2036; O0-NEXT:  .Lpcsection55:2037; O0-NEXT:    movb (%rdi), %al2038; O0-NEXT:    movb %al, {{[-0-9]+}}(%r{{[sb]}}p) # 1-byte Spill2039; O0-NEXT:  .LBB37_1: # %atomicrmw.start2040; O0-NEXT:    # =>This Inner Loop Header: Depth=12041; O0-NEXT:    movb {{[-0-9]+}}(%r{{[sb]}}p), %al # 1-byte Reload2042; O0-NEXT:    movq {{[-0-9]+}}(%r{{[sb]}}p), %rcx # 8-byte Reload2043; O0-NEXT:    movb %al, %dl2044; O0-NEXT:  .Lpcsection56:2045; O0-NEXT:    notb %dl2046; O0-NEXT:  .Lpcsection57:2047; O0-NEXT:    orb $-43, %dl2048; O0-NEXT:  .Lpcsection58:2049; O0-NEXT:    lock cmpxchgb %dl, (%rcx)2050; O0-NEXT:  .Lpcsection59:2051; O0-NEXT:    sete %cl2052; O0-NEXT:  .Lpcsection60:2053; O0-NEXT:    testb $1, %cl2054; O0-NEXT:    movb %al, {{[-0-9]+}}(%r{{[sb]}}p) # 1-byte Spill2055; O0-NEXT:  .Lpcsection61:2056; O0-NEXT:    jne .LBB37_22057; O0-NEXT:    jmp .LBB37_12058; O0-NEXT:  .LBB37_2: # %atomicrmw.end2059; O0-NEXT:    movq $1, foo2060; O0-NEXT:    retq2061;2062; O1-LABEL: atomic8_nand_acq_rel:2063; O1:       # %bb.0: # %entry2064; O1-NEXT:    movq foo(%rip), %rax2065; O1-NEXT:  .Lpcsection49:2066; O1-NEXT:    movzbl (%rdi), %eax2067; O1-NEXT:    .p2align 42068; O1-NEXT:  .LBB37_1: # %atomicrmw.start2069; O1-NEXT:    # =>This Inner Loop Header: Depth=12070; O1-NEXT:    movl %eax, %ecx2071; O1-NEXT:  .Lpcsection50:2072; O1-NEXT:    notb %cl2073; O1-NEXT:  .Lpcsection51:2074; O1-NEXT:    orb $-43, %cl2075; O1-NEXT:  .Lpcsection52:2076; O1-NEXT:    lock cmpxchgb %cl, (%rdi)2077; O1-NEXT:  .Lpcsection53:2078; O1-NEXT:    jne .LBB37_12079; O1-NEXT:  # %bb.2: # %atomicrmw.end2080; O1-NEXT:    movq $1, foo(%rip)2081; O1-NEXT:    retq2082;2083; O2-LABEL: atomic8_nand_acq_rel:2084; O2:       # %bb.0: # %entry2085; O2-NEXT:    movq foo(%rip), %rax2086; O2-NEXT:  .Lpcsection49:2087; O2-NEXT:    movzbl (%rdi), %eax2088; O2-NEXT:    .p2align 42089; O2-NEXT:  .LBB37_1: # %atomicrmw.start2090; O2-NEXT:    # =>This Inner Loop Header: Depth=12091; O2-NEXT:    movl %eax, %ecx2092; O2-NEXT:  .Lpcsection50:2093; O2-NEXT:    notb %cl2094; O2-NEXT:  .Lpcsection51:2095; O2-NEXT:    orb $-43, %cl2096; O2-NEXT:  .Lpcsection52:2097; O2-NEXT:    lock cmpxchgb %cl, (%rdi)2098; O2-NEXT:  .Lpcsection53:2099; O2-NEXT:    jne .LBB37_12100; O2-NEXT:  # %bb.2: # %atomicrmw.end2101; O2-NEXT:    movq $1, foo(%rip)2102; O2-NEXT:    retq2103;2104; O3-LABEL: atomic8_nand_acq_rel:2105; O3:       # %bb.0: # %entry2106; O3-NEXT:    movq foo(%rip), %rax2107; O3-NEXT:  .Lpcsection49:2108; O3-NEXT:    movzbl (%rdi), %eax2109; O3-NEXT:    .p2align 42110; O3-NEXT:  .LBB37_1: # %atomicrmw.start2111; O3-NEXT:    # =>This Inner Loop Header: Depth=12112; O3-NEXT:    movl %eax, %ecx2113; O3-NEXT:  .Lpcsection50:2114; O3-NEXT:    notb %cl2115; O3-NEXT:  .Lpcsection51:2116; O3-NEXT:    orb $-43, %cl2117; O3-NEXT:  .Lpcsection52:2118; O3-NEXT:    lock cmpxchgb %cl, (%rdi)2119; O3-NEXT:  .Lpcsection53:2120; O3-NEXT:    jne .LBB37_12121; O3-NEXT:  # %bb.2: # %atomicrmw.end2122; O3-NEXT:    movq $1, foo(%rip)2123; O3-NEXT:    retq2124;2125; HASWELL-O3-LABEL: atomic8_nand_acq_rel:2126; HASWELL-O3:       # %bb.0: # %entry2127; HASWELL-O3-NEXT:    movq foo(%rip), %rax2128; HASWELL-O3-NEXT:  .Lpcsection49:2129; HASWELL-O3-NEXT:    movzbl (%rdi), %eax2130; HASWELL-O3-NEXT:    .p2align 42131; HASWELL-O3-NEXT:  .LBB37_1: # %atomicrmw.start2132; HASWELL-O3-NEXT:    # =>This Inner Loop Header: Depth=12133; HASWELL-O3-NEXT:    movl %eax, %ecx2134; HASWELL-O3-NEXT:  .Lpcsection50:2135; HASWELL-O3-NEXT:    notb %cl2136; HASWELL-O3-NEXT:  .Lpcsection51:2137; HASWELL-O3-NEXT:    orb $-43, %cl2138; HASWELL-O3-NEXT:  .Lpcsection52:2139; HASWELL-O3-NEXT:    lock cmpxchgb %cl, (%rdi)2140; HASWELL-O3-NEXT:  .Lpcsection53:2141; HASWELL-O3-NEXT:    jne .LBB37_12142; HASWELL-O3-NEXT:  # %bb.2: # %atomicrmw.end2143; HASWELL-O3-NEXT:    movq $1, foo(%rip)2144; HASWELL-O3-NEXT:    retq2145entry:2146  load volatile i64, ptr @foo, align 82147  %x = atomicrmw nand ptr %a, i8 42 acq_rel, align 1, !pcsections !02148  store volatile i64 1, ptr @foo, align 82149  ret void2150}2151 2152define void @atomic8_xchg_seq_cst(ptr %a) {2153; O0-LABEL: atomic8_xchg_seq_cst:2154; O0:       # %bb.0: # %entry2155; O0-NEXT:    movq foo(%rip), %rax2156; O0-NEXT:    movb $42, %al2157; O0-NEXT:  .Lpcsection62:2158; O0-NEXT:    xchgb %al, (%rdi)2159; O0-NEXT:    movq $1, foo2160; O0-NEXT:    retq2161;2162; O1-LABEL: atomic8_xchg_seq_cst:2163; O1:       # %bb.0: # %entry2164; O1-NEXT:    movq foo(%rip), %rax2165; O1-NEXT:    movb $42, %al2166; O1-NEXT:  .Lpcsection54:2167; O1-NEXT:    xchgb %al, (%rdi)2168; O1-NEXT:    movq $1, foo(%rip)2169; O1-NEXT:    retq2170;2171; O2-LABEL: atomic8_xchg_seq_cst:2172; O2:       # %bb.0: # %entry2173; O2-NEXT:    movq foo(%rip), %rax2174; O2-NEXT:    movb $42, %al2175; O2-NEXT:  .Lpcsection54:2176; O2-NEXT:    xchgb %al, (%rdi)2177; O2-NEXT:    movq $1, foo(%rip)2178; O2-NEXT:    retq2179;2180; O3-LABEL: atomic8_xchg_seq_cst:2181; O3:       # %bb.0: # %entry2182; O3-NEXT:    movq foo(%rip), %rax2183; O3-NEXT:    movb $42, %al2184; O3-NEXT:  .Lpcsection54:2185; O3-NEXT:    xchgb %al, (%rdi)2186; O3-NEXT:    movq $1, foo(%rip)2187; O3-NEXT:    retq2188;2189; HASWELL-O3-LABEL: atomic8_xchg_seq_cst:2190; HASWELL-O3:       # %bb.0: # %entry2191; HASWELL-O3-NEXT:    movq foo(%rip), %rax2192; HASWELL-O3-NEXT:    movb $42, %al2193; HASWELL-O3-NEXT:  .Lpcsection54:2194; HASWELL-O3-NEXT:    xchgb %al, (%rdi)2195; HASWELL-O3-NEXT:    movq $1, foo(%rip)2196; HASWELL-O3-NEXT:    retq2197entry:2198  load volatile i64, ptr @foo, align 82199  %x = atomicrmw xchg ptr %a, i8 42 seq_cst, align 1, !pcsections !02200  store volatile i64 1, ptr @foo, align 82201  ret void2202}2203 2204define void @atomic8_add_seq_cst(ptr %a) {2205; O0-LABEL: atomic8_add_seq_cst:2206; O0:       # %bb.0: # %entry2207; O0-NEXT:    movq foo(%rip), %rax2208; O0-NEXT:  .Lpcsection63:2209; O0-NEXT:    lock addb $42, (%rdi)2210; O0-NEXT:    movq $1, foo2211; O0-NEXT:    retq2212;2213; O1-LABEL: atomic8_add_seq_cst:2214; O1:       # %bb.0: # %entry2215; O1-NEXT:    movq foo(%rip), %rax2216; O1-NEXT:  .Lpcsection55:2217; O1-NEXT:    lock addb $42, (%rdi)2218; O1-NEXT:    movq $1, foo(%rip)2219; O1-NEXT:    retq2220;2221; O2-LABEL: atomic8_add_seq_cst:2222; O2:       # %bb.0: # %entry2223; O2-NEXT:    movq foo(%rip), %rax2224; O2-NEXT:  .Lpcsection55:2225; O2-NEXT:    lock addb $42, (%rdi)2226; O2-NEXT:    movq $1, foo(%rip)2227; O2-NEXT:    retq2228;2229; O3-LABEL: atomic8_add_seq_cst:2230; O3:       # %bb.0: # %entry2231; O3-NEXT:    movq foo(%rip), %rax2232; O3-NEXT:  .Lpcsection55:2233; O3-NEXT:    lock addb $42, (%rdi)2234; O3-NEXT:    movq $1, foo(%rip)2235; O3-NEXT:    retq2236;2237; HASWELL-O3-LABEL: atomic8_add_seq_cst:2238; HASWELL-O3:       # %bb.0: # %entry2239; HASWELL-O3-NEXT:    movq foo(%rip), %rax2240; HASWELL-O3-NEXT:  .Lpcsection55:2241; HASWELL-O3-NEXT:    lock addb $42, (%rdi)2242; HASWELL-O3-NEXT:    movq $1, foo(%rip)2243; HASWELL-O3-NEXT:    retq2244entry:2245  load volatile i64, ptr @foo, align 82246  %x = atomicrmw add ptr %a, i8 42 seq_cst, align 1, !pcsections !02247  store volatile i64 1, ptr @foo, align 82248  ret void2249}2250 2251define void @atomic8_sub_seq_cst(ptr %a) {2252; O0-LABEL: atomic8_sub_seq_cst:2253; O0:       # %bb.0: # %entry2254; O0-NEXT:    movq foo(%rip), %rax2255; O0-NEXT:  .Lpcsection64:2256; O0-NEXT:    lock subb $42, (%rdi)2257; O0-NEXT:    movq $1, foo2258; O0-NEXT:    retq2259;2260; O1-LABEL: atomic8_sub_seq_cst:2261; O1:       # %bb.0: # %entry2262; O1-NEXT:    movq foo(%rip), %rax2263; O1-NEXT:  .Lpcsection56:2264; O1-NEXT:    lock subb $42, (%rdi)2265; O1-NEXT:    movq $1, foo(%rip)2266; O1-NEXT:    retq2267;2268; O2-LABEL: atomic8_sub_seq_cst:2269; O2:       # %bb.0: # %entry2270; O2-NEXT:    movq foo(%rip), %rax2271; O2-NEXT:  .Lpcsection56:2272; O2-NEXT:    lock subb $42, (%rdi)2273; O2-NEXT:    movq $1, foo(%rip)2274; O2-NEXT:    retq2275;2276; O3-LABEL: atomic8_sub_seq_cst:2277; O3:       # %bb.0: # %entry2278; O3-NEXT:    movq foo(%rip), %rax2279; O3-NEXT:  .Lpcsection56:2280; O3-NEXT:    lock subb $42, (%rdi)2281; O3-NEXT:    movq $1, foo(%rip)2282; O3-NEXT:    retq2283;2284; HASWELL-O3-LABEL: atomic8_sub_seq_cst:2285; HASWELL-O3:       # %bb.0: # %entry2286; HASWELL-O3-NEXT:    movq foo(%rip), %rax2287; HASWELL-O3-NEXT:  .Lpcsection56:2288; HASWELL-O3-NEXT:    lock subb $42, (%rdi)2289; HASWELL-O3-NEXT:    movq $1, foo(%rip)2290; HASWELL-O3-NEXT:    retq2291entry:2292  load volatile i64, ptr @foo, align 82293  %x = atomicrmw sub ptr %a, i8 42 seq_cst, align 1, !pcsections !02294  store volatile i64 1, ptr @foo, align 82295  ret void2296}2297 2298define void @atomic8_and_seq_cst(ptr %a) {2299; O0-LABEL: atomic8_and_seq_cst:2300; O0:       # %bb.0: # %entry2301; O0-NEXT:    movq foo(%rip), %rax2302; O0-NEXT:  .Lpcsection65:2303; O0-NEXT:    lock andb $42, (%rdi)2304; O0-NEXT:    movq $1, foo2305; O0-NEXT:    retq2306;2307; O1-LABEL: atomic8_and_seq_cst:2308; O1:       # %bb.0: # %entry2309; O1-NEXT:    movq foo(%rip), %rax2310; O1-NEXT:  .Lpcsection57:2311; O1-NEXT:    lock andb $42, (%rdi)2312; O1-NEXT:    movq $1, foo(%rip)2313; O1-NEXT:    retq2314;2315; O2-LABEL: atomic8_and_seq_cst:2316; O2:       # %bb.0: # %entry2317; O2-NEXT:    movq foo(%rip), %rax2318; O2-NEXT:  .Lpcsection57:2319; O2-NEXT:    lock andb $42, (%rdi)2320; O2-NEXT:    movq $1, foo(%rip)2321; O2-NEXT:    retq2322;2323; O3-LABEL: atomic8_and_seq_cst:2324; O3:       # %bb.0: # %entry2325; O3-NEXT:    movq foo(%rip), %rax2326; O3-NEXT:  .Lpcsection57:2327; O3-NEXT:    lock andb $42, (%rdi)2328; O3-NEXT:    movq $1, foo(%rip)2329; O3-NEXT:    retq2330;2331; HASWELL-O3-LABEL: atomic8_and_seq_cst:2332; HASWELL-O3:       # %bb.0: # %entry2333; HASWELL-O3-NEXT:    movq foo(%rip), %rax2334; HASWELL-O3-NEXT:  .Lpcsection57:2335; HASWELL-O3-NEXT:    lock andb $42, (%rdi)2336; HASWELL-O3-NEXT:    movq $1, foo(%rip)2337; HASWELL-O3-NEXT:    retq2338entry:2339  load volatile i64, ptr @foo, align 82340  %x = atomicrmw and ptr %a, i8 42 seq_cst, align 1, !pcsections !02341  store volatile i64 1, ptr @foo, align 82342  ret void2343}2344 2345define void @atomic8_or_seq_cst(ptr %a) {2346; O0-LABEL: atomic8_or_seq_cst:2347; O0:       # %bb.0: # %entry2348; O0-NEXT:    movq foo(%rip), %rax2349; O0-NEXT:  .Lpcsection66:2350; O0-NEXT:    lock orb $42, (%rdi)2351; O0-NEXT:    movq $1, foo2352; O0-NEXT:    retq2353;2354; O1-LABEL: atomic8_or_seq_cst:2355; O1:       # %bb.0: # %entry2356; O1-NEXT:    movq foo(%rip), %rax2357; O1-NEXT:  .Lpcsection58:2358; O1-NEXT:    lock orb $42, (%rdi)2359; O1-NEXT:    movq $1, foo(%rip)2360; O1-NEXT:    retq2361;2362; O2-LABEL: atomic8_or_seq_cst:2363; O2:       # %bb.0: # %entry2364; O2-NEXT:    movq foo(%rip), %rax2365; O2-NEXT:  .Lpcsection58:2366; O2-NEXT:    lock orb $42, (%rdi)2367; O2-NEXT:    movq $1, foo(%rip)2368; O2-NEXT:    retq2369;2370; O3-LABEL: atomic8_or_seq_cst:2371; O3:       # %bb.0: # %entry2372; O3-NEXT:    movq foo(%rip), %rax2373; O3-NEXT:  .Lpcsection58:2374; O3-NEXT:    lock orb $42, (%rdi)2375; O3-NEXT:    movq $1, foo(%rip)2376; O3-NEXT:    retq2377;2378; HASWELL-O3-LABEL: atomic8_or_seq_cst:2379; HASWELL-O3:       # %bb.0: # %entry2380; HASWELL-O3-NEXT:    movq foo(%rip), %rax2381; HASWELL-O3-NEXT:  .Lpcsection58:2382; HASWELL-O3-NEXT:    lock orb $42, (%rdi)2383; HASWELL-O3-NEXT:    movq $1, foo(%rip)2384; HASWELL-O3-NEXT:    retq2385entry:2386  load volatile i64, ptr @foo, align 82387  %x = atomicrmw or ptr %a, i8 42 seq_cst, align 1, !pcsections !02388  store volatile i64 1, ptr @foo, align 82389  ret void2390}2391 2392define void @atomic8_xor_seq_cst(ptr %a) {2393; O0-LABEL: atomic8_xor_seq_cst:2394; O0:       # %bb.0: # %entry2395; O0-NEXT:    movq foo(%rip), %rax2396; O0-NEXT:  .Lpcsection67:2397; O0-NEXT:    lock xorb $42, (%rdi)2398; O0-NEXT:    movq $1, foo2399; O0-NEXT:    retq2400;2401; O1-LABEL: atomic8_xor_seq_cst:2402; O1:       # %bb.0: # %entry2403; O1-NEXT:    movq foo(%rip), %rax2404; O1-NEXT:  .Lpcsection59:2405; O1-NEXT:    lock xorb $42, (%rdi)2406; O1-NEXT:    movq $1, foo(%rip)2407; O1-NEXT:    retq2408;2409; O2-LABEL: atomic8_xor_seq_cst:2410; O2:       # %bb.0: # %entry2411; O2-NEXT:    movq foo(%rip), %rax2412; O2-NEXT:  .Lpcsection59:2413; O2-NEXT:    lock xorb $42, (%rdi)2414; O2-NEXT:    movq $1, foo(%rip)2415; O2-NEXT:    retq2416;2417; O3-LABEL: atomic8_xor_seq_cst:2418; O3:       # %bb.0: # %entry2419; O3-NEXT:    movq foo(%rip), %rax2420; O3-NEXT:  .Lpcsection59:2421; O3-NEXT:    lock xorb $42, (%rdi)2422; O3-NEXT:    movq $1, foo(%rip)2423; O3-NEXT:    retq2424;2425; HASWELL-O3-LABEL: atomic8_xor_seq_cst:2426; HASWELL-O3:       # %bb.0: # %entry2427; HASWELL-O3-NEXT:    movq foo(%rip), %rax2428; HASWELL-O3-NEXT:  .Lpcsection59:2429; HASWELL-O3-NEXT:    lock xorb $42, (%rdi)2430; HASWELL-O3-NEXT:    movq $1, foo(%rip)2431; HASWELL-O3-NEXT:    retq2432entry:2433  load volatile i64, ptr @foo, align 82434  %x = atomicrmw xor ptr %a, i8 42 seq_cst, align 1, !pcsections !02435  store volatile i64 1, ptr @foo, align 82436  ret void2437}2438 2439define void @atomic8_nand_seq_cst(ptr %a) {2440; O0-LABEL: atomic8_nand_seq_cst:2441; O0:       # %bb.0: # %entry2442; O0-NEXT:    movq %rdi, {{[-0-9]+}}(%r{{[sb]}}p) # 8-byte Spill2443; O0-NEXT:    movq foo, %rax2444; O0-NEXT:  .Lpcsection68:2445; O0-NEXT:    movb (%rdi), %al2446; O0-NEXT:    movb %al, {{[-0-9]+}}(%r{{[sb]}}p) # 1-byte Spill2447; O0-NEXT:  .LBB44_1: # %atomicrmw.start2448; O0-NEXT:    # =>This Inner Loop Header: Depth=12449; O0-NEXT:    movb {{[-0-9]+}}(%r{{[sb]}}p), %al # 1-byte Reload2450; O0-NEXT:    movq {{[-0-9]+}}(%r{{[sb]}}p), %rcx # 8-byte Reload2451; O0-NEXT:    movb %al, %dl2452; O0-NEXT:  .Lpcsection69:2453; O0-NEXT:    notb %dl2454; O0-NEXT:  .Lpcsection70:2455; O0-NEXT:    orb $-43, %dl2456; O0-NEXT:  .Lpcsection71:2457; O0-NEXT:    lock cmpxchgb %dl, (%rcx)2458; O0-NEXT:  .Lpcsection72:2459; O0-NEXT:    sete %cl2460; O0-NEXT:  .Lpcsection73:2461; O0-NEXT:    testb $1, %cl2462; O0-NEXT:    movb %al, {{[-0-9]+}}(%r{{[sb]}}p) # 1-byte Spill2463; O0-NEXT:  .Lpcsection74:2464; O0-NEXT:    jne .LBB44_22465; O0-NEXT:    jmp .LBB44_12466; O0-NEXT:  .LBB44_2: # %atomicrmw.end2467; O0-NEXT:    movq $1, foo2468; O0-NEXT:    retq2469;2470; O1-LABEL: atomic8_nand_seq_cst:2471; O1:       # %bb.0: # %entry2472; O1-NEXT:    movq foo(%rip), %rax2473; O1-NEXT:  .Lpcsection60:2474; O1-NEXT:    movzbl (%rdi), %eax2475; O1-NEXT:    .p2align 42476; O1-NEXT:  .LBB44_1: # %atomicrmw.start2477; O1-NEXT:    # =>This Inner Loop Header: Depth=12478; O1-NEXT:    movl %eax, %ecx2479; O1-NEXT:  .Lpcsection61:2480; O1-NEXT:    notb %cl2481; O1-NEXT:  .Lpcsection62:2482; O1-NEXT:    orb $-43, %cl2483; O1-NEXT:  .Lpcsection63:2484; O1-NEXT:    lock cmpxchgb %cl, (%rdi)2485; O1-NEXT:  .Lpcsection64:2486; O1-NEXT:    jne .LBB44_12487; O1-NEXT:  # %bb.2: # %atomicrmw.end2488; O1-NEXT:    movq $1, foo(%rip)2489; O1-NEXT:    retq2490;2491; O2-LABEL: atomic8_nand_seq_cst:2492; O2:       # %bb.0: # %entry2493; O2-NEXT:    movq foo(%rip), %rax2494; O2-NEXT:  .Lpcsection60:2495; O2-NEXT:    movzbl (%rdi), %eax2496; O2-NEXT:    .p2align 42497; O2-NEXT:  .LBB44_1: # %atomicrmw.start2498; O2-NEXT:    # =>This Inner Loop Header: Depth=12499; O2-NEXT:    movl %eax, %ecx2500; O2-NEXT:  .Lpcsection61:2501; O2-NEXT:    notb %cl2502; O2-NEXT:  .Lpcsection62:2503; O2-NEXT:    orb $-43, %cl2504; O2-NEXT:  .Lpcsection63:2505; O2-NEXT:    lock cmpxchgb %cl, (%rdi)2506; O2-NEXT:  .Lpcsection64:2507; O2-NEXT:    jne .LBB44_12508; O2-NEXT:  # %bb.2: # %atomicrmw.end2509; O2-NEXT:    movq $1, foo(%rip)2510; O2-NEXT:    retq2511;2512; O3-LABEL: atomic8_nand_seq_cst:2513; O3:       # %bb.0: # %entry2514; O3-NEXT:    movq foo(%rip), %rax2515; O3-NEXT:  .Lpcsection60:2516; O3-NEXT:    movzbl (%rdi), %eax2517; O3-NEXT:    .p2align 42518; O3-NEXT:  .LBB44_1: # %atomicrmw.start2519; O3-NEXT:    # =>This Inner Loop Header: Depth=12520; O3-NEXT:    movl %eax, %ecx2521; O3-NEXT:  .Lpcsection61:2522; O3-NEXT:    notb %cl2523; O3-NEXT:  .Lpcsection62:2524; O3-NEXT:    orb $-43, %cl2525; O3-NEXT:  .Lpcsection63:2526; O3-NEXT:    lock cmpxchgb %cl, (%rdi)2527; O3-NEXT:  .Lpcsection64:2528; O3-NEXT:    jne .LBB44_12529; O3-NEXT:  # %bb.2: # %atomicrmw.end2530; O3-NEXT:    movq $1, foo(%rip)2531; O3-NEXT:    retq2532;2533; HASWELL-O3-LABEL: atomic8_nand_seq_cst:2534; HASWELL-O3:       # %bb.0: # %entry2535; HASWELL-O3-NEXT:    movq foo(%rip), %rax2536; HASWELL-O3-NEXT:  .Lpcsection60:2537; HASWELL-O3-NEXT:    movzbl (%rdi), %eax2538; HASWELL-O3-NEXT:    .p2align 42539; HASWELL-O3-NEXT:  .LBB44_1: # %atomicrmw.start2540; HASWELL-O3-NEXT:    # =>This Inner Loop Header: Depth=12541; HASWELL-O3-NEXT:    movl %eax, %ecx2542; HASWELL-O3-NEXT:  .Lpcsection61:2543; HASWELL-O3-NEXT:    notb %cl2544; HASWELL-O3-NEXT:  .Lpcsection62:2545; HASWELL-O3-NEXT:    orb $-43, %cl2546; HASWELL-O3-NEXT:  .Lpcsection63:2547; HASWELL-O3-NEXT:    lock cmpxchgb %cl, (%rdi)2548; HASWELL-O3-NEXT:  .Lpcsection64:2549; HASWELL-O3-NEXT:    jne .LBB44_12550; HASWELL-O3-NEXT:  # %bb.2: # %atomicrmw.end2551; HASWELL-O3-NEXT:    movq $1, foo(%rip)2552; HASWELL-O3-NEXT:    retq2553entry:2554  load volatile i64, ptr @foo, align 82555  %x = atomicrmw nand ptr %a, i8 42 seq_cst, align 1, !pcsections !02556  store volatile i64 1, ptr @foo, align 82557  ret void2558}2559 2560define void @atomic8_cas_monotonic(ptr %a) {2561; O0-LABEL: atomic8_cas_monotonic:2562; O0:       # %bb.0: # %entry2563; O0-NEXT:    movq foo(%rip), %rax2564; O0-NEXT:    movb $42, %al2565; O0-NEXT:    movb %al, {{[-0-9]+}}(%r{{[sb]}}p) # 1-byte Spill2566; O0-NEXT:    movb $1, %cl2567; O0-NEXT:  .Lpcsection75:2568; O0-NEXT:    lock cmpxchgb %cl, (%rdi)2569; O0-NEXT:  .Lpcsection76:2570; O0-NEXT:    # kill: def $dl killed $al2571; O0-NEXT:    movb {{[-0-9]+}}(%r{{[sb]}}p), %al # 1-byte Reload2572; O0-NEXT:  .Lpcsection77:2573; O0-NEXT:    lock cmpxchgb %cl, (%rdi)2574; O0-NEXT:  .Lpcsection78:2575; O0-NEXT:    # kill: def $dl killed $al2576; O0-NEXT:    movb {{[-0-9]+}}(%r{{[sb]}}p), %al # 1-byte Reload2577; O0-NEXT:  .Lpcsection79:2578; O0-NEXT:    lock cmpxchgb %cl, (%rdi)2579; O0-NEXT:    movq $1, foo2580; O0-NEXT:    retq2581;2582; O1-LABEL: atomic8_cas_monotonic:2583; O1:       # %bb.0: # %entry2584; O1-NEXT:    movq foo(%rip), %rax2585; O1-NEXT:    movb $1, %cl2586; O1-NEXT:  .Lpcsection65:2587; O1-NEXT:    movb $42, %al2588; O1-NEXT:  .Lpcsection66:2589; O1-NEXT:    lock cmpxchgb %cl, (%rdi)2590; O1-NEXT:  .Lpcsection67:2591; O1-NEXT:    movb $42, %al2592; O1-NEXT:  .Lpcsection68:2593; O1-NEXT:    lock cmpxchgb %cl, (%rdi)2594; O1-NEXT:  .Lpcsection69:2595; O1-NEXT:    movb $42, %al2596; O1-NEXT:  .Lpcsection70:2597; O1-NEXT:    lock cmpxchgb %cl, (%rdi)2598; O1-NEXT:    movq $1, foo(%rip)2599; O1-NEXT:    retq2600;2601; O2-LABEL: atomic8_cas_monotonic:2602; O2:       # %bb.0: # %entry2603; O2-NEXT:    movq foo(%rip), %rax2604; O2-NEXT:    movb $1, %cl2605; O2-NEXT:  .Lpcsection65:2606; O2-NEXT:    movb $42, %al2607; O2-NEXT:  .Lpcsection66:2608; O2-NEXT:    lock cmpxchgb %cl, (%rdi)2609; O2-NEXT:  .Lpcsection67:2610; O2-NEXT:    movb $42, %al2611; O2-NEXT:  .Lpcsection68:2612; O2-NEXT:    lock cmpxchgb %cl, (%rdi)2613; O2-NEXT:  .Lpcsection69:2614; O2-NEXT:    movb $42, %al2615; O2-NEXT:  .Lpcsection70:2616; O2-NEXT:    lock cmpxchgb %cl, (%rdi)2617; O2-NEXT:    movq $1, foo(%rip)2618; O2-NEXT:    retq2619;2620; O3-LABEL: atomic8_cas_monotonic:2621; O3:       # %bb.0: # %entry2622; O3-NEXT:    movq foo(%rip), %rax2623; O3-NEXT:    movb $1, %cl2624; O3-NEXT:  .Lpcsection65:2625; O3-NEXT:    movb $42, %al2626; O3-NEXT:  .Lpcsection66:2627; O3-NEXT:    lock cmpxchgb %cl, (%rdi)2628; O3-NEXT:  .Lpcsection67:2629; O3-NEXT:    movb $42, %al2630; O3-NEXT:  .Lpcsection68:2631; O3-NEXT:    lock cmpxchgb %cl, (%rdi)2632; O3-NEXT:  .Lpcsection69:2633; O3-NEXT:    movb $42, %al2634; O3-NEXT:  .Lpcsection70:2635; O3-NEXT:    lock cmpxchgb %cl, (%rdi)2636; O3-NEXT:    movq $1, foo(%rip)2637; O3-NEXT:    retq2638;2639; HASWELL-O3-LABEL: atomic8_cas_monotonic:2640; HASWELL-O3:       # %bb.0: # %entry2641; HASWELL-O3-NEXT:    movq foo(%rip), %rax2642; HASWELL-O3-NEXT:    movb $1, %cl2643; HASWELL-O3-NEXT:  .Lpcsection65:2644; HASWELL-O3-NEXT:    movb $42, %al2645; HASWELL-O3-NEXT:  .Lpcsection66:2646; HASWELL-O3-NEXT:    lock cmpxchgb %cl, (%rdi)2647; HASWELL-O3-NEXT:  .Lpcsection67:2648; HASWELL-O3-NEXT:    movb $42, %al2649; HASWELL-O3-NEXT:  .Lpcsection68:2650; HASWELL-O3-NEXT:    lock cmpxchgb %cl, (%rdi)2651; HASWELL-O3-NEXT:  .Lpcsection69:2652; HASWELL-O3-NEXT:    movb $42, %al2653; HASWELL-O3-NEXT:  .Lpcsection70:2654; HASWELL-O3-NEXT:    lock cmpxchgb %cl, (%rdi)2655; HASWELL-O3-NEXT:    movq $1, foo(%rip)2656; HASWELL-O3-NEXT:    retq2657entry:2658  load volatile i64, ptr @foo, align 82659  %x = cmpxchg ptr %a, i8 42, i8 1 monotonic monotonic, align 1, !pcsections !02660  %y = cmpxchg ptr %a, i8 42, i8 1 monotonic acquire, align 1, !pcsections !02661  %z = cmpxchg ptr %a, i8 42, i8 1 monotonic seq_cst, align 1, !pcsections !02662  store volatile i64 1, ptr @foo, align 82663  ret void2664}2665 2666define void @atomic8_cas_acquire(ptr %a) {2667; O0-LABEL: atomic8_cas_acquire:2668; O0:       # %bb.0: # %entry2669; O0-NEXT:    movq foo(%rip), %rax2670; O0-NEXT:    movb $42, %al2671; O0-NEXT:    movb %al, {{[-0-9]+}}(%r{{[sb]}}p) # 1-byte Spill2672; O0-NEXT:    movb $1, %cl2673; O0-NEXT:  .Lpcsection80:2674; O0-NEXT:    lock cmpxchgb %cl, (%rdi)2675; O0-NEXT:  .Lpcsection81:2676; O0-NEXT:    # kill: def $dl killed $al2677; O0-NEXT:    movb {{[-0-9]+}}(%r{{[sb]}}p), %al # 1-byte Reload2678; O0-NEXT:  .Lpcsection82:2679; O0-NEXT:    lock cmpxchgb %cl, (%rdi)2680; O0-NEXT:  .Lpcsection83:2681; O0-NEXT:    # kill: def $dl killed $al2682; O0-NEXT:    movb {{[-0-9]+}}(%r{{[sb]}}p), %al # 1-byte Reload2683; O0-NEXT:  .Lpcsection84:2684; O0-NEXT:    lock cmpxchgb %cl, (%rdi)2685; O0-NEXT:    movq $1, foo2686; O0-NEXT:    retq2687;2688; O1-LABEL: atomic8_cas_acquire:2689; O1:       # %bb.0: # %entry2690; O1-NEXT:    movq foo(%rip), %rax2691; O1-NEXT:    movb $1, %cl2692; O1-NEXT:  .Lpcsection71:2693; O1-NEXT:    movb $42, %al2694; O1-NEXT:  .Lpcsection72:2695; O1-NEXT:    lock cmpxchgb %cl, (%rdi)2696; O1-NEXT:  .Lpcsection73:2697; O1-NEXT:    movb $42, %al2698; O1-NEXT:  .Lpcsection74:2699; O1-NEXT:    lock cmpxchgb %cl, (%rdi)2700; O1-NEXT:  .Lpcsection75:2701; O1-NEXT:    movb $42, %al2702; O1-NEXT:  .Lpcsection76:2703; O1-NEXT:    lock cmpxchgb %cl, (%rdi)2704; O1-NEXT:    movq $1, foo(%rip)2705; O1-NEXT:    retq2706;2707; O2-LABEL: atomic8_cas_acquire:2708; O2:       # %bb.0: # %entry2709; O2-NEXT:    movq foo(%rip), %rax2710; O2-NEXT:    movb $1, %cl2711; O2-NEXT:  .Lpcsection71:2712; O2-NEXT:    movb $42, %al2713; O2-NEXT:  .Lpcsection72:2714; O2-NEXT:    lock cmpxchgb %cl, (%rdi)2715; O2-NEXT:  .Lpcsection73:2716; O2-NEXT:    movb $42, %al2717; O2-NEXT:  .Lpcsection74:2718; O2-NEXT:    lock cmpxchgb %cl, (%rdi)2719; O2-NEXT:  .Lpcsection75:2720; O2-NEXT:    movb $42, %al2721; O2-NEXT:  .Lpcsection76:2722; O2-NEXT:    lock cmpxchgb %cl, (%rdi)2723; O2-NEXT:    movq $1, foo(%rip)2724; O2-NEXT:    retq2725;2726; O3-LABEL: atomic8_cas_acquire:2727; O3:       # %bb.0: # %entry2728; O3-NEXT:    movq foo(%rip), %rax2729; O3-NEXT:    movb $1, %cl2730; O3-NEXT:  .Lpcsection71:2731; O3-NEXT:    movb $42, %al2732; O3-NEXT:  .Lpcsection72:2733; O3-NEXT:    lock cmpxchgb %cl, (%rdi)2734; O3-NEXT:  .Lpcsection73:2735; O3-NEXT:    movb $42, %al2736; O3-NEXT:  .Lpcsection74:2737; O3-NEXT:    lock cmpxchgb %cl, (%rdi)2738; O3-NEXT:  .Lpcsection75:2739; O3-NEXT:    movb $42, %al2740; O3-NEXT:  .Lpcsection76:2741; O3-NEXT:    lock cmpxchgb %cl, (%rdi)2742; O3-NEXT:    movq $1, foo(%rip)2743; O3-NEXT:    retq2744;2745; HASWELL-O3-LABEL: atomic8_cas_acquire:2746; HASWELL-O3:       # %bb.0: # %entry2747; HASWELL-O3-NEXT:    movq foo(%rip), %rax2748; HASWELL-O3-NEXT:    movb $1, %cl2749; HASWELL-O3-NEXT:  .Lpcsection71:2750; HASWELL-O3-NEXT:    movb $42, %al2751; HASWELL-O3-NEXT:  .Lpcsection72:2752; HASWELL-O3-NEXT:    lock cmpxchgb %cl, (%rdi)2753; HASWELL-O3-NEXT:  .Lpcsection73:2754; HASWELL-O3-NEXT:    movb $42, %al2755; HASWELL-O3-NEXT:  .Lpcsection74:2756; HASWELL-O3-NEXT:    lock cmpxchgb %cl, (%rdi)2757; HASWELL-O3-NEXT:  .Lpcsection75:2758; HASWELL-O3-NEXT:    movb $42, %al2759; HASWELL-O3-NEXT:  .Lpcsection76:2760; HASWELL-O3-NEXT:    lock cmpxchgb %cl, (%rdi)2761; HASWELL-O3-NEXT:    movq $1, foo(%rip)2762; HASWELL-O3-NEXT:    retq2763entry:2764  load volatile i64, ptr @foo, align 82765  %x = cmpxchg ptr %a, i8 42, i8 1 acquire monotonic, align 1, !pcsections !02766  %y = cmpxchg ptr %a, i8 42, i8 1 acquire acquire, align 1, !pcsections !02767  %z = cmpxchg ptr %a, i8 42, i8 1 acquire seq_cst, align 1, !pcsections !02768  store volatile i64 1, ptr @foo, align 82769  ret void2770}2771 2772define void @atomic8_cas_release(ptr %a) {2773; O0-LABEL: atomic8_cas_release:2774; O0:       # %bb.0: # %entry2775; O0-NEXT:    movq foo(%rip), %rax2776; O0-NEXT:    movb $42, %al2777; O0-NEXT:    movb %al, {{[-0-9]+}}(%r{{[sb]}}p) # 1-byte Spill2778; O0-NEXT:    movb $1, %cl2779; O0-NEXT:  .Lpcsection85:2780; O0-NEXT:    lock cmpxchgb %cl, (%rdi)2781; O0-NEXT:  .Lpcsection86:2782; O0-NEXT:    # kill: def $dl killed $al2783; O0-NEXT:    movb {{[-0-9]+}}(%r{{[sb]}}p), %al # 1-byte Reload2784; O0-NEXT:  .Lpcsection87:2785; O0-NEXT:    lock cmpxchgb %cl, (%rdi)2786; O0-NEXT:  .Lpcsection88:2787; O0-NEXT:    # kill: def $dl killed $al2788; O0-NEXT:    movb {{[-0-9]+}}(%r{{[sb]}}p), %al # 1-byte Reload2789; O0-NEXT:  .Lpcsection89:2790; O0-NEXT:    lock cmpxchgb %cl, (%rdi)2791; O0-NEXT:    movq $1, foo2792; O0-NEXT:    retq2793;2794; O1-LABEL: atomic8_cas_release:2795; O1:       # %bb.0: # %entry2796; O1-NEXT:    movq foo(%rip), %rax2797; O1-NEXT:    movb $1, %cl2798; O1-NEXT:  .Lpcsection77:2799; O1-NEXT:    movb $42, %al2800; O1-NEXT:  .Lpcsection78:2801; O1-NEXT:    lock cmpxchgb %cl, (%rdi)2802; O1-NEXT:  .Lpcsection79:2803; O1-NEXT:    movb $42, %al2804; O1-NEXT:  .Lpcsection80:2805; O1-NEXT:    lock cmpxchgb %cl, (%rdi)2806; O1-NEXT:  .Lpcsection81:2807; O1-NEXT:    movb $42, %al2808; O1-NEXT:  .Lpcsection82:2809; O1-NEXT:    lock cmpxchgb %cl, (%rdi)2810; O1-NEXT:    movq $1, foo(%rip)2811; O1-NEXT:    retq2812;2813; O2-LABEL: atomic8_cas_release:2814; O2:       # %bb.0: # %entry2815; O2-NEXT:    movq foo(%rip), %rax2816; O2-NEXT:    movb $1, %cl2817; O2-NEXT:  .Lpcsection77:2818; O2-NEXT:    movb $42, %al2819; O2-NEXT:  .Lpcsection78:2820; O2-NEXT:    lock cmpxchgb %cl, (%rdi)2821; O2-NEXT:  .Lpcsection79:2822; O2-NEXT:    movb $42, %al2823; O2-NEXT:  .Lpcsection80:2824; O2-NEXT:    lock cmpxchgb %cl, (%rdi)2825; O2-NEXT:  .Lpcsection81:2826; O2-NEXT:    movb $42, %al2827; O2-NEXT:  .Lpcsection82:2828; O2-NEXT:    lock cmpxchgb %cl, (%rdi)2829; O2-NEXT:    movq $1, foo(%rip)2830; O2-NEXT:    retq2831;2832; O3-LABEL: atomic8_cas_release:2833; O3:       # %bb.0: # %entry2834; O3-NEXT:    movq foo(%rip), %rax2835; O3-NEXT:    movb $1, %cl2836; O3-NEXT:  .Lpcsection77:2837; O3-NEXT:    movb $42, %al2838; O3-NEXT:  .Lpcsection78:2839; O3-NEXT:    lock cmpxchgb %cl, (%rdi)2840; O3-NEXT:  .Lpcsection79:2841; O3-NEXT:    movb $42, %al2842; O3-NEXT:  .Lpcsection80:2843; O3-NEXT:    lock cmpxchgb %cl, (%rdi)2844; O3-NEXT:  .Lpcsection81:2845; O3-NEXT:    movb $42, %al2846; O3-NEXT:  .Lpcsection82:2847; O3-NEXT:    lock cmpxchgb %cl, (%rdi)2848; O3-NEXT:    movq $1, foo(%rip)2849; O3-NEXT:    retq2850;2851; HASWELL-O3-LABEL: atomic8_cas_release:2852; HASWELL-O3:       # %bb.0: # %entry2853; HASWELL-O3-NEXT:    movq foo(%rip), %rax2854; HASWELL-O3-NEXT:    movb $1, %cl2855; HASWELL-O3-NEXT:  .Lpcsection77:2856; HASWELL-O3-NEXT:    movb $42, %al2857; HASWELL-O3-NEXT:  .Lpcsection78:2858; HASWELL-O3-NEXT:    lock cmpxchgb %cl, (%rdi)2859; HASWELL-O3-NEXT:  .Lpcsection79:2860; HASWELL-O3-NEXT:    movb $42, %al2861; HASWELL-O3-NEXT:  .Lpcsection80:2862; HASWELL-O3-NEXT:    lock cmpxchgb %cl, (%rdi)2863; HASWELL-O3-NEXT:  .Lpcsection81:2864; HASWELL-O3-NEXT:    movb $42, %al2865; HASWELL-O3-NEXT:  .Lpcsection82:2866; HASWELL-O3-NEXT:    lock cmpxchgb %cl, (%rdi)2867; HASWELL-O3-NEXT:    movq $1, foo(%rip)2868; HASWELL-O3-NEXT:    retq2869entry:2870  load volatile i64, ptr @foo, align 82871  %x = cmpxchg ptr %a, i8 42, i8 1 release monotonic, align 1, !pcsections !02872  %y = cmpxchg ptr %a, i8 42, i8 1 release acquire, align 1, !pcsections !02873  %z = cmpxchg ptr %a, i8 42, i8 1 release seq_cst, align 1, !pcsections !02874  store volatile i64 1, ptr @foo, align 82875  ret void2876}2877 2878define void @atomic8_cas_acq_rel(ptr %a) {2879; O0-LABEL: atomic8_cas_acq_rel:2880; O0:       # %bb.0: # %entry2881; O0-NEXT:    movq foo(%rip), %rax2882; O0-NEXT:    movb $42, %al2883; O0-NEXT:    movb %al, {{[-0-9]+}}(%r{{[sb]}}p) # 1-byte Spill2884; O0-NEXT:    movb $1, %cl2885; O0-NEXT:  .Lpcsection90:2886; O0-NEXT:    lock cmpxchgb %cl, (%rdi)2887; O0-NEXT:  .Lpcsection91:2888; O0-NEXT:    # kill: def $dl killed $al2889; O0-NEXT:    movb {{[-0-9]+}}(%r{{[sb]}}p), %al # 1-byte Reload2890; O0-NEXT:  .Lpcsection92:2891; O0-NEXT:    lock cmpxchgb %cl, (%rdi)2892; O0-NEXT:  .Lpcsection93:2893; O0-NEXT:    # kill: def $dl killed $al2894; O0-NEXT:    movb {{[-0-9]+}}(%r{{[sb]}}p), %al # 1-byte Reload2895; O0-NEXT:  .Lpcsection94:2896; O0-NEXT:    lock cmpxchgb %cl, (%rdi)2897; O0-NEXT:    movq $1, foo2898; O0-NEXT:    retq2899;2900; O1-LABEL: atomic8_cas_acq_rel:2901; O1:       # %bb.0: # %entry2902; O1-NEXT:    movq foo(%rip), %rax2903; O1-NEXT:    movb $1, %cl2904; O1-NEXT:  .Lpcsection83:2905; O1-NEXT:    movb $42, %al2906; O1-NEXT:  .Lpcsection84:2907; O1-NEXT:    lock cmpxchgb %cl, (%rdi)2908; O1-NEXT:  .Lpcsection85:2909; O1-NEXT:    movb $42, %al2910; O1-NEXT:  .Lpcsection86:2911; O1-NEXT:    lock cmpxchgb %cl, (%rdi)2912; O1-NEXT:  .Lpcsection87:2913; O1-NEXT:    movb $42, %al2914; O1-NEXT:  .Lpcsection88:2915; O1-NEXT:    lock cmpxchgb %cl, (%rdi)2916; O1-NEXT:    movq $1, foo(%rip)2917; O1-NEXT:    retq2918;2919; O2-LABEL: atomic8_cas_acq_rel:2920; O2:       # %bb.0: # %entry2921; O2-NEXT:    movq foo(%rip), %rax2922; O2-NEXT:    movb $1, %cl2923; O2-NEXT:  .Lpcsection83:2924; O2-NEXT:    movb $42, %al2925; O2-NEXT:  .Lpcsection84:2926; O2-NEXT:    lock cmpxchgb %cl, (%rdi)2927; O2-NEXT:  .Lpcsection85:2928; O2-NEXT:    movb $42, %al2929; O2-NEXT:  .Lpcsection86:2930; O2-NEXT:    lock cmpxchgb %cl, (%rdi)2931; O2-NEXT:  .Lpcsection87:2932; O2-NEXT:    movb $42, %al2933; O2-NEXT:  .Lpcsection88:2934; O2-NEXT:    lock cmpxchgb %cl, (%rdi)2935; O2-NEXT:    movq $1, foo(%rip)2936; O2-NEXT:    retq2937;2938; O3-LABEL: atomic8_cas_acq_rel:2939; O3:       # %bb.0: # %entry2940; O3-NEXT:    movq foo(%rip), %rax2941; O3-NEXT:    movb $1, %cl2942; O3-NEXT:  .Lpcsection83:2943; O3-NEXT:    movb $42, %al2944; O3-NEXT:  .Lpcsection84:2945; O3-NEXT:    lock cmpxchgb %cl, (%rdi)2946; O3-NEXT:  .Lpcsection85:2947; O3-NEXT:    movb $42, %al2948; O3-NEXT:  .Lpcsection86:2949; O3-NEXT:    lock cmpxchgb %cl, (%rdi)2950; O3-NEXT:  .Lpcsection87:2951; O3-NEXT:    movb $42, %al2952; O3-NEXT:  .Lpcsection88:2953; O3-NEXT:    lock cmpxchgb %cl, (%rdi)2954; O3-NEXT:    movq $1, foo(%rip)2955; O3-NEXT:    retq2956;2957; HASWELL-O3-LABEL: atomic8_cas_acq_rel:2958; HASWELL-O3:       # %bb.0: # %entry2959; HASWELL-O3-NEXT:    movq foo(%rip), %rax2960; HASWELL-O3-NEXT:    movb $1, %cl2961; HASWELL-O3-NEXT:  .Lpcsection83:2962; HASWELL-O3-NEXT:    movb $42, %al2963; HASWELL-O3-NEXT:  .Lpcsection84:2964; HASWELL-O3-NEXT:    lock cmpxchgb %cl, (%rdi)2965; HASWELL-O3-NEXT:  .Lpcsection85:2966; HASWELL-O3-NEXT:    movb $42, %al2967; HASWELL-O3-NEXT:  .Lpcsection86:2968; HASWELL-O3-NEXT:    lock cmpxchgb %cl, (%rdi)2969; HASWELL-O3-NEXT:  .Lpcsection87:2970; HASWELL-O3-NEXT:    movb $42, %al2971; HASWELL-O3-NEXT:  .Lpcsection88:2972; HASWELL-O3-NEXT:    lock cmpxchgb %cl, (%rdi)2973; HASWELL-O3-NEXT:    movq $1, foo(%rip)2974; HASWELL-O3-NEXT:    retq2975entry:2976  load volatile i64, ptr @foo, align 82977  %x = cmpxchg ptr %a, i8 42, i8 1 acq_rel monotonic, align 1, !pcsections !02978  %y = cmpxchg ptr %a, i8 42, i8 1 acq_rel acquire, align 1, !pcsections !02979  %z = cmpxchg ptr %a, i8 42, i8 1 acq_rel seq_cst, align 1, !pcsections !02980  store volatile i64 1, ptr @foo, align 82981  ret void2982}2983 2984define void @atomic8_cas_seq_cst(ptr %a) {2985; O0-LABEL: atomic8_cas_seq_cst:2986; O0:       # %bb.0: # %entry2987; O0-NEXT:    movq foo(%rip), %rax2988; O0-NEXT:    movb $42, %al2989; O0-NEXT:    movb %al, {{[-0-9]+}}(%r{{[sb]}}p) # 1-byte Spill2990; O0-NEXT:    movb $1, %cl2991; O0-NEXT:  .Lpcsection95:2992; O0-NEXT:    lock cmpxchgb %cl, (%rdi)2993; O0-NEXT:  .Lpcsection96:2994; O0-NEXT:    # kill: def $dl killed $al2995; O0-NEXT:    movb {{[-0-9]+}}(%r{{[sb]}}p), %al # 1-byte Reload2996; O0-NEXT:  .Lpcsection97:2997; O0-NEXT:    lock cmpxchgb %cl, (%rdi)2998; O0-NEXT:  .Lpcsection98:2999; O0-NEXT:    # kill: def $dl killed $al3000; O0-NEXT:    movb {{[-0-9]+}}(%r{{[sb]}}p), %al # 1-byte Reload3001; O0-NEXT:  .Lpcsection99:3002; O0-NEXT:    lock cmpxchgb %cl, (%rdi)3003; O0-NEXT:    movq $1, foo3004; O0-NEXT:    retq3005;3006; O1-LABEL: atomic8_cas_seq_cst:3007; O1:       # %bb.0: # %entry3008; O1-NEXT:    movq foo(%rip), %rax3009; O1-NEXT:    movb $1, %cl3010; O1-NEXT:  .Lpcsection89:3011; O1-NEXT:    movb $42, %al3012; O1-NEXT:  .Lpcsection90:3013; O1-NEXT:    lock cmpxchgb %cl, (%rdi)3014; O1-NEXT:  .Lpcsection91:3015; O1-NEXT:    movb $42, %al3016; O1-NEXT:  .Lpcsection92:3017; O1-NEXT:    lock cmpxchgb %cl, (%rdi)3018; O1-NEXT:  .Lpcsection93:3019; O1-NEXT:    movb $42, %al3020; O1-NEXT:  .Lpcsection94:3021; O1-NEXT:    lock cmpxchgb %cl, (%rdi)3022; O1-NEXT:    movq $1, foo(%rip)3023; O1-NEXT:    retq3024;3025; O2-LABEL: atomic8_cas_seq_cst:3026; O2:       # %bb.0: # %entry3027; O2-NEXT:    movq foo(%rip), %rax3028; O2-NEXT:    movb $1, %cl3029; O2-NEXT:  .Lpcsection89:3030; O2-NEXT:    movb $42, %al3031; O2-NEXT:  .Lpcsection90:3032; O2-NEXT:    lock cmpxchgb %cl, (%rdi)3033; O2-NEXT:  .Lpcsection91:3034; O2-NEXT:    movb $42, %al3035; O2-NEXT:  .Lpcsection92:3036; O2-NEXT:    lock cmpxchgb %cl, (%rdi)3037; O2-NEXT:  .Lpcsection93:3038; O2-NEXT:    movb $42, %al3039; O2-NEXT:  .Lpcsection94:3040; O2-NEXT:    lock cmpxchgb %cl, (%rdi)3041; O2-NEXT:    movq $1, foo(%rip)3042; O2-NEXT:    retq3043;3044; O3-LABEL: atomic8_cas_seq_cst:3045; O3:       # %bb.0: # %entry3046; O3-NEXT:    movq foo(%rip), %rax3047; O3-NEXT:    movb $1, %cl3048; O3-NEXT:  .Lpcsection89:3049; O3-NEXT:    movb $42, %al3050; O3-NEXT:  .Lpcsection90:3051; O3-NEXT:    lock cmpxchgb %cl, (%rdi)3052; O3-NEXT:  .Lpcsection91:3053; O3-NEXT:    movb $42, %al3054; O3-NEXT:  .Lpcsection92:3055; O3-NEXT:    lock cmpxchgb %cl, (%rdi)3056; O3-NEXT:  .Lpcsection93:3057; O3-NEXT:    movb $42, %al3058; O3-NEXT:  .Lpcsection94:3059; O3-NEXT:    lock cmpxchgb %cl, (%rdi)3060; O3-NEXT:    movq $1, foo(%rip)3061; O3-NEXT:    retq3062;3063; HASWELL-O3-LABEL: atomic8_cas_seq_cst:3064; HASWELL-O3:       # %bb.0: # %entry3065; HASWELL-O3-NEXT:    movq foo(%rip), %rax3066; HASWELL-O3-NEXT:    movb $1, %cl3067; HASWELL-O3-NEXT:  .Lpcsection89:3068; HASWELL-O3-NEXT:    movb $42, %al3069; HASWELL-O3-NEXT:  .Lpcsection90:3070; HASWELL-O3-NEXT:    lock cmpxchgb %cl, (%rdi)3071; HASWELL-O3-NEXT:  .Lpcsection91:3072; HASWELL-O3-NEXT:    movb $42, %al3073; HASWELL-O3-NEXT:  .Lpcsection92:3074; HASWELL-O3-NEXT:    lock cmpxchgb %cl, (%rdi)3075; HASWELL-O3-NEXT:  .Lpcsection93:3076; HASWELL-O3-NEXT:    movb $42, %al3077; HASWELL-O3-NEXT:  .Lpcsection94:3078; HASWELL-O3-NEXT:    lock cmpxchgb %cl, (%rdi)3079; HASWELL-O3-NEXT:    movq $1, foo(%rip)3080; HASWELL-O3-NEXT:    retq3081entry:3082  load volatile i64, ptr @foo, align 83083  %x = cmpxchg ptr %a, i8 42, i8 1 seq_cst monotonic, align 1, !pcsections !03084  %y = cmpxchg ptr %a, i8 42, i8 1 seq_cst acquire, align 1, !pcsections !03085  %z = cmpxchg ptr %a, i8 42, i8 1 seq_cst seq_cst, align 1, !pcsections !03086  store volatile i64 1, ptr @foo, align 83087  ret void3088}3089 3090define i16 @atomic16_load_unordered(ptr %a) {3091; O0-LABEL: atomic16_load_unordered:3092; O0:       # %bb.0: # %entry3093; O0-NEXT:    movq foo(%rip), %rax3094; O0-NEXT:  .Lpcsection100:3095; O0-NEXT:    movw (%rdi), %ax3096; O0-NEXT:    movq $1, foo3097; O0-NEXT:    retq3098;3099; O1-LABEL: atomic16_load_unordered:3100; O1:       # %bb.0: # %entry3101; O1-NEXT:    movq foo(%rip), %rax3102; O1-NEXT:  .Lpcsection95:3103; O1-NEXT:    movzwl (%rdi), %eax3104; O1-NEXT:    movq $1, foo(%rip)3105; O1-NEXT:    retq3106;3107; O2-LABEL: atomic16_load_unordered:3108; O2:       # %bb.0: # %entry3109; O2-NEXT:    movq foo(%rip), %rax3110; O2-NEXT:  .Lpcsection95:3111; O2-NEXT:    movzwl (%rdi), %eax3112; O2-NEXT:    movq $1, foo(%rip)3113; O2-NEXT:    retq3114;3115; O3-LABEL: atomic16_load_unordered:3116; O3:       # %bb.0: # %entry3117; O3-NEXT:    movq foo(%rip), %rax3118; O3-NEXT:  .Lpcsection95:3119; O3-NEXT:    movzwl (%rdi), %eax3120; O3-NEXT:    movq $1, foo(%rip)3121; O3-NEXT:    retq3122;3123; HASWELL-O3-LABEL: atomic16_load_unordered:3124; HASWELL-O3:       # %bb.0: # %entry3125; HASWELL-O3-NEXT:    movq foo(%rip), %rax3126; HASWELL-O3-NEXT:  .Lpcsection95:3127; HASWELL-O3-NEXT:    movzwl (%rdi), %eax3128; HASWELL-O3-NEXT:    movq $1, foo(%rip)3129; HASWELL-O3-NEXT:    retq3130entry:3131  load volatile i64, ptr @foo, align 83132  %x = load atomic i16, ptr %a unordered, align 2, !pcsections !03133  store volatile i64 1, ptr @foo, align 83134  ret i16 %x3135}3136 3137define i16 @atomic16_load_monotonic(ptr %a) {3138; O0-LABEL: atomic16_load_monotonic:3139; O0:       # %bb.0: # %entry3140; O0-NEXT:    movq foo(%rip), %rax3141; O0-NEXT:  .Lpcsection101:3142; O0-NEXT:    movw (%rdi), %ax3143; O0-NEXT:    movq $1, foo3144; O0-NEXT:    retq3145;3146; O1-LABEL: atomic16_load_monotonic:3147; O1:       # %bb.0: # %entry3148; O1-NEXT:    movq foo(%rip), %rax3149; O1-NEXT:  .Lpcsection96:3150; O1-NEXT:    movzwl (%rdi), %eax3151; O1-NEXT:    movq $1, foo(%rip)3152; O1-NEXT:    retq3153;3154; O2-LABEL: atomic16_load_monotonic:3155; O2:       # %bb.0: # %entry3156; O2-NEXT:    movq foo(%rip), %rax3157; O2-NEXT:  .Lpcsection96:3158; O2-NEXT:    movzwl (%rdi), %eax3159; O2-NEXT:    movq $1, foo(%rip)3160; O2-NEXT:    retq3161;3162; O3-LABEL: atomic16_load_monotonic:3163; O3:       # %bb.0: # %entry3164; O3-NEXT:    movq foo(%rip), %rax3165; O3-NEXT:  .Lpcsection96:3166; O3-NEXT:    movzwl (%rdi), %eax3167; O3-NEXT:    movq $1, foo(%rip)3168; O3-NEXT:    retq3169;3170; HASWELL-O3-LABEL: atomic16_load_monotonic:3171; HASWELL-O3:       # %bb.0: # %entry3172; HASWELL-O3-NEXT:    movq foo(%rip), %rax3173; HASWELL-O3-NEXT:  .Lpcsection96:3174; HASWELL-O3-NEXT:    movzwl (%rdi), %eax3175; HASWELL-O3-NEXT:    movq $1, foo(%rip)3176; HASWELL-O3-NEXT:    retq3177entry:3178  load volatile i64, ptr @foo, align 83179  %x = load atomic i16, ptr %a monotonic, align 2, !pcsections !03180  store volatile i64 1, ptr @foo, align 83181  ret i16 %x3182}3183 3184define i16 @atomic16_load_acquire(ptr %a) {3185; O0-LABEL: atomic16_load_acquire:3186; O0:       # %bb.0: # %entry3187; O0-NEXT:    movq foo(%rip), %rax3188; O0-NEXT:  .Lpcsection102:3189; O0-NEXT:    movw (%rdi), %ax3190; O0-NEXT:    movq $1, foo3191; O0-NEXT:    retq3192;3193; O1-LABEL: atomic16_load_acquire:3194; O1:       # %bb.0: # %entry3195; O1-NEXT:    movq foo(%rip), %rax3196; O1-NEXT:  .Lpcsection97:3197; O1-NEXT:    movzwl (%rdi), %eax3198; O1-NEXT:    movq $1, foo(%rip)3199; O1-NEXT:    retq3200;3201; O2-LABEL: atomic16_load_acquire:3202; O2:       # %bb.0: # %entry3203; O2-NEXT:    movq foo(%rip), %rax3204; O2-NEXT:  .Lpcsection97:3205; O2-NEXT:    movzwl (%rdi), %eax3206; O2-NEXT:    movq $1, foo(%rip)3207; O2-NEXT:    retq3208;3209; O3-LABEL: atomic16_load_acquire:3210; O3:       # %bb.0: # %entry3211; O3-NEXT:    movq foo(%rip), %rax3212; O3-NEXT:  .Lpcsection97:3213; O3-NEXT:    movzwl (%rdi), %eax3214; O3-NEXT:    movq $1, foo(%rip)3215; O3-NEXT:    retq3216;3217; HASWELL-O3-LABEL: atomic16_load_acquire:3218; HASWELL-O3:       # %bb.0: # %entry3219; HASWELL-O3-NEXT:    movq foo(%rip), %rax3220; HASWELL-O3-NEXT:  .Lpcsection97:3221; HASWELL-O3-NEXT:    movzwl (%rdi), %eax3222; HASWELL-O3-NEXT:    movq $1, foo(%rip)3223; HASWELL-O3-NEXT:    retq3224entry:3225  load volatile i64, ptr @foo, align 83226  %x = load atomic i16, ptr %a acquire, align 2, !pcsections !03227  store volatile i64 1, ptr @foo, align 83228  ret i16 %x3229}3230 3231define i16 @atomic16_load_seq_cst(ptr %a) {3232; O0-LABEL: atomic16_load_seq_cst:3233; O0:       # %bb.0: # %entry3234; O0-NEXT:    movq foo(%rip), %rax3235; O0-NEXT:  .Lpcsection103:3236; O0-NEXT:    movw (%rdi), %ax3237; O0-NEXT:    movq $1, foo3238; O0-NEXT:    retq3239;3240; O1-LABEL: atomic16_load_seq_cst:3241; O1:       # %bb.0: # %entry3242; O1-NEXT:    movq foo(%rip), %rax3243; O1-NEXT:  .Lpcsection98:3244; O1-NEXT:    movzwl (%rdi), %eax3245; O1-NEXT:    movq $1, foo(%rip)3246; O1-NEXT:    retq3247;3248; O2-LABEL: atomic16_load_seq_cst:3249; O2:       # %bb.0: # %entry3250; O2-NEXT:    movq foo(%rip), %rax3251; O2-NEXT:  .Lpcsection98:3252; O2-NEXT:    movzwl (%rdi), %eax3253; O2-NEXT:    movq $1, foo(%rip)3254; O2-NEXT:    retq3255;3256; O3-LABEL: atomic16_load_seq_cst:3257; O3:       # %bb.0: # %entry3258; O3-NEXT:    movq foo(%rip), %rax3259; O3-NEXT:  .Lpcsection98:3260; O3-NEXT:    movzwl (%rdi), %eax3261; O3-NEXT:    movq $1, foo(%rip)3262; O3-NEXT:    retq3263;3264; HASWELL-O3-LABEL: atomic16_load_seq_cst:3265; HASWELL-O3:       # %bb.0: # %entry3266; HASWELL-O3-NEXT:    movq foo(%rip), %rax3267; HASWELL-O3-NEXT:  .Lpcsection98:3268; HASWELL-O3-NEXT:    movzwl (%rdi), %eax3269; HASWELL-O3-NEXT:    movq $1, foo(%rip)3270; HASWELL-O3-NEXT:    retq3271entry:3272  load volatile i64, ptr @foo, align 83273  %x = load atomic i16, ptr %a seq_cst, align 2, !pcsections !03274  store volatile i64 1, ptr @foo, align 83275  ret i16 %x3276}3277 3278define void @atomic16_store_unordered(ptr %a) {3279; O0-LABEL: atomic16_store_unordered:3280; O0:       # %bb.0: # %entry3281; O0-NEXT:    movq foo(%rip), %rax3282; O0-NEXT:  .Lpcsection104:3283; O0-NEXT:    movw $42, (%rdi)3284; O0-NEXT:    movq $1, foo3285; O0-NEXT:    retq3286;3287; O1-LABEL: atomic16_store_unordered:3288; O1:       # %bb.0: # %entry3289; O1-NEXT:    movq foo(%rip), %rax3290; O1-NEXT:  .Lpcsection99:3291; O1-NEXT:    movw $42, (%rdi)3292; O1-NEXT:    movq $1, foo(%rip)3293; O1-NEXT:    retq3294;3295; O2-LABEL: atomic16_store_unordered:3296; O2:       # %bb.0: # %entry3297; O2-NEXT:    movq foo(%rip), %rax3298; O2-NEXT:  .Lpcsection99:3299; O2-NEXT:    movw $42, (%rdi)3300; O2-NEXT:    movq $1, foo(%rip)3301; O2-NEXT:    retq3302;3303; O3-LABEL: atomic16_store_unordered:3304; O3:       # %bb.0: # %entry3305; O3-NEXT:    movq foo(%rip), %rax3306; O3-NEXT:  .Lpcsection99:3307; O3-NEXT:    movw $42, (%rdi)3308; O3-NEXT:    movq $1, foo(%rip)3309; O3-NEXT:    retq3310;3311; HASWELL-O3-LABEL: atomic16_store_unordered:3312; HASWELL-O3:       # %bb.0: # %entry3313; HASWELL-O3-NEXT:    movq foo(%rip), %rax3314; HASWELL-O3-NEXT:  .Lpcsection99:3315; HASWELL-O3-NEXT:    movw $42, (%rdi)3316; HASWELL-O3-NEXT:    movq $1, foo(%rip)3317; HASWELL-O3-NEXT:    retq3318entry:3319  load volatile i64, ptr @foo, align 83320  store atomic i16 42, ptr %a unordered, align 2, !pcsections !03321  store volatile i64 1, ptr @foo, align 83322  ret void3323}3324 3325define void @atomic16_store_monotonic(ptr %a) {3326; O0-LABEL: atomic16_store_monotonic:3327; O0:       # %bb.0: # %entry3328; O0-NEXT:    movq foo(%rip), %rax3329; O0-NEXT:  .Lpcsection105:3330; O0-NEXT:    movw $42, (%rdi)3331; O0-NEXT:    movq $1, foo3332; O0-NEXT:    retq3333;3334; O1-LABEL: atomic16_store_monotonic:3335; O1:       # %bb.0: # %entry3336; O1-NEXT:    movq foo(%rip), %rax3337; O1-NEXT:  .Lpcsection100:3338; O1-NEXT:    movw $42, (%rdi)3339; O1-NEXT:    movq $1, foo(%rip)3340; O1-NEXT:    retq3341;3342; O2-LABEL: atomic16_store_monotonic:3343; O2:       # %bb.0: # %entry3344; O2-NEXT:    movq foo(%rip), %rax3345; O2-NEXT:  .Lpcsection100:3346; O2-NEXT:    movw $42, (%rdi)3347; O2-NEXT:    movq $1, foo(%rip)3348; O2-NEXT:    retq3349;3350; O3-LABEL: atomic16_store_monotonic:3351; O3:       # %bb.0: # %entry3352; O3-NEXT:    movq foo(%rip), %rax3353; O3-NEXT:  .Lpcsection100:3354; O3-NEXT:    movw $42, (%rdi)3355; O3-NEXT:    movq $1, foo(%rip)3356; O3-NEXT:    retq3357;3358; HASWELL-O3-LABEL: atomic16_store_monotonic:3359; HASWELL-O3:       # %bb.0: # %entry3360; HASWELL-O3-NEXT:    movq foo(%rip), %rax3361; HASWELL-O3-NEXT:  .Lpcsection100:3362; HASWELL-O3-NEXT:    movw $42, (%rdi)3363; HASWELL-O3-NEXT:    movq $1, foo(%rip)3364; HASWELL-O3-NEXT:    retq3365entry:3366  load volatile i64, ptr @foo, align 83367  store atomic i16 42, ptr %a monotonic, align 2, !pcsections !03368  store volatile i64 1, ptr @foo, align 83369  ret void3370}3371 3372define void @atomic16_store_release(ptr %a) {3373; O0-LABEL: atomic16_store_release:3374; O0:       # %bb.0: # %entry3375; O0-NEXT:    movq foo(%rip), %rax3376; O0-NEXT:  .Lpcsection106:3377; O0-NEXT:    movw $42, (%rdi)3378; O0-NEXT:    movq $1, foo3379; O0-NEXT:    retq3380;3381; O1-LABEL: atomic16_store_release:3382; O1:       # %bb.0: # %entry3383; O1-NEXT:    movq foo(%rip), %rax3384; O1-NEXT:  .Lpcsection101:3385; O1-NEXT:    movw $42, (%rdi)3386; O1-NEXT:    movq $1, foo(%rip)3387; O1-NEXT:    retq3388;3389; O2-LABEL: atomic16_store_release:3390; O2:       # %bb.0: # %entry3391; O2-NEXT:    movq foo(%rip), %rax3392; O2-NEXT:  .Lpcsection101:3393; O2-NEXT:    movw $42, (%rdi)3394; O2-NEXT:    movq $1, foo(%rip)3395; O2-NEXT:    retq3396;3397; O3-LABEL: atomic16_store_release:3398; O3:       # %bb.0: # %entry3399; O3-NEXT:    movq foo(%rip), %rax3400; O3-NEXT:  .Lpcsection101:3401; O3-NEXT:    movw $42, (%rdi)3402; O3-NEXT:    movq $1, foo(%rip)3403; O3-NEXT:    retq3404;3405; HASWELL-O3-LABEL: atomic16_store_release:3406; HASWELL-O3:       # %bb.0: # %entry3407; HASWELL-O3-NEXT:    movq foo(%rip), %rax3408; HASWELL-O3-NEXT:  .Lpcsection101:3409; HASWELL-O3-NEXT:    movw $42, (%rdi)3410; HASWELL-O3-NEXT:    movq $1, foo(%rip)3411; HASWELL-O3-NEXT:    retq3412entry:3413  load volatile i64, ptr @foo, align 83414  store atomic i16 42, ptr %a release, align 2, !pcsections !03415  store volatile i64 1, ptr @foo, align 83416  ret void3417}3418 3419define void @atomic16_store_seq_cst(ptr %a) {3420; O0-LABEL: atomic16_store_seq_cst:3421; O0:       # %bb.0: # %entry3422; O0-NEXT:    movq foo(%rip), %rax3423; O0-NEXT:    movw $42, %ax3424; O0-NEXT:  .Lpcsection107:3425; O0-NEXT:    xchgw %ax, (%rdi)3426; O0-NEXT:    movq $1, foo3427; O0-NEXT:    retq3428;3429; O1-LABEL: atomic16_store_seq_cst:3430; O1:       # %bb.0: # %entry3431; O1-NEXT:    movq foo(%rip), %rax3432; O1-NEXT:    movw $42, %ax3433; O1-NEXT:  .Lpcsection102:3434; O1-NEXT:    xchgw %ax, (%rdi)3435; O1-NEXT:    movq $1, foo(%rip)3436; O1-NEXT:    retq3437;3438; O2-LABEL: atomic16_store_seq_cst:3439; O2:       # %bb.0: # %entry3440; O2-NEXT:    movq foo(%rip), %rax3441; O2-NEXT:    movw $42, %ax3442; O2-NEXT:  .Lpcsection102:3443; O2-NEXT:    xchgw %ax, (%rdi)3444; O2-NEXT:    movq $1, foo(%rip)3445; O2-NEXT:    retq3446;3447; O3-LABEL: atomic16_store_seq_cst:3448; O3:       # %bb.0: # %entry3449; O3-NEXT:    movq foo(%rip), %rax3450; O3-NEXT:    movw $42, %ax3451; O3-NEXT:  .Lpcsection102:3452; O3-NEXT:    xchgw %ax, (%rdi)3453; O3-NEXT:    movq $1, foo(%rip)3454; O3-NEXT:    retq3455;3456; HASWELL-O3-LABEL: atomic16_store_seq_cst:3457; HASWELL-O3:       # %bb.0: # %entry3458; HASWELL-O3-NEXT:    movq foo(%rip), %rax3459; HASWELL-O3-NEXT:    movw $42, %ax3460; HASWELL-O3-NEXT:  .Lpcsection102:3461; HASWELL-O3-NEXT:    xchgw %ax, (%rdi)3462; HASWELL-O3-NEXT:    movq $1, foo(%rip)3463; HASWELL-O3-NEXT:    retq3464entry:3465  load volatile i64, ptr @foo, align 83466  store atomic i16 42, ptr %a seq_cst, align 2, !pcsections !03467  store volatile i64 1, ptr @foo, align 83468  ret void3469}3470 3471define void @atomic16_xchg_monotonic(ptr %a) {3472; O0-LABEL: atomic16_xchg_monotonic:3473; O0:       # %bb.0: # %entry3474; O0-NEXT:    movq foo(%rip), %rax3475; O0-NEXT:    movw $42, %ax3476; O0-NEXT:  .Lpcsection108:3477; O0-NEXT:    xchgw %ax, (%rdi)3478; O0-NEXT:    movq $1, foo3479; O0-NEXT:    retq3480;3481; O1-LABEL: atomic16_xchg_monotonic:3482; O1:       # %bb.0: # %entry3483; O1-NEXT:    movq foo(%rip), %rax3484; O1-NEXT:    movw $42, %ax3485; O1-NEXT:  .Lpcsection103:3486; O1-NEXT:    xchgw %ax, (%rdi)3487; O1-NEXT:    movq $1, foo(%rip)3488; O1-NEXT:    retq3489;3490; O2-LABEL: atomic16_xchg_monotonic:3491; O2:       # %bb.0: # %entry3492; O2-NEXT:    movq foo(%rip), %rax3493; O2-NEXT:    movw $42, %ax3494; O2-NEXT:  .Lpcsection103:3495; O2-NEXT:    xchgw %ax, (%rdi)3496; O2-NEXT:    movq $1, foo(%rip)3497; O2-NEXT:    retq3498;3499; O3-LABEL: atomic16_xchg_monotonic:3500; O3:       # %bb.0: # %entry3501; O3-NEXT:    movq foo(%rip), %rax3502; O3-NEXT:    movw $42, %ax3503; O3-NEXT:  .Lpcsection103:3504; O3-NEXT:    xchgw %ax, (%rdi)3505; O3-NEXT:    movq $1, foo(%rip)3506; O3-NEXT:    retq3507;3508; HASWELL-O3-LABEL: atomic16_xchg_monotonic:3509; HASWELL-O3:       # %bb.0: # %entry3510; HASWELL-O3-NEXT:    movq foo(%rip), %rax3511; HASWELL-O3-NEXT:    movw $42, %ax3512; HASWELL-O3-NEXT:  .Lpcsection103:3513; HASWELL-O3-NEXT:    xchgw %ax, (%rdi)3514; HASWELL-O3-NEXT:    movq $1, foo(%rip)3515; HASWELL-O3-NEXT:    retq3516entry:3517  load volatile i64, ptr @foo, align 83518  %x = atomicrmw xchg ptr %a, i16 42 monotonic, align 2, !pcsections !03519  store volatile i64 1, ptr @foo, align 83520  ret void3521}3522 3523define void @atomic16_add_monotonic(ptr %a) {3524; O0-LABEL: atomic16_add_monotonic:3525; O0:       # %bb.0: # %entry3526; O0-NEXT:    movq foo(%rip), %rax3527; O0-NEXT:  .Lpcsection109:3528; O0-NEXT:    lock addw $42, (%rdi)3529; O0-NEXT:    movq $1, foo3530; O0-NEXT:    retq3531;3532; O1-LABEL: atomic16_add_monotonic:3533; O1:       # %bb.0: # %entry3534; O1-NEXT:    movq foo(%rip), %rax3535; O1-NEXT:  .Lpcsection104:3536; O1-NEXT:    lock addw $42, (%rdi)3537; O1-NEXT:    movq $1, foo(%rip)3538; O1-NEXT:    retq3539;3540; O2-LABEL: atomic16_add_monotonic:3541; O2:       # %bb.0: # %entry3542; O2-NEXT:    movq foo(%rip), %rax3543; O2-NEXT:  .Lpcsection104:3544; O2-NEXT:    lock addw $42, (%rdi)3545; O2-NEXT:    movq $1, foo(%rip)3546; O2-NEXT:    retq3547;3548; O3-LABEL: atomic16_add_monotonic:3549; O3:       # %bb.0: # %entry3550; O3-NEXT:    movq foo(%rip), %rax3551; O3-NEXT:  .Lpcsection104:3552; O3-NEXT:    lock addw $42, (%rdi)3553; O3-NEXT:    movq $1, foo(%rip)3554; O3-NEXT:    retq3555;3556; HASWELL-O3-LABEL: atomic16_add_monotonic:3557; HASWELL-O3:       # %bb.0: # %entry3558; HASWELL-O3-NEXT:    movq foo(%rip), %rax3559; HASWELL-O3-NEXT:  .Lpcsection104:3560; HASWELL-O3-NEXT:    lock addw $42, (%rdi)3561; HASWELL-O3-NEXT:    movq $1, foo(%rip)3562; HASWELL-O3-NEXT:    retq3563entry:3564  load volatile i64, ptr @foo, align 83565  %x = atomicrmw add ptr %a, i16 42 monotonic, align 2, !pcsections !03566  store volatile i64 1, ptr @foo, align 83567  ret void3568}3569 3570define void @atomic16_sub_monotonic(ptr %a) {3571; O0-LABEL: atomic16_sub_monotonic:3572; O0:       # %bb.0: # %entry3573; O0-NEXT:    movq foo(%rip), %rax3574; O0-NEXT:  .Lpcsection110:3575; O0-NEXT:    lock subw $42, (%rdi)3576; O0-NEXT:    movq $1, foo3577; O0-NEXT:    retq3578;3579; O1-LABEL: atomic16_sub_monotonic:3580; O1:       # %bb.0: # %entry3581; O1-NEXT:    movq foo(%rip), %rax3582; O1-NEXT:  .Lpcsection105:3583; O1-NEXT:    lock subw $42, (%rdi)3584; O1-NEXT:    movq $1, foo(%rip)3585; O1-NEXT:    retq3586;3587; O2-LABEL: atomic16_sub_monotonic:3588; O2:       # %bb.0: # %entry3589; O2-NEXT:    movq foo(%rip), %rax3590; O2-NEXT:  .Lpcsection105:3591; O2-NEXT:    lock subw $42, (%rdi)3592; O2-NEXT:    movq $1, foo(%rip)3593; O2-NEXT:    retq3594;3595; O3-LABEL: atomic16_sub_monotonic:3596; O3:       # %bb.0: # %entry3597; O3-NEXT:    movq foo(%rip), %rax3598; O3-NEXT:  .Lpcsection105:3599; O3-NEXT:    lock subw $42, (%rdi)3600; O3-NEXT:    movq $1, foo(%rip)3601; O3-NEXT:    retq3602;3603; HASWELL-O3-LABEL: atomic16_sub_monotonic:3604; HASWELL-O3:       # %bb.0: # %entry3605; HASWELL-O3-NEXT:    movq foo(%rip), %rax3606; HASWELL-O3-NEXT:  .Lpcsection105:3607; HASWELL-O3-NEXT:    lock subw $42, (%rdi)3608; HASWELL-O3-NEXT:    movq $1, foo(%rip)3609; HASWELL-O3-NEXT:    retq3610entry:3611  load volatile i64, ptr @foo, align 83612  %x = atomicrmw sub ptr %a, i16 42 monotonic, align 2, !pcsections !03613  store volatile i64 1, ptr @foo, align 83614  ret void3615}3616 3617define void @atomic16_and_monotonic(ptr %a) {3618; O0-LABEL: atomic16_and_monotonic:3619; O0:       # %bb.0: # %entry3620; O0-NEXT:    movq foo(%rip), %rax3621; O0-NEXT:  .Lpcsection111:3622; O0-NEXT:    lock andw $42, (%rdi)3623; O0-NEXT:    movq $1, foo3624; O0-NEXT:    retq3625;3626; O1-LABEL: atomic16_and_monotonic:3627; O1:       # %bb.0: # %entry3628; O1-NEXT:    movq foo(%rip), %rax3629; O1-NEXT:  .Lpcsection106:3630; O1-NEXT:    lock andw $42, (%rdi)3631; O1-NEXT:    movq $1, foo(%rip)3632; O1-NEXT:    retq3633;3634; O2-LABEL: atomic16_and_monotonic:3635; O2:       # %bb.0: # %entry3636; O2-NEXT:    movq foo(%rip), %rax3637; O2-NEXT:  .Lpcsection106:3638; O2-NEXT:    lock andw $42, (%rdi)3639; O2-NEXT:    movq $1, foo(%rip)3640; O2-NEXT:    retq3641;3642; O3-LABEL: atomic16_and_monotonic:3643; O3:       # %bb.0: # %entry3644; O3-NEXT:    movq foo(%rip), %rax3645; O3-NEXT:  .Lpcsection106:3646; O3-NEXT:    lock andw $42, (%rdi)3647; O3-NEXT:    movq $1, foo(%rip)3648; O3-NEXT:    retq3649;3650; HASWELL-O3-LABEL: atomic16_and_monotonic:3651; HASWELL-O3:       # %bb.0: # %entry3652; HASWELL-O3-NEXT:    movq foo(%rip), %rax3653; HASWELL-O3-NEXT:  .Lpcsection106:3654; HASWELL-O3-NEXT:    lock andw $42, (%rdi)3655; HASWELL-O3-NEXT:    movq $1, foo(%rip)3656; HASWELL-O3-NEXT:    retq3657entry:3658  load volatile i64, ptr @foo, align 83659  %x = atomicrmw and ptr %a, i16 42 monotonic, align 2, !pcsections !03660  store volatile i64 1, ptr @foo, align 83661  ret void3662}3663 3664define void @atomic16_or_monotonic(ptr %a) {3665; O0-LABEL: atomic16_or_monotonic:3666; O0:       # %bb.0: # %entry3667; O0-NEXT:    movq foo(%rip), %rax3668; O0-NEXT:  .Lpcsection112:3669; O0-NEXT:    lock orw $42, (%rdi)3670; O0-NEXT:    movq $1, foo3671; O0-NEXT:    retq3672;3673; O1-LABEL: atomic16_or_monotonic:3674; O1:       # %bb.0: # %entry3675; O1-NEXT:    movq foo(%rip), %rax3676; O1-NEXT:  .Lpcsection107:3677; O1-NEXT:    lock orw $42, (%rdi)3678; O1-NEXT:    movq $1, foo(%rip)3679; O1-NEXT:    retq3680;3681; O2-LABEL: atomic16_or_monotonic:3682; O2:       # %bb.0: # %entry3683; O2-NEXT:    movq foo(%rip), %rax3684; O2-NEXT:  .Lpcsection107:3685; O2-NEXT:    lock orw $42, (%rdi)3686; O2-NEXT:    movq $1, foo(%rip)3687; O2-NEXT:    retq3688;3689; O3-LABEL: atomic16_or_monotonic:3690; O3:       # %bb.0: # %entry3691; O3-NEXT:    movq foo(%rip), %rax3692; O3-NEXT:  .Lpcsection107:3693; O3-NEXT:    lock orw $42, (%rdi)3694; O3-NEXT:    movq $1, foo(%rip)3695; O3-NEXT:    retq3696;3697; HASWELL-O3-LABEL: atomic16_or_monotonic:3698; HASWELL-O3:       # %bb.0: # %entry3699; HASWELL-O3-NEXT:    movq foo(%rip), %rax3700; HASWELL-O3-NEXT:  .Lpcsection107:3701; HASWELL-O3-NEXT:    lock orw $42, (%rdi)3702; HASWELL-O3-NEXT:    movq $1, foo(%rip)3703; HASWELL-O3-NEXT:    retq3704entry:3705  load volatile i64, ptr @foo, align 83706  %x = atomicrmw or ptr %a, i16 42 monotonic, align 2, !pcsections !03707  store volatile i64 1, ptr @foo, align 83708  ret void3709}3710 3711define void @atomic16_xor_monotonic(ptr %a) {3712; O0-LABEL: atomic16_xor_monotonic:3713; O0:       # %bb.0: # %entry3714; O0-NEXT:    movq foo(%rip), %rax3715; O0-NEXT:  .Lpcsection113:3716; O0-NEXT:    lock xorw $42, (%rdi)3717; O0-NEXT:    movq $1, foo3718; O0-NEXT:    retq3719;3720; O1-LABEL: atomic16_xor_monotonic:3721; O1:       # %bb.0: # %entry3722; O1-NEXT:    movq foo(%rip), %rax3723; O1-NEXT:  .Lpcsection108:3724; O1-NEXT:    lock xorw $42, (%rdi)3725; O1-NEXT:    movq $1, foo(%rip)3726; O1-NEXT:    retq3727;3728; O2-LABEL: atomic16_xor_monotonic:3729; O2:       # %bb.0: # %entry3730; O2-NEXT:    movq foo(%rip), %rax3731; O2-NEXT:  .Lpcsection108:3732; O2-NEXT:    lock xorw $42, (%rdi)3733; O2-NEXT:    movq $1, foo(%rip)3734; O2-NEXT:    retq3735;3736; O3-LABEL: atomic16_xor_monotonic:3737; O3:       # %bb.0: # %entry3738; O3-NEXT:    movq foo(%rip), %rax3739; O3-NEXT:  .Lpcsection108:3740; O3-NEXT:    lock xorw $42, (%rdi)3741; O3-NEXT:    movq $1, foo(%rip)3742; O3-NEXT:    retq3743;3744; HASWELL-O3-LABEL: atomic16_xor_monotonic:3745; HASWELL-O3:       # %bb.0: # %entry3746; HASWELL-O3-NEXT:    movq foo(%rip), %rax3747; HASWELL-O3-NEXT:  .Lpcsection108:3748; HASWELL-O3-NEXT:    lock xorw $42, (%rdi)3749; HASWELL-O3-NEXT:    movq $1, foo(%rip)3750; HASWELL-O3-NEXT:    retq3751entry:3752  load volatile i64, ptr @foo, align 83753  %x = atomicrmw xor ptr %a, i16 42 monotonic, align 2, !pcsections !03754  store volatile i64 1, ptr @foo, align 83755  ret void3756}3757 3758define void @atomic16_nand_monotonic(ptr %a) {3759; O0-LABEL: atomic16_nand_monotonic:3760; O0:       # %bb.0: # %entry3761; O0-NEXT:    movq %rdi, {{[-0-9]+}}(%r{{[sb]}}p) # 8-byte Spill3762; O0-NEXT:    movq foo, %rax3763; O0-NEXT:  .Lpcsection114:3764; O0-NEXT:    movw (%rdi), %ax3765; O0-NEXT:    movw %ax, {{[-0-9]+}}(%r{{[sb]}}p) # 2-byte Spill3766; O0-NEXT:  .LBB64_1: # %atomicrmw.start3767; O0-NEXT:    # =>This Inner Loop Header: Depth=13768; O0-NEXT:    movw {{[-0-9]+}}(%r{{[sb]}}p), %ax # 2-byte Reload3769; O0-NEXT:    movq {{[-0-9]+}}(%r{{[sb]}}p), %rcx # 8-byte Reload3770; O0-NEXT:  .Lpcsection115:3771; O0-NEXT:    # implicit-def: $edx3772; O0-NEXT:    movw %ax, %dx3773; O0-NEXT:  .Lpcsection116:3774; O0-NEXT:    notl %edx3775; O0-NEXT:  .Lpcsection117:3776; O0-NEXT:    orl $65493, %edx # imm = 0xFFD53777; O0-NEXT:  .Lpcsection118:3778; O0-NEXT:    # kill: def $dx killed $dx killed $edx3779; O0-NEXT:  .Lpcsection119:3780; O0-NEXT:    lock cmpxchgw %dx, (%rcx)3781; O0-NEXT:  .Lpcsection120:3782; O0-NEXT:    sete %cl3783; O0-NEXT:  .Lpcsection121:3784; O0-NEXT:    testb $1, %cl3785; O0-NEXT:    movw %ax, {{[-0-9]+}}(%r{{[sb]}}p) # 2-byte Spill3786; O0-NEXT:  .Lpcsection122:3787; O0-NEXT:    jne .LBB64_23788; O0-NEXT:    jmp .LBB64_13789; O0-NEXT:  .LBB64_2: # %atomicrmw.end3790; O0-NEXT:    movq $1, foo3791; O0-NEXT:    retq3792;3793; O1-LABEL: atomic16_nand_monotonic:3794; O1:       # %bb.0: # %entry3795; O1-NEXT:    movq foo(%rip), %rax3796; O1-NEXT:  .Lpcsection109:3797; O1-NEXT:    movzwl (%rdi), %eax3798; O1-NEXT:    .p2align 43799; O1-NEXT:  .LBB64_1: # %atomicrmw.start3800; O1-NEXT:    # =>This Inner Loop Header: Depth=13801; O1-NEXT:    movl %eax, %ecx3802; O1-NEXT:  .Lpcsection110:3803; O1-NEXT:    notl %ecx3804; O1-NEXT:  .Lpcsection111:3805; O1-NEXT:    orl $65493, %ecx # imm = 0xFFD53806; O1-NEXT:  .Lpcsection112:3807; O1-NEXT:    # kill: def $ax killed $ax killed $eax3808; O1-NEXT:  .Lpcsection113:3809; O1-NEXT:    lock cmpxchgw %cx, (%rdi)3810; O1-NEXT:  .Lpcsection114:3811; O1-NEXT:    # kill: def $ax killed $ax def $eax3812; O1-NEXT:  .Lpcsection115:3813; O1-NEXT:    jne .LBB64_13814; O1-NEXT:  # %bb.2: # %atomicrmw.end3815; O1-NEXT:    movq $1, foo(%rip)3816; O1-NEXT:    retq3817;3818; O2-LABEL: atomic16_nand_monotonic:3819; O2:       # %bb.0: # %entry3820; O2-NEXT:    movq foo(%rip), %rax3821; O2-NEXT:  .Lpcsection109:3822; O2-NEXT:    movzwl (%rdi), %eax3823; O2-NEXT:    .p2align 43824; O2-NEXT:  .LBB64_1: # %atomicrmw.start3825; O2-NEXT:    # =>This Inner Loop Header: Depth=13826; O2-NEXT:    movl %eax, %ecx3827; O2-NEXT:  .Lpcsection110:3828; O2-NEXT:    notl %ecx3829; O2-NEXT:  .Lpcsection111:3830; O2-NEXT:    orl $65493, %ecx # imm = 0xFFD53831; O2-NEXT:  .Lpcsection112:3832; O2-NEXT:    # kill: def $ax killed $ax killed $eax3833; O2-NEXT:  .Lpcsection113:3834; O2-NEXT:    lock cmpxchgw %cx, (%rdi)3835; O2-NEXT:  .Lpcsection114:3836; O2-NEXT:    # kill: def $ax killed $ax def $eax3837; O2-NEXT:  .Lpcsection115:3838; O2-NEXT:    jne .LBB64_13839; O2-NEXT:  # %bb.2: # %atomicrmw.end3840; O2-NEXT:    movq $1, foo(%rip)3841; O2-NEXT:    retq3842;3843; O3-LABEL: atomic16_nand_monotonic:3844; O3:       # %bb.0: # %entry3845; O3-NEXT:    movq foo(%rip), %rax3846; O3-NEXT:  .Lpcsection109:3847; O3-NEXT:    movzwl (%rdi), %eax3848; O3-NEXT:    .p2align 43849; O3-NEXT:  .LBB64_1: # %atomicrmw.start3850; O3-NEXT:    # =>This Inner Loop Header: Depth=13851; O3-NEXT:    movl %eax, %ecx3852; O3-NEXT:  .Lpcsection110:3853; O3-NEXT:    notl %ecx3854; O3-NEXT:  .Lpcsection111:3855; O3-NEXT:    orl $65493, %ecx # imm = 0xFFD53856; O3-NEXT:  .Lpcsection112:3857; O3-NEXT:    # kill: def $ax killed $ax killed $eax3858; O3-NEXT:  .Lpcsection113:3859; O3-NEXT:    lock cmpxchgw %cx, (%rdi)3860; O3-NEXT:  .Lpcsection114:3861; O3-NEXT:    # kill: def $ax killed $ax def $eax3862; O3-NEXT:  .Lpcsection115:3863; O3-NEXT:    jne .LBB64_13864; O3-NEXT:  # %bb.2: # %atomicrmw.end3865; O3-NEXT:    movq $1, foo(%rip)3866; O3-NEXT:    retq3867;3868; HASWELL-O3-LABEL: atomic16_nand_monotonic:3869; HASWELL-O3:       # %bb.0: # %entry3870; HASWELL-O3-NEXT:    movq foo(%rip), %rax3871; HASWELL-O3-NEXT:  .Lpcsection109:3872; HASWELL-O3-NEXT:    movzwl (%rdi), %eax3873; HASWELL-O3-NEXT:    .p2align 43874; HASWELL-O3-NEXT:  .LBB64_1: # %atomicrmw.start3875; HASWELL-O3-NEXT:    # =>This Inner Loop Header: Depth=13876; HASWELL-O3-NEXT:    movl %eax, %ecx3877; HASWELL-O3-NEXT:  .Lpcsection110:3878; HASWELL-O3-NEXT:    notl %ecx3879; HASWELL-O3-NEXT:  .Lpcsection111:3880; HASWELL-O3-NEXT:    orl $65493, %ecx # imm = 0xFFD53881; HASWELL-O3-NEXT:  .Lpcsection112:3882; HASWELL-O3-NEXT:    # kill: def $ax killed $ax killed $eax3883; HASWELL-O3-NEXT:  .Lpcsection113:3884; HASWELL-O3-NEXT:    lock cmpxchgw %cx, (%rdi)3885; HASWELL-O3-NEXT:  .Lpcsection114:3886; HASWELL-O3-NEXT:    # kill: def $ax killed $ax def $eax3887; HASWELL-O3-NEXT:  .Lpcsection115:3888; HASWELL-O3-NEXT:    jne .LBB64_13889; HASWELL-O3-NEXT:  # %bb.2: # %atomicrmw.end3890; HASWELL-O3-NEXT:    movq $1, foo(%rip)3891; HASWELL-O3-NEXT:    retq3892entry:3893  load volatile i64, ptr @foo, align 83894  %x = atomicrmw nand ptr %a, i16 42 monotonic, align 2, !pcsections !03895  store volatile i64 1, ptr @foo, align 83896  ret void3897}3898 3899define void @atomic16_xchg_acquire(ptr %a) {3900; O0-LABEL: atomic16_xchg_acquire:3901; O0:       # %bb.0: # %entry3902; O0-NEXT:    movq foo(%rip), %rax3903; O0-NEXT:    movw $42, %ax3904; O0-NEXT:  .Lpcsection123:3905; O0-NEXT:    xchgw %ax, (%rdi)3906; O0-NEXT:    movq $1, foo3907; O0-NEXT:    retq3908;3909; O1-LABEL: atomic16_xchg_acquire:3910; O1:       # %bb.0: # %entry3911; O1-NEXT:    movq foo(%rip), %rax3912; O1-NEXT:    movw $42, %ax3913; O1-NEXT:  .Lpcsection116:3914; O1-NEXT:    xchgw %ax, (%rdi)3915; O1-NEXT:    movq $1, foo(%rip)3916; O1-NEXT:    retq3917;3918; O2-LABEL: atomic16_xchg_acquire:3919; O2:       # %bb.0: # %entry3920; O2-NEXT:    movq foo(%rip), %rax3921; O2-NEXT:    movw $42, %ax3922; O2-NEXT:  .Lpcsection116:3923; O2-NEXT:    xchgw %ax, (%rdi)3924; O2-NEXT:    movq $1, foo(%rip)3925; O2-NEXT:    retq3926;3927; O3-LABEL: atomic16_xchg_acquire:3928; O3:       # %bb.0: # %entry3929; O3-NEXT:    movq foo(%rip), %rax3930; O3-NEXT:    movw $42, %ax3931; O3-NEXT:  .Lpcsection116:3932; O3-NEXT:    xchgw %ax, (%rdi)3933; O3-NEXT:    movq $1, foo(%rip)3934; O3-NEXT:    retq3935;3936; HASWELL-O3-LABEL: atomic16_xchg_acquire:3937; HASWELL-O3:       # %bb.0: # %entry3938; HASWELL-O3-NEXT:    movq foo(%rip), %rax3939; HASWELL-O3-NEXT:    movw $42, %ax3940; HASWELL-O3-NEXT:  .Lpcsection116:3941; HASWELL-O3-NEXT:    xchgw %ax, (%rdi)3942; HASWELL-O3-NEXT:    movq $1, foo(%rip)3943; HASWELL-O3-NEXT:    retq3944entry:3945  load volatile i64, ptr @foo, align 83946  %x = atomicrmw xchg ptr %a, i16 42 acquire, align 2, !pcsections !03947  store volatile i64 1, ptr @foo, align 83948  ret void3949}3950 3951define void @atomic16_add_acquire(ptr %a) {3952; O0-LABEL: atomic16_add_acquire:3953; O0:       # %bb.0: # %entry3954; O0-NEXT:    movq foo(%rip), %rax3955; O0-NEXT:  .Lpcsection124:3956; O0-NEXT:    lock addw $42, (%rdi)3957; O0-NEXT:    movq $1, foo3958; O0-NEXT:    retq3959;3960; O1-LABEL: atomic16_add_acquire:3961; O1:       # %bb.0: # %entry3962; O1-NEXT:    movq foo(%rip), %rax3963; O1-NEXT:  .Lpcsection117:3964; O1-NEXT:    lock addw $42, (%rdi)3965; O1-NEXT:    movq $1, foo(%rip)3966; O1-NEXT:    retq3967;3968; O2-LABEL: atomic16_add_acquire:3969; O2:       # %bb.0: # %entry3970; O2-NEXT:    movq foo(%rip), %rax3971; O2-NEXT:  .Lpcsection117:3972; O2-NEXT:    lock addw $42, (%rdi)3973; O2-NEXT:    movq $1, foo(%rip)3974; O2-NEXT:    retq3975;3976; O3-LABEL: atomic16_add_acquire:3977; O3:       # %bb.0: # %entry3978; O3-NEXT:    movq foo(%rip), %rax3979; O3-NEXT:  .Lpcsection117:3980; O3-NEXT:    lock addw $42, (%rdi)3981; O3-NEXT:    movq $1, foo(%rip)3982; O3-NEXT:    retq3983;3984; HASWELL-O3-LABEL: atomic16_add_acquire:3985; HASWELL-O3:       # %bb.0: # %entry3986; HASWELL-O3-NEXT:    movq foo(%rip), %rax3987; HASWELL-O3-NEXT:  .Lpcsection117:3988; HASWELL-O3-NEXT:    lock addw $42, (%rdi)3989; HASWELL-O3-NEXT:    movq $1, foo(%rip)3990; HASWELL-O3-NEXT:    retq3991entry:3992  load volatile i64, ptr @foo, align 83993  %x = atomicrmw add ptr %a, i16 42 acquire, align 2, !pcsections !03994  store volatile i64 1, ptr @foo, align 83995  ret void3996}3997 3998define void @atomic16_sub_acquire(ptr %a) {3999; O0-LABEL: atomic16_sub_acquire:4000; O0:       # %bb.0: # %entry4001; O0-NEXT:    movq foo(%rip), %rax4002; O0-NEXT:  .Lpcsection125:4003; O0-NEXT:    lock subw $42, (%rdi)4004; O0-NEXT:    movq $1, foo4005; O0-NEXT:    retq4006;4007; O1-LABEL: atomic16_sub_acquire:4008; O1:       # %bb.0: # %entry4009; O1-NEXT:    movq foo(%rip), %rax4010; O1-NEXT:  .Lpcsection118:4011; O1-NEXT:    lock subw $42, (%rdi)4012; O1-NEXT:    movq $1, foo(%rip)4013; O1-NEXT:    retq4014;4015; O2-LABEL: atomic16_sub_acquire:4016; O2:       # %bb.0: # %entry4017; O2-NEXT:    movq foo(%rip), %rax4018; O2-NEXT:  .Lpcsection118:4019; O2-NEXT:    lock subw $42, (%rdi)4020; O2-NEXT:    movq $1, foo(%rip)4021; O2-NEXT:    retq4022;4023; O3-LABEL: atomic16_sub_acquire:4024; O3:       # %bb.0: # %entry4025; O3-NEXT:    movq foo(%rip), %rax4026; O3-NEXT:  .Lpcsection118:4027; O3-NEXT:    lock subw $42, (%rdi)4028; O3-NEXT:    movq $1, foo(%rip)4029; O3-NEXT:    retq4030;4031; HASWELL-O3-LABEL: atomic16_sub_acquire:4032; HASWELL-O3:       # %bb.0: # %entry4033; HASWELL-O3-NEXT:    movq foo(%rip), %rax4034; HASWELL-O3-NEXT:  .Lpcsection118:4035; HASWELL-O3-NEXT:    lock subw $42, (%rdi)4036; HASWELL-O3-NEXT:    movq $1, foo(%rip)4037; HASWELL-O3-NEXT:    retq4038entry:4039  load volatile i64, ptr @foo, align 84040  %x = atomicrmw sub ptr %a, i16 42 acquire, align 2, !pcsections !04041  store volatile i64 1, ptr @foo, align 84042  ret void4043}4044 4045define void @atomic16_and_acquire(ptr %a) {4046; O0-LABEL: atomic16_and_acquire:4047; O0:       # %bb.0: # %entry4048; O0-NEXT:    movq foo(%rip), %rax4049; O0-NEXT:  .Lpcsection126:4050; O0-NEXT:    lock andw $42, (%rdi)4051; O0-NEXT:    movq $1, foo4052; O0-NEXT:    retq4053;4054; O1-LABEL: atomic16_and_acquire:4055; O1:       # %bb.0: # %entry4056; O1-NEXT:    movq foo(%rip), %rax4057; O1-NEXT:  .Lpcsection119:4058; O1-NEXT:    lock andw $42, (%rdi)4059; O1-NEXT:    movq $1, foo(%rip)4060; O1-NEXT:    retq4061;4062; O2-LABEL: atomic16_and_acquire:4063; O2:       # %bb.0: # %entry4064; O2-NEXT:    movq foo(%rip), %rax4065; O2-NEXT:  .Lpcsection119:4066; O2-NEXT:    lock andw $42, (%rdi)4067; O2-NEXT:    movq $1, foo(%rip)4068; O2-NEXT:    retq4069;4070; O3-LABEL: atomic16_and_acquire:4071; O3:       # %bb.0: # %entry4072; O3-NEXT:    movq foo(%rip), %rax4073; O3-NEXT:  .Lpcsection119:4074; O3-NEXT:    lock andw $42, (%rdi)4075; O3-NEXT:    movq $1, foo(%rip)4076; O3-NEXT:    retq4077;4078; HASWELL-O3-LABEL: atomic16_and_acquire:4079; HASWELL-O3:       # %bb.0: # %entry4080; HASWELL-O3-NEXT:    movq foo(%rip), %rax4081; HASWELL-O3-NEXT:  .Lpcsection119:4082; HASWELL-O3-NEXT:    lock andw $42, (%rdi)4083; HASWELL-O3-NEXT:    movq $1, foo(%rip)4084; HASWELL-O3-NEXT:    retq4085entry:4086  load volatile i64, ptr @foo, align 84087  %x = atomicrmw and ptr %a, i16 42 acquire, align 2, !pcsections !04088  store volatile i64 1, ptr @foo, align 84089  ret void4090}4091 4092define void @atomic16_or_acquire(ptr %a) {4093; O0-LABEL: atomic16_or_acquire:4094; O0:       # %bb.0: # %entry4095; O0-NEXT:    movq foo(%rip), %rax4096; O0-NEXT:  .Lpcsection127:4097; O0-NEXT:    lock orw $42, (%rdi)4098; O0-NEXT:    movq $1, foo4099; O0-NEXT:    retq4100;4101; O1-LABEL: atomic16_or_acquire:4102; O1:       # %bb.0: # %entry4103; O1-NEXT:    movq foo(%rip), %rax4104; O1-NEXT:  .Lpcsection120:4105; O1-NEXT:    lock orw $42, (%rdi)4106; O1-NEXT:    movq $1, foo(%rip)4107; O1-NEXT:    retq4108;4109; O2-LABEL: atomic16_or_acquire:4110; O2:       # %bb.0: # %entry4111; O2-NEXT:    movq foo(%rip), %rax4112; O2-NEXT:  .Lpcsection120:4113; O2-NEXT:    lock orw $42, (%rdi)4114; O2-NEXT:    movq $1, foo(%rip)4115; O2-NEXT:    retq4116;4117; O3-LABEL: atomic16_or_acquire:4118; O3:       # %bb.0: # %entry4119; O3-NEXT:    movq foo(%rip), %rax4120; O3-NEXT:  .Lpcsection120:4121; O3-NEXT:    lock orw $42, (%rdi)4122; O3-NEXT:    movq $1, foo(%rip)4123; O3-NEXT:    retq4124;4125; HASWELL-O3-LABEL: atomic16_or_acquire:4126; HASWELL-O3:       # %bb.0: # %entry4127; HASWELL-O3-NEXT:    movq foo(%rip), %rax4128; HASWELL-O3-NEXT:  .Lpcsection120:4129; HASWELL-O3-NEXT:    lock orw $42, (%rdi)4130; HASWELL-O3-NEXT:    movq $1, foo(%rip)4131; HASWELL-O3-NEXT:    retq4132entry:4133  load volatile i64, ptr @foo, align 84134  %x = atomicrmw or ptr %a, i16 42 acquire, align 2, !pcsections !04135  store volatile i64 1, ptr @foo, align 84136  ret void4137}4138 4139define void @atomic16_xor_acquire(ptr %a) {4140; O0-LABEL: atomic16_xor_acquire:4141; O0:       # %bb.0: # %entry4142; O0-NEXT:    movq foo(%rip), %rax4143; O0-NEXT:  .Lpcsection128:4144; O0-NEXT:    lock xorw $42, (%rdi)4145; O0-NEXT:    movq $1, foo4146; O0-NEXT:    retq4147;4148; O1-LABEL: atomic16_xor_acquire:4149; O1:       # %bb.0: # %entry4150; O1-NEXT:    movq foo(%rip), %rax4151; O1-NEXT:  .Lpcsection121:4152; O1-NEXT:    lock xorw $42, (%rdi)4153; O1-NEXT:    movq $1, foo(%rip)4154; O1-NEXT:    retq4155;4156; O2-LABEL: atomic16_xor_acquire:4157; O2:       # %bb.0: # %entry4158; O2-NEXT:    movq foo(%rip), %rax4159; O2-NEXT:  .Lpcsection121:4160; O2-NEXT:    lock xorw $42, (%rdi)4161; O2-NEXT:    movq $1, foo(%rip)4162; O2-NEXT:    retq4163;4164; O3-LABEL: atomic16_xor_acquire:4165; O3:       # %bb.0: # %entry4166; O3-NEXT:    movq foo(%rip), %rax4167; O3-NEXT:  .Lpcsection121:4168; O3-NEXT:    lock xorw $42, (%rdi)4169; O3-NEXT:    movq $1, foo(%rip)4170; O3-NEXT:    retq4171;4172; HASWELL-O3-LABEL: atomic16_xor_acquire:4173; HASWELL-O3:       # %bb.0: # %entry4174; HASWELL-O3-NEXT:    movq foo(%rip), %rax4175; HASWELL-O3-NEXT:  .Lpcsection121:4176; HASWELL-O3-NEXT:    lock xorw $42, (%rdi)4177; HASWELL-O3-NEXT:    movq $1, foo(%rip)4178; HASWELL-O3-NEXT:    retq4179entry:4180  load volatile i64, ptr @foo, align 84181  %x = atomicrmw xor ptr %a, i16 42 acquire, align 2, !pcsections !04182  store volatile i64 1, ptr @foo, align 84183  ret void4184}4185 4186define void @atomic16_nand_acquire(ptr %a) {4187; O0-LABEL: atomic16_nand_acquire:4188; O0:       # %bb.0: # %entry4189; O0-NEXT:    movq %rdi, {{[-0-9]+}}(%r{{[sb]}}p) # 8-byte Spill4190; O0-NEXT:    movq foo, %rax4191; O0-NEXT:  .Lpcsection129:4192; O0-NEXT:    movw (%rdi), %ax4193; O0-NEXT:    movw %ax, {{[-0-9]+}}(%r{{[sb]}}p) # 2-byte Spill4194; O0-NEXT:  .LBB71_1: # %atomicrmw.start4195; O0-NEXT:    # =>This Inner Loop Header: Depth=14196; O0-NEXT:    movw {{[-0-9]+}}(%r{{[sb]}}p), %ax # 2-byte Reload4197; O0-NEXT:    movq {{[-0-9]+}}(%r{{[sb]}}p), %rcx # 8-byte Reload4198; O0-NEXT:  .Lpcsection130:4199; O0-NEXT:    # implicit-def: $edx4200; O0-NEXT:    movw %ax, %dx4201; O0-NEXT:  .Lpcsection131:4202; O0-NEXT:    notl %edx4203; O0-NEXT:  .Lpcsection132:4204; O0-NEXT:    orl $65493, %edx # imm = 0xFFD54205; O0-NEXT:  .Lpcsection133:4206; O0-NEXT:    # kill: def $dx killed $dx killed $edx4207; O0-NEXT:  .Lpcsection134:4208; O0-NEXT:    lock cmpxchgw %dx, (%rcx)4209; O0-NEXT:  .Lpcsection135:4210; O0-NEXT:    sete %cl4211; O0-NEXT:  .Lpcsection136:4212; O0-NEXT:    testb $1, %cl4213; O0-NEXT:    movw %ax, {{[-0-9]+}}(%r{{[sb]}}p) # 2-byte Spill4214; O0-NEXT:  .Lpcsection137:4215; O0-NEXT:    jne .LBB71_24216; O0-NEXT:    jmp .LBB71_14217; O0-NEXT:  .LBB71_2: # %atomicrmw.end4218; O0-NEXT:    movq $1, foo4219; O0-NEXT:    retq4220;4221; O1-LABEL: atomic16_nand_acquire:4222; O1:       # %bb.0: # %entry4223; O1-NEXT:    movq foo(%rip), %rax4224; O1-NEXT:  .Lpcsection122:4225; O1-NEXT:    movzwl (%rdi), %eax4226; O1-NEXT:    .p2align 44227; O1-NEXT:  .LBB71_1: # %atomicrmw.start4228; O1-NEXT:    # =>This Inner Loop Header: Depth=14229; O1-NEXT:    movl %eax, %ecx4230; O1-NEXT:  .Lpcsection123:4231; O1-NEXT:    notl %ecx4232; O1-NEXT:  .Lpcsection124:4233; O1-NEXT:    orl $65493, %ecx # imm = 0xFFD54234; O1-NEXT:  .Lpcsection125:4235; O1-NEXT:    # kill: def $ax killed $ax killed $eax4236; O1-NEXT:  .Lpcsection126:4237; O1-NEXT:    lock cmpxchgw %cx, (%rdi)4238; O1-NEXT:  .Lpcsection127:4239; O1-NEXT:    # kill: def $ax killed $ax def $eax4240; O1-NEXT:  .Lpcsection128:4241; O1-NEXT:    jne .LBB71_14242; O1-NEXT:  # %bb.2: # %atomicrmw.end4243; O1-NEXT:    movq $1, foo(%rip)4244; O1-NEXT:    retq4245;4246; O2-LABEL: atomic16_nand_acquire:4247; O2:       # %bb.0: # %entry4248; O2-NEXT:    movq foo(%rip), %rax4249; O2-NEXT:  .Lpcsection122:4250; O2-NEXT:    movzwl (%rdi), %eax4251; O2-NEXT:    .p2align 44252; O2-NEXT:  .LBB71_1: # %atomicrmw.start4253; O2-NEXT:    # =>This Inner Loop Header: Depth=14254; O2-NEXT:    movl %eax, %ecx4255; O2-NEXT:  .Lpcsection123:4256; O2-NEXT:    notl %ecx4257; O2-NEXT:  .Lpcsection124:4258; O2-NEXT:    orl $65493, %ecx # imm = 0xFFD54259; O2-NEXT:  .Lpcsection125:4260; O2-NEXT:    # kill: def $ax killed $ax killed $eax4261; O2-NEXT:  .Lpcsection126:4262; O2-NEXT:    lock cmpxchgw %cx, (%rdi)4263; O2-NEXT:  .Lpcsection127:4264; O2-NEXT:    # kill: def $ax killed $ax def $eax4265; O2-NEXT:  .Lpcsection128:4266; O2-NEXT:    jne .LBB71_14267; O2-NEXT:  # %bb.2: # %atomicrmw.end4268; O2-NEXT:    movq $1, foo(%rip)4269; O2-NEXT:    retq4270;4271; O3-LABEL: atomic16_nand_acquire:4272; O3:       # %bb.0: # %entry4273; O3-NEXT:    movq foo(%rip), %rax4274; O3-NEXT:  .Lpcsection122:4275; O3-NEXT:    movzwl (%rdi), %eax4276; O3-NEXT:    .p2align 44277; O3-NEXT:  .LBB71_1: # %atomicrmw.start4278; O3-NEXT:    # =>This Inner Loop Header: Depth=14279; O3-NEXT:    movl %eax, %ecx4280; O3-NEXT:  .Lpcsection123:4281; O3-NEXT:    notl %ecx4282; O3-NEXT:  .Lpcsection124:4283; O3-NEXT:    orl $65493, %ecx # imm = 0xFFD54284; O3-NEXT:  .Lpcsection125:4285; O3-NEXT:    # kill: def $ax killed $ax killed $eax4286; O3-NEXT:  .Lpcsection126:4287; O3-NEXT:    lock cmpxchgw %cx, (%rdi)4288; O3-NEXT:  .Lpcsection127:4289; O3-NEXT:    # kill: def $ax killed $ax def $eax4290; O3-NEXT:  .Lpcsection128:4291; O3-NEXT:    jne .LBB71_14292; O3-NEXT:  # %bb.2: # %atomicrmw.end4293; O3-NEXT:    movq $1, foo(%rip)4294; O3-NEXT:    retq4295;4296; HASWELL-O3-LABEL: atomic16_nand_acquire:4297; HASWELL-O3:       # %bb.0: # %entry4298; HASWELL-O3-NEXT:    movq foo(%rip), %rax4299; HASWELL-O3-NEXT:  .Lpcsection122:4300; HASWELL-O3-NEXT:    movzwl (%rdi), %eax4301; HASWELL-O3-NEXT:    .p2align 44302; HASWELL-O3-NEXT:  .LBB71_1: # %atomicrmw.start4303; HASWELL-O3-NEXT:    # =>This Inner Loop Header: Depth=14304; HASWELL-O3-NEXT:    movl %eax, %ecx4305; HASWELL-O3-NEXT:  .Lpcsection123:4306; HASWELL-O3-NEXT:    notl %ecx4307; HASWELL-O3-NEXT:  .Lpcsection124:4308; HASWELL-O3-NEXT:    orl $65493, %ecx # imm = 0xFFD54309; HASWELL-O3-NEXT:  .Lpcsection125:4310; HASWELL-O3-NEXT:    # kill: def $ax killed $ax killed $eax4311; HASWELL-O3-NEXT:  .Lpcsection126:4312; HASWELL-O3-NEXT:    lock cmpxchgw %cx, (%rdi)4313; HASWELL-O3-NEXT:  .Lpcsection127:4314; HASWELL-O3-NEXT:    # kill: def $ax killed $ax def $eax4315; HASWELL-O3-NEXT:  .Lpcsection128:4316; HASWELL-O3-NEXT:    jne .LBB71_14317; HASWELL-O3-NEXT:  # %bb.2: # %atomicrmw.end4318; HASWELL-O3-NEXT:    movq $1, foo(%rip)4319; HASWELL-O3-NEXT:    retq4320entry:4321  load volatile i64, ptr @foo, align 84322  %x = atomicrmw nand ptr %a, i16 42 acquire, align 2, !pcsections !04323  store volatile i64 1, ptr @foo, align 84324  ret void4325}4326 4327define void @atomic16_xchg_release(ptr %a) {4328; O0-LABEL: atomic16_xchg_release:4329; O0:       # %bb.0: # %entry4330; O0-NEXT:    movq foo(%rip), %rax4331; O0-NEXT:    movw $42, %ax4332; O0-NEXT:  .Lpcsection138:4333; O0-NEXT:    xchgw %ax, (%rdi)4334; O0-NEXT:    movq $1, foo4335; O0-NEXT:    retq4336;4337; O1-LABEL: atomic16_xchg_release:4338; O1:       # %bb.0: # %entry4339; O1-NEXT:    movq foo(%rip), %rax4340; O1-NEXT:    movw $42, %ax4341; O1-NEXT:  .Lpcsection129:4342; O1-NEXT:    xchgw %ax, (%rdi)4343; O1-NEXT:    movq $1, foo(%rip)4344; O1-NEXT:    retq4345;4346; O2-LABEL: atomic16_xchg_release:4347; O2:       # %bb.0: # %entry4348; O2-NEXT:    movq foo(%rip), %rax4349; O2-NEXT:    movw $42, %ax4350; O2-NEXT:  .Lpcsection129:4351; O2-NEXT:    xchgw %ax, (%rdi)4352; O2-NEXT:    movq $1, foo(%rip)4353; O2-NEXT:    retq4354;4355; O3-LABEL: atomic16_xchg_release:4356; O3:       # %bb.0: # %entry4357; O3-NEXT:    movq foo(%rip), %rax4358; O3-NEXT:    movw $42, %ax4359; O3-NEXT:  .Lpcsection129:4360; O3-NEXT:    xchgw %ax, (%rdi)4361; O3-NEXT:    movq $1, foo(%rip)4362; O3-NEXT:    retq4363;4364; HASWELL-O3-LABEL: atomic16_xchg_release:4365; HASWELL-O3:       # %bb.0: # %entry4366; HASWELL-O3-NEXT:    movq foo(%rip), %rax4367; HASWELL-O3-NEXT:    movw $42, %ax4368; HASWELL-O3-NEXT:  .Lpcsection129:4369; HASWELL-O3-NEXT:    xchgw %ax, (%rdi)4370; HASWELL-O3-NEXT:    movq $1, foo(%rip)4371; HASWELL-O3-NEXT:    retq4372entry:4373  load volatile i64, ptr @foo, align 84374  %x = atomicrmw xchg ptr %a, i16 42 release, align 2, !pcsections !04375  store volatile i64 1, ptr @foo, align 84376  ret void4377}4378 4379define void @atomic16_add_release(ptr %a) {4380; O0-LABEL: atomic16_add_release:4381; O0:       # %bb.0: # %entry4382; O0-NEXT:    movq foo(%rip), %rax4383; O0-NEXT:  .Lpcsection139:4384; O0-NEXT:    lock addw $42, (%rdi)4385; O0-NEXT:    movq $1, foo4386; O0-NEXT:    retq4387;4388; O1-LABEL: atomic16_add_release:4389; O1:       # %bb.0: # %entry4390; O1-NEXT:    movq foo(%rip), %rax4391; O1-NEXT:  .Lpcsection130:4392; O1-NEXT:    lock addw $42, (%rdi)4393; O1-NEXT:    movq $1, foo(%rip)4394; O1-NEXT:    retq4395;4396; O2-LABEL: atomic16_add_release:4397; O2:       # %bb.0: # %entry4398; O2-NEXT:    movq foo(%rip), %rax4399; O2-NEXT:  .Lpcsection130:4400; O2-NEXT:    lock addw $42, (%rdi)4401; O2-NEXT:    movq $1, foo(%rip)4402; O2-NEXT:    retq4403;4404; O3-LABEL: atomic16_add_release:4405; O3:       # %bb.0: # %entry4406; O3-NEXT:    movq foo(%rip), %rax4407; O3-NEXT:  .Lpcsection130:4408; O3-NEXT:    lock addw $42, (%rdi)4409; O3-NEXT:    movq $1, foo(%rip)4410; O3-NEXT:    retq4411;4412; HASWELL-O3-LABEL: atomic16_add_release:4413; HASWELL-O3:       # %bb.0: # %entry4414; HASWELL-O3-NEXT:    movq foo(%rip), %rax4415; HASWELL-O3-NEXT:  .Lpcsection130:4416; HASWELL-O3-NEXT:    lock addw $42, (%rdi)4417; HASWELL-O3-NEXT:    movq $1, foo(%rip)4418; HASWELL-O3-NEXT:    retq4419entry:4420  load volatile i64, ptr @foo, align 84421  %x = atomicrmw add ptr %a, i16 42 release, align 2, !pcsections !04422  store volatile i64 1, ptr @foo, align 84423  ret void4424}4425 4426define void @atomic16_sub_release(ptr %a) {4427; O0-LABEL: atomic16_sub_release:4428; O0:       # %bb.0: # %entry4429; O0-NEXT:    movq foo(%rip), %rax4430; O0-NEXT:  .Lpcsection140:4431; O0-NEXT:    lock subw $42, (%rdi)4432; O0-NEXT:    movq $1, foo4433; O0-NEXT:    retq4434;4435; O1-LABEL: atomic16_sub_release:4436; O1:       # %bb.0: # %entry4437; O1-NEXT:    movq foo(%rip), %rax4438; O1-NEXT:  .Lpcsection131:4439; O1-NEXT:    lock subw $42, (%rdi)4440; O1-NEXT:    movq $1, foo(%rip)4441; O1-NEXT:    retq4442;4443; O2-LABEL: atomic16_sub_release:4444; O2:       # %bb.0: # %entry4445; O2-NEXT:    movq foo(%rip), %rax4446; O2-NEXT:  .Lpcsection131:4447; O2-NEXT:    lock subw $42, (%rdi)4448; O2-NEXT:    movq $1, foo(%rip)4449; O2-NEXT:    retq4450;4451; O3-LABEL: atomic16_sub_release:4452; O3:       # %bb.0: # %entry4453; O3-NEXT:    movq foo(%rip), %rax4454; O3-NEXT:  .Lpcsection131:4455; O3-NEXT:    lock subw $42, (%rdi)4456; O3-NEXT:    movq $1, foo(%rip)4457; O3-NEXT:    retq4458;4459; HASWELL-O3-LABEL: atomic16_sub_release:4460; HASWELL-O3:       # %bb.0: # %entry4461; HASWELL-O3-NEXT:    movq foo(%rip), %rax4462; HASWELL-O3-NEXT:  .Lpcsection131:4463; HASWELL-O3-NEXT:    lock subw $42, (%rdi)4464; HASWELL-O3-NEXT:    movq $1, foo(%rip)4465; HASWELL-O3-NEXT:    retq4466entry:4467  load volatile i64, ptr @foo, align 84468  %x = atomicrmw sub ptr %a, i16 42 release, align 2, !pcsections !04469  store volatile i64 1, ptr @foo, align 84470  ret void4471}4472 4473define void @atomic16_and_release(ptr %a) {4474; O0-LABEL: atomic16_and_release:4475; O0:       # %bb.0: # %entry4476; O0-NEXT:    movq foo(%rip), %rax4477; O0-NEXT:  .Lpcsection141:4478; O0-NEXT:    lock andw $42, (%rdi)4479; O0-NEXT:    movq $1, foo4480; O0-NEXT:    retq4481;4482; O1-LABEL: atomic16_and_release:4483; O1:       # %bb.0: # %entry4484; O1-NEXT:    movq foo(%rip), %rax4485; O1-NEXT:  .Lpcsection132:4486; O1-NEXT:    lock andw $42, (%rdi)4487; O1-NEXT:    movq $1, foo(%rip)4488; O1-NEXT:    retq4489;4490; O2-LABEL: atomic16_and_release:4491; O2:       # %bb.0: # %entry4492; O2-NEXT:    movq foo(%rip), %rax4493; O2-NEXT:  .Lpcsection132:4494; O2-NEXT:    lock andw $42, (%rdi)4495; O2-NEXT:    movq $1, foo(%rip)4496; O2-NEXT:    retq4497;4498; O3-LABEL: atomic16_and_release:4499; O3:       # %bb.0: # %entry4500; O3-NEXT:    movq foo(%rip), %rax4501; O3-NEXT:  .Lpcsection132:4502; O3-NEXT:    lock andw $42, (%rdi)4503; O3-NEXT:    movq $1, foo(%rip)4504; O3-NEXT:    retq4505;4506; HASWELL-O3-LABEL: atomic16_and_release:4507; HASWELL-O3:       # %bb.0: # %entry4508; HASWELL-O3-NEXT:    movq foo(%rip), %rax4509; HASWELL-O3-NEXT:  .Lpcsection132:4510; HASWELL-O3-NEXT:    lock andw $42, (%rdi)4511; HASWELL-O3-NEXT:    movq $1, foo(%rip)4512; HASWELL-O3-NEXT:    retq4513entry:4514  load volatile i64, ptr @foo, align 84515  %x = atomicrmw and ptr %a, i16 42 release, align 2, !pcsections !04516  store volatile i64 1, ptr @foo, align 84517  ret void4518}4519 4520define void @atomic16_or_release(ptr %a) {4521; O0-LABEL: atomic16_or_release:4522; O0:       # %bb.0: # %entry4523; O0-NEXT:    movq foo(%rip), %rax4524; O0-NEXT:  .Lpcsection142:4525; O0-NEXT:    lock orw $42, (%rdi)4526; O0-NEXT:    movq $1, foo4527; O0-NEXT:    retq4528;4529; O1-LABEL: atomic16_or_release:4530; O1:       # %bb.0: # %entry4531; O1-NEXT:    movq foo(%rip), %rax4532; O1-NEXT:  .Lpcsection133:4533; O1-NEXT:    lock orw $42, (%rdi)4534; O1-NEXT:    movq $1, foo(%rip)4535; O1-NEXT:    retq4536;4537; O2-LABEL: atomic16_or_release:4538; O2:       # %bb.0: # %entry4539; O2-NEXT:    movq foo(%rip), %rax4540; O2-NEXT:  .Lpcsection133:4541; O2-NEXT:    lock orw $42, (%rdi)4542; O2-NEXT:    movq $1, foo(%rip)4543; O2-NEXT:    retq4544;4545; O3-LABEL: atomic16_or_release:4546; O3:       # %bb.0: # %entry4547; O3-NEXT:    movq foo(%rip), %rax4548; O3-NEXT:  .Lpcsection133:4549; O3-NEXT:    lock orw $42, (%rdi)4550; O3-NEXT:    movq $1, foo(%rip)4551; O3-NEXT:    retq4552;4553; HASWELL-O3-LABEL: atomic16_or_release:4554; HASWELL-O3:       # %bb.0: # %entry4555; HASWELL-O3-NEXT:    movq foo(%rip), %rax4556; HASWELL-O3-NEXT:  .Lpcsection133:4557; HASWELL-O3-NEXT:    lock orw $42, (%rdi)4558; HASWELL-O3-NEXT:    movq $1, foo(%rip)4559; HASWELL-O3-NEXT:    retq4560entry:4561  load volatile i64, ptr @foo, align 84562  %x = atomicrmw or ptr %a, i16 42 release, align 2, !pcsections !04563  store volatile i64 1, ptr @foo, align 84564  ret void4565}4566 4567define void @atomic16_xor_release(ptr %a) {4568; O0-LABEL: atomic16_xor_release:4569; O0:       # %bb.0: # %entry4570; O0-NEXT:    movq foo(%rip), %rax4571; O0-NEXT:  .Lpcsection143:4572; O0-NEXT:    lock xorw $42, (%rdi)4573; O0-NEXT:    movq $1, foo4574; O0-NEXT:    retq4575;4576; O1-LABEL: atomic16_xor_release:4577; O1:       # %bb.0: # %entry4578; O1-NEXT:    movq foo(%rip), %rax4579; O1-NEXT:  .Lpcsection134:4580; O1-NEXT:    lock xorw $42, (%rdi)4581; O1-NEXT:    movq $1, foo(%rip)4582; O1-NEXT:    retq4583;4584; O2-LABEL: atomic16_xor_release:4585; O2:       # %bb.0: # %entry4586; O2-NEXT:    movq foo(%rip), %rax4587; O2-NEXT:  .Lpcsection134:4588; O2-NEXT:    lock xorw $42, (%rdi)4589; O2-NEXT:    movq $1, foo(%rip)4590; O2-NEXT:    retq4591;4592; O3-LABEL: atomic16_xor_release:4593; O3:       # %bb.0: # %entry4594; O3-NEXT:    movq foo(%rip), %rax4595; O3-NEXT:  .Lpcsection134:4596; O3-NEXT:    lock xorw $42, (%rdi)4597; O3-NEXT:    movq $1, foo(%rip)4598; O3-NEXT:    retq4599;4600; HASWELL-O3-LABEL: atomic16_xor_release:4601; HASWELL-O3:       # %bb.0: # %entry4602; HASWELL-O3-NEXT:    movq foo(%rip), %rax4603; HASWELL-O3-NEXT:  .Lpcsection134:4604; HASWELL-O3-NEXT:    lock xorw $42, (%rdi)4605; HASWELL-O3-NEXT:    movq $1, foo(%rip)4606; HASWELL-O3-NEXT:    retq4607entry:4608  load volatile i64, ptr @foo, align 84609  %x = atomicrmw xor ptr %a, i16 42 release, align 2, !pcsections !04610  store volatile i64 1, ptr @foo, align 84611  ret void4612}4613 4614define void @atomic16_nand_release(ptr %a) {4615; O0-LABEL: atomic16_nand_release:4616; O0:       # %bb.0: # %entry4617; O0-NEXT:    movq %rdi, {{[-0-9]+}}(%r{{[sb]}}p) # 8-byte Spill4618; O0-NEXT:    movq foo, %rax4619; O0-NEXT:  .Lpcsection144:4620; O0-NEXT:    movw (%rdi), %ax4621; O0-NEXT:    movw %ax, {{[-0-9]+}}(%r{{[sb]}}p) # 2-byte Spill4622; O0-NEXT:  .LBB78_1: # %atomicrmw.start4623; O0-NEXT:    # =>This Inner Loop Header: Depth=14624; O0-NEXT:    movw {{[-0-9]+}}(%r{{[sb]}}p), %ax # 2-byte Reload4625; O0-NEXT:    movq {{[-0-9]+}}(%r{{[sb]}}p), %rcx # 8-byte Reload4626; O0-NEXT:  .Lpcsection145:4627; O0-NEXT:    # implicit-def: $edx4628; O0-NEXT:    movw %ax, %dx4629; O0-NEXT:  .Lpcsection146:4630; O0-NEXT:    notl %edx4631; O0-NEXT:  .Lpcsection147:4632; O0-NEXT:    orl $65493, %edx # imm = 0xFFD54633; O0-NEXT:  .Lpcsection148:4634; O0-NEXT:    # kill: def $dx killed $dx killed $edx4635; O0-NEXT:  .Lpcsection149:4636; O0-NEXT:    lock cmpxchgw %dx, (%rcx)4637; O0-NEXT:  .Lpcsection150:4638; O0-NEXT:    sete %cl4639; O0-NEXT:  .Lpcsection151:4640; O0-NEXT:    testb $1, %cl4641; O0-NEXT:    movw %ax, {{[-0-9]+}}(%r{{[sb]}}p) # 2-byte Spill4642; O0-NEXT:  .Lpcsection152:4643; O0-NEXT:    jne .LBB78_24644; O0-NEXT:    jmp .LBB78_14645; O0-NEXT:  .LBB78_2: # %atomicrmw.end4646; O0-NEXT:    movq $1, foo4647; O0-NEXT:    retq4648;4649; O1-LABEL: atomic16_nand_release:4650; O1:       # %bb.0: # %entry4651; O1-NEXT:    movq foo(%rip), %rax4652; O1-NEXT:  .Lpcsection135:4653; O1-NEXT:    movzwl (%rdi), %eax4654; O1-NEXT:    .p2align 44655; O1-NEXT:  .LBB78_1: # %atomicrmw.start4656; O1-NEXT:    # =>This Inner Loop Header: Depth=14657; O1-NEXT:    movl %eax, %ecx4658; O1-NEXT:  .Lpcsection136:4659; O1-NEXT:    notl %ecx4660; O1-NEXT:  .Lpcsection137:4661; O1-NEXT:    orl $65493, %ecx # imm = 0xFFD54662; O1-NEXT:  .Lpcsection138:4663; O1-NEXT:    # kill: def $ax killed $ax killed $eax4664; O1-NEXT:  .Lpcsection139:4665; O1-NEXT:    lock cmpxchgw %cx, (%rdi)4666; O1-NEXT:  .Lpcsection140:4667; O1-NEXT:    # kill: def $ax killed $ax def $eax4668; O1-NEXT:  .Lpcsection141:4669; O1-NEXT:    jne .LBB78_14670; O1-NEXT:  # %bb.2: # %atomicrmw.end4671; O1-NEXT:    movq $1, foo(%rip)4672; O1-NEXT:    retq4673;4674; O2-LABEL: atomic16_nand_release:4675; O2:       # %bb.0: # %entry4676; O2-NEXT:    movq foo(%rip), %rax4677; O2-NEXT:  .Lpcsection135:4678; O2-NEXT:    movzwl (%rdi), %eax4679; O2-NEXT:    .p2align 44680; O2-NEXT:  .LBB78_1: # %atomicrmw.start4681; O2-NEXT:    # =>This Inner Loop Header: Depth=14682; O2-NEXT:    movl %eax, %ecx4683; O2-NEXT:  .Lpcsection136:4684; O2-NEXT:    notl %ecx4685; O2-NEXT:  .Lpcsection137:4686; O2-NEXT:    orl $65493, %ecx # imm = 0xFFD54687; O2-NEXT:  .Lpcsection138:4688; O2-NEXT:    # kill: def $ax killed $ax killed $eax4689; O2-NEXT:  .Lpcsection139:4690; O2-NEXT:    lock cmpxchgw %cx, (%rdi)4691; O2-NEXT:  .Lpcsection140:4692; O2-NEXT:    # kill: def $ax killed $ax def $eax4693; O2-NEXT:  .Lpcsection141:4694; O2-NEXT:    jne .LBB78_14695; O2-NEXT:  # %bb.2: # %atomicrmw.end4696; O2-NEXT:    movq $1, foo(%rip)4697; O2-NEXT:    retq4698;4699; O3-LABEL: atomic16_nand_release:4700; O3:       # %bb.0: # %entry4701; O3-NEXT:    movq foo(%rip), %rax4702; O3-NEXT:  .Lpcsection135:4703; O3-NEXT:    movzwl (%rdi), %eax4704; O3-NEXT:    .p2align 44705; O3-NEXT:  .LBB78_1: # %atomicrmw.start4706; O3-NEXT:    # =>This Inner Loop Header: Depth=14707; O3-NEXT:    movl %eax, %ecx4708; O3-NEXT:  .Lpcsection136:4709; O3-NEXT:    notl %ecx4710; O3-NEXT:  .Lpcsection137:4711; O3-NEXT:    orl $65493, %ecx # imm = 0xFFD54712; O3-NEXT:  .Lpcsection138:4713; O3-NEXT:    # kill: def $ax killed $ax killed $eax4714; O3-NEXT:  .Lpcsection139:4715; O3-NEXT:    lock cmpxchgw %cx, (%rdi)4716; O3-NEXT:  .Lpcsection140:4717; O3-NEXT:    # kill: def $ax killed $ax def $eax4718; O3-NEXT:  .Lpcsection141:4719; O3-NEXT:    jne .LBB78_14720; O3-NEXT:  # %bb.2: # %atomicrmw.end4721; O3-NEXT:    movq $1, foo(%rip)4722; O3-NEXT:    retq4723;4724; HASWELL-O3-LABEL: atomic16_nand_release:4725; HASWELL-O3:       # %bb.0: # %entry4726; HASWELL-O3-NEXT:    movq foo(%rip), %rax4727; HASWELL-O3-NEXT:  .Lpcsection135:4728; HASWELL-O3-NEXT:    movzwl (%rdi), %eax4729; HASWELL-O3-NEXT:    .p2align 44730; HASWELL-O3-NEXT:  .LBB78_1: # %atomicrmw.start4731; HASWELL-O3-NEXT:    # =>This Inner Loop Header: Depth=14732; HASWELL-O3-NEXT:    movl %eax, %ecx4733; HASWELL-O3-NEXT:  .Lpcsection136:4734; HASWELL-O3-NEXT:    notl %ecx4735; HASWELL-O3-NEXT:  .Lpcsection137:4736; HASWELL-O3-NEXT:    orl $65493, %ecx # imm = 0xFFD54737; HASWELL-O3-NEXT:  .Lpcsection138:4738; HASWELL-O3-NEXT:    # kill: def $ax killed $ax killed $eax4739; HASWELL-O3-NEXT:  .Lpcsection139:4740; HASWELL-O3-NEXT:    lock cmpxchgw %cx, (%rdi)4741; HASWELL-O3-NEXT:  .Lpcsection140:4742; HASWELL-O3-NEXT:    # kill: def $ax killed $ax def $eax4743; HASWELL-O3-NEXT:  .Lpcsection141:4744; HASWELL-O3-NEXT:    jne .LBB78_14745; HASWELL-O3-NEXT:  # %bb.2: # %atomicrmw.end4746; HASWELL-O3-NEXT:    movq $1, foo(%rip)4747; HASWELL-O3-NEXT:    retq4748entry:4749  load volatile i64, ptr @foo, align 84750  %x = atomicrmw nand ptr %a, i16 42 release, align 2, !pcsections !04751  store volatile i64 1, ptr @foo, align 84752  ret void4753}4754 4755define void @atomic16_xchg_acq_rel(ptr %a) {4756; O0-LABEL: atomic16_xchg_acq_rel:4757; O0:       # %bb.0: # %entry4758; O0-NEXT:    movq foo(%rip), %rax4759; O0-NEXT:    movw $42, %ax4760; O0-NEXT:  .Lpcsection153:4761; O0-NEXT:    xchgw %ax, (%rdi)4762; O0-NEXT:    movq $1, foo4763; O0-NEXT:    retq4764;4765; O1-LABEL: atomic16_xchg_acq_rel:4766; O1:       # %bb.0: # %entry4767; O1-NEXT:    movq foo(%rip), %rax4768; O1-NEXT:    movw $42, %ax4769; O1-NEXT:  .Lpcsection142:4770; O1-NEXT:    xchgw %ax, (%rdi)4771; O1-NEXT:    movq $1, foo(%rip)4772; O1-NEXT:    retq4773;4774; O2-LABEL: atomic16_xchg_acq_rel:4775; O2:       # %bb.0: # %entry4776; O2-NEXT:    movq foo(%rip), %rax4777; O2-NEXT:    movw $42, %ax4778; O2-NEXT:  .Lpcsection142:4779; O2-NEXT:    xchgw %ax, (%rdi)4780; O2-NEXT:    movq $1, foo(%rip)4781; O2-NEXT:    retq4782;4783; O3-LABEL: atomic16_xchg_acq_rel:4784; O3:       # %bb.0: # %entry4785; O3-NEXT:    movq foo(%rip), %rax4786; O3-NEXT:    movw $42, %ax4787; O3-NEXT:  .Lpcsection142:4788; O3-NEXT:    xchgw %ax, (%rdi)4789; O3-NEXT:    movq $1, foo(%rip)4790; O3-NEXT:    retq4791;4792; HASWELL-O3-LABEL: atomic16_xchg_acq_rel:4793; HASWELL-O3:       # %bb.0: # %entry4794; HASWELL-O3-NEXT:    movq foo(%rip), %rax4795; HASWELL-O3-NEXT:    movw $42, %ax4796; HASWELL-O3-NEXT:  .Lpcsection142:4797; HASWELL-O3-NEXT:    xchgw %ax, (%rdi)4798; HASWELL-O3-NEXT:    movq $1, foo(%rip)4799; HASWELL-O3-NEXT:    retq4800entry:4801  load volatile i64, ptr @foo, align 84802  %x = atomicrmw xchg ptr %a, i16 42 acq_rel, align 2, !pcsections !04803  store volatile i64 1, ptr @foo, align 84804  ret void4805}4806 4807define void @atomic16_add_acq_rel(ptr %a) {4808; O0-LABEL: atomic16_add_acq_rel:4809; O0:       # %bb.0: # %entry4810; O0-NEXT:    movq foo(%rip), %rax4811; O0-NEXT:  .Lpcsection154:4812; O0-NEXT:    lock addw $42, (%rdi)4813; O0-NEXT:    movq $1, foo4814; O0-NEXT:    retq4815;4816; O1-LABEL: atomic16_add_acq_rel:4817; O1:       # %bb.0: # %entry4818; O1-NEXT:    movq foo(%rip), %rax4819; O1-NEXT:  .Lpcsection143:4820; O1-NEXT:    lock addw $42, (%rdi)4821; O1-NEXT:    movq $1, foo(%rip)4822; O1-NEXT:    retq4823;4824; O2-LABEL: atomic16_add_acq_rel:4825; O2:       # %bb.0: # %entry4826; O2-NEXT:    movq foo(%rip), %rax4827; O2-NEXT:  .Lpcsection143:4828; O2-NEXT:    lock addw $42, (%rdi)4829; O2-NEXT:    movq $1, foo(%rip)4830; O2-NEXT:    retq4831;4832; O3-LABEL: atomic16_add_acq_rel:4833; O3:       # %bb.0: # %entry4834; O3-NEXT:    movq foo(%rip), %rax4835; O3-NEXT:  .Lpcsection143:4836; O3-NEXT:    lock addw $42, (%rdi)4837; O3-NEXT:    movq $1, foo(%rip)4838; O3-NEXT:    retq4839;4840; HASWELL-O3-LABEL: atomic16_add_acq_rel:4841; HASWELL-O3:       # %bb.0: # %entry4842; HASWELL-O3-NEXT:    movq foo(%rip), %rax4843; HASWELL-O3-NEXT:  .Lpcsection143:4844; HASWELL-O3-NEXT:    lock addw $42, (%rdi)4845; HASWELL-O3-NEXT:    movq $1, foo(%rip)4846; HASWELL-O3-NEXT:    retq4847entry:4848  load volatile i64, ptr @foo, align 84849  %x = atomicrmw add ptr %a, i16 42 acq_rel, align 2, !pcsections !04850  store volatile i64 1, ptr @foo, align 84851  ret void4852}4853 4854define void @atomic16_sub_acq_rel(ptr %a) {4855; O0-LABEL: atomic16_sub_acq_rel:4856; O0:       # %bb.0: # %entry4857; O0-NEXT:    movq foo(%rip), %rax4858; O0-NEXT:  .Lpcsection155:4859; O0-NEXT:    lock subw $42, (%rdi)4860; O0-NEXT:    movq $1, foo4861; O0-NEXT:    retq4862;4863; O1-LABEL: atomic16_sub_acq_rel:4864; O1:       # %bb.0: # %entry4865; O1-NEXT:    movq foo(%rip), %rax4866; O1-NEXT:  .Lpcsection144:4867; O1-NEXT:    lock subw $42, (%rdi)4868; O1-NEXT:    movq $1, foo(%rip)4869; O1-NEXT:    retq4870;4871; O2-LABEL: atomic16_sub_acq_rel:4872; O2:       # %bb.0: # %entry4873; O2-NEXT:    movq foo(%rip), %rax4874; O2-NEXT:  .Lpcsection144:4875; O2-NEXT:    lock subw $42, (%rdi)4876; O2-NEXT:    movq $1, foo(%rip)4877; O2-NEXT:    retq4878;4879; O3-LABEL: atomic16_sub_acq_rel:4880; O3:       # %bb.0: # %entry4881; O3-NEXT:    movq foo(%rip), %rax4882; O3-NEXT:  .Lpcsection144:4883; O3-NEXT:    lock subw $42, (%rdi)4884; O3-NEXT:    movq $1, foo(%rip)4885; O3-NEXT:    retq4886;4887; HASWELL-O3-LABEL: atomic16_sub_acq_rel:4888; HASWELL-O3:       # %bb.0: # %entry4889; HASWELL-O3-NEXT:    movq foo(%rip), %rax4890; HASWELL-O3-NEXT:  .Lpcsection144:4891; HASWELL-O3-NEXT:    lock subw $42, (%rdi)4892; HASWELL-O3-NEXT:    movq $1, foo(%rip)4893; HASWELL-O3-NEXT:    retq4894entry:4895  load volatile i64, ptr @foo, align 84896  %x = atomicrmw sub ptr %a, i16 42 acq_rel, align 2, !pcsections !04897  store volatile i64 1, ptr @foo, align 84898  ret void4899}4900 4901define void @atomic16_and_acq_rel(ptr %a) {4902; O0-LABEL: atomic16_and_acq_rel:4903; O0:       # %bb.0: # %entry4904; O0-NEXT:    movq foo(%rip), %rax4905; O0-NEXT:  .Lpcsection156:4906; O0-NEXT:    lock andw $42, (%rdi)4907; O0-NEXT:    movq $1, foo4908; O0-NEXT:    retq4909;4910; O1-LABEL: atomic16_and_acq_rel:4911; O1:       # %bb.0: # %entry4912; O1-NEXT:    movq foo(%rip), %rax4913; O1-NEXT:  .Lpcsection145:4914; O1-NEXT:    lock andw $42, (%rdi)4915; O1-NEXT:    movq $1, foo(%rip)4916; O1-NEXT:    retq4917;4918; O2-LABEL: atomic16_and_acq_rel:4919; O2:       # %bb.0: # %entry4920; O2-NEXT:    movq foo(%rip), %rax4921; O2-NEXT:  .Lpcsection145:4922; O2-NEXT:    lock andw $42, (%rdi)4923; O2-NEXT:    movq $1, foo(%rip)4924; O2-NEXT:    retq4925;4926; O3-LABEL: atomic16_and_acq_rel:4927; O3:       # %bb.0: # %entry4928; O3-NEXT:    movq foo(%rip), %rax4929; O3-NEXT:  .Lpcsection145:4930; O3-NEXT:    lock andw $42, (%rdi)4931; O3-NEXT:    movq $1, foo(%rip)4932; O3-NEXT:    retq4933;4934; HASWELL-O3-LABEL: atomic16_and_acq_rel:4935; HASWELL-O3:       # %bb.0: # %entry4936; HASWELL-O3-NEXT:    movq foo(%rip), %rax4937; HASWELL-O3-NEXT:  .Lpcsection145:4938; HASWELL-O3-NEXT:    lock andw $42, (%rdi)4939; HASWELL-O3-NEXT:    movq $1, foo(%rip)4940; HASWELL-O3-NEXT:    retq4941entry:4942  load volatile i64, ptr @foo, align 84943  %x = atomicrmw and ptr %a, i16 42 acq_rel, align 2, !pcsections !04944  store volatile i64 1, ptr @foo, align 84945  ret void4946}4947 4948define void @atomic16_or_acq_rel(ptr %a) {4949; O0-LABEL: atomic16_or_acq_rel:4950; O0:       # %bb.0: # %entry4951; O0-NEXT:    movq foo(%rip), %rax4952; O0-NEXT:  .Lpcsection157:4953; O0-NEXT:    lock orw $42, (%rdi)4954; O0-NEXT:    movq $1, foo4955; O0-NEXT:    retq4956;4957; O1-LABEL: atomic16_or_acq_rel:4958; O1:       # %bb.0: # %entry4959; O1-NEXT:    movq foo(%rip), %rax4960; O1-NEXT:  .Lpcsection146:4961; O1-NEXT:    lock orw $42, (%rdi)4962; O1-NEXT:    movq $1, foo(%rip)4963; O1-NEXT:    retq4964;4965; O2-LABEL: atomic16_or_acq_rel:4966; O2:       # %bb.0: # %entry4967; O2-NEXT:    movq foo(%rip), %rax4968; O2-NEXT:  .Lpcsection146:4969; O2-NEXT:    lock orw $42, (%rdi)4970; O2-NEXT:    movq $1, foo(%rip)4971; O2-NEXT:    retq4972;4973; O3-LABEL: atomic16_or_acq_rel:4974; O3:       # %bb.0: # %entry4975; O3-NEXT:    movq foo(%rip), %rax4976; O3-NEXT:  .Lpcsection146:4977; O3-NEXT:    lock orw $42, (%rdi)4978; O3-NEXT:    movq $1, foo(%rip)4979; O3-NEXT:    retq4980;4981; HASWELL-O3-LABEL: atomic16_or_acq_rel:4982; HASWELL-O3:       # %bb.0: # %entry4983; HASWELL-O3-NEXT:    movq foo(%rip), %rax4984; HASWELL-O3-NEXT:  .Lpcsection146:4985; HASWELL-O3-NEXT:    lock orw $42, (%rdi)4986; HASWELL-O3-NEXT:    movq $1, foo(%rip)4987; HASWELL-O3-NEXT:    retq4988entry:4989  load volatile i64, ptr @foo, align 84990  %x = atomicrmw or ptr %a, i16 42 acq_rel, align 2, !pcsections !04991  store volatile i64 1, ptr @foo, align 84992  ret void4993}4994 4995define void @atomic16_xor_acq_rel(ptr %a) {4996; O0-LABEL: atomic16_xor_acq_rel:4997; O0:       # %bb.0: # %entry4998; O0-NEXT:    movq foo(%rip), %rax4999; O0-NEXT:  .Lpcsection158:5000; O0-NEXT:    lock xorw $42, (%rdi)5001; O0-NEXT:    movq $1, foo5002; O0-NEXT:    retq5003;5004; O1-LABEL: atomic16_xor_acq_rel:5005; O1:       # %bb.0: # %entry5006; O1-NEXT:    movq foo(%rip), %rax5007; O1-NEXT:  .Lpcsection147:5008; O1-NEXT:    lock xorw $42, (%rdi)5009; O1-NEXT:    movq $1, foo(%rip)5010; O1-NEXT:    retq5011;5012; O2-LABEL: atomic16_xor_acq_rel:5013; O2:       # %bb.0: # %entry5014; O2-NEXT:    movq foo(%rip), %rax5015; O2-NEXT:  .Lpcsection147:5016; O2-NEXT:    lock xorw $42, (%rdi)5017; O2-NEXT:    movq $1, foo(%rip)5018; O2-NEXT:    retq5019;5020; O3-LABEL: atomic16_xor_acq_rel:5021; O3:       # %bb.0: # %entry5022; O3-NEXT:    movq foo(%rip), %rax5023; O3-NEXT:  .Lpcsection147:5024; O3-NEXT:    lock xorw $42, (%rdi)5025; O3-NEXT:    movq $1, foo(%rip)5026; O3-NEXT:    retq5027;5028; HASWELL-O3-LABEL: atomic16_xor_acq_rel:5029; HASWELL-O3:       # %bb.0: # %entry5030; HASWELL-O3-NEXT:    movq foo(%rip), %rax5031; HASWELL-O3-NEXT:  .Lpcsection147:5032; HASWELL-O3-NEXT:    lock xorw $42, (%rdi)5033; HASWELL-O3-NEXT:    movq $1, foo(%rip)5034; HASWELL-O3-NEXT:    retq5035entry:5036  load volatile i64, ptr @foo, align 85037  %x = atomicrmw xor ptr %a, i16 42 acq_rel, align 2, !pcsections !05038  store volatile i64 1, ptr @foo, align 85039  ret void5040}5041 5042define void @atomic16_nand_acq_rel(ptr %a) {5043; O0-LABEL: atomic16_nand_acq_rel:5044; O0:       # %bb.0: # %entry5045; O0-NEXT:    movq %rdi, {{[-0-9]+}}(%r{{[sb]}}p) # 8-byte Spill5046; O0-NEXT:    movq foo, %rax5047; O0-NEXT:  .Lpcsection159:5048; O0-NEXT:    movw (%rdi), %ax5049; O0-NEXT:    movw %ax, {{[-0-9]+}}(%r{{[sb]}}p) # 2-byte Spill5050; O0-NEXT:  .LBB85_1: # %atomicrmw.start5051; O0-NEXT:    # =>This Inner Loop Header: Depth=15052; O0-NEXT:    movw {{[-0-9]+}}(%r{{[sb]}}p), %ax # 2-byte Reload5053; O0-NEXT:    movq {{[-0-9]+}}(%r{{[sb]}}p), %rcx # 8-byte Reload5054; O0-NEXT:  .Lpcsection160:5055; O0-NEXT:    # implicit-def: $edx5056; O0-NEXT:    movw %ax, %dx5057; O0-NEXT:  .Lpcsection161:5058; O0-NEXT:    notl %edx5059; O0-NEXT:  .Lpcsection162:5060; O0-NEXT:    orl $65493, %edx # imm = 0xFFD55061; O0-NEXT:  .Lpcsection163:5062; O0-NEXT:    # kill: def $dx killed $dx killed $edx5063; O0-NEXT:  .Lpcsection164:5064; O0-NEXT:    lock cmpxchgw %dx, (%rcx)5065; O0-NEXT:  .Lpcsection165:5066; O0-NEXT:    sete %cl5067; O0-NEXT:  .Lpcsection166:5068; O0-NEXT:    testb $1, %cl5069; O0-NEXT:    movw %ax, {{[-0-9]+}}(%r{{[sb]}}p) # 2-byte Spill5070; O0-NEXT:  .Lpcsection167:5071; O0-NEXT:    jne .LBB85_25072; O0-NEXT:    jmp .LBB85_15073; O0-NEXT:  .LBB85_2: # %atomicrmw.end5074; O0-NEXT:    movq $1, foo5075; O0-NEXT:    retq5076;5077; O1-LABEL: atomic16_nand_acq_rel:5078; O1:       # %bb.0: # %entry5079; O1-NEXT:    movq foo(%rip), %rax5080; O1-NEXT:  .Lpcsection148:5081; O1-NEXT:    movzwl (%rdi), %eax5082; O1-NEXT:    .p2align 45083; O1-NEXT:  .LBB85_1: # %atomicrmw.start5084; O1-NEXT:    # =>This Inner Loop Header: Depth=15085; O1-NEXT:    movl %eax, %ecx5086; O1-NEXT:  .Lpcsection149:5087; O1-NEXT:    notl %ecx5088; O1-NEXT:  .Lpcsection150:5089; O1-NEXT:    orl $65493, %ecx # imm = 0xFFD55090; O1-NEXT:  .Lpcsection151:5091; O1-NEXT:    # kill: def $ax killed $ax killed $eax5092; O1-NEXT:  .Lpcsection152:5093; O1-NEXT:    lock cmpxchgw %cx, (%rdi)5094; O1-NEXT:  .Lpcsection153:5095; O1-NEXT:    # kill: def $ax killed $ax def $eax5096; O1-NEXT:  .Lpcsection154:5097; O1-NEXT:    jne .LBB85_15098; O1-NEXT:  # %bb.2: # %atomicrmw.end5099; O1-NEXT:    movq $1, foo(%rip)5100; O1-NEXT:    retq5101;5102; O2-LABEL: atomic16_nand_acq_rel:5103; O2:       # %bb.0: # %entry5104; O2-NEXT:    movq foo(%rip), %rax5105; O2-NEXT:  .Lpcsection148:5106; O2-NEXT:    movzwl (%rdi), %eax5107; O2-NEXT:    .p2align 45108; O2-NEXT:  .LBB85_1: # %atomicrmw.start5109; O2-NEXT:    # =>This Inner Loop Header: Depth=15110; O2-NEXT:    movl %eax, %ecx5111; O2-NEXT:  .Lpcsection149:5112; O2-NEXT:    notl %ecx5113; O2-NEXT:  .Lpcsection150:5114; O2-NEXT:    orl $65493, %ecx # imm = 0xFFD55115; O2-NEXT:  .Lpcsection151:5116; O2-NEXT:    # kill: def $ax killed $ax killed $eax5117; O2-NEXT:  .Lpcsection152:5118; O2-NEXT:    lock cmpxchgw %cx, (%rdi)5119; O2-NEXT:  .Lpcsection153:5120; O2-NEXT:    # kill: def $ax killed $ax def $eax5121; O2-NEXT:  .Lpcsection154:5122; O2-NEXT:    jne .LBB85_15123; O2-NEXT:  # %bb.2: # %atomicrmw.end5124; O2-NEXT:    movq $1, foo(%rip)5125; O2-NEXT:    retq5126;5127; O3-LABEL: atomic16_nand_acq_rel:5128; O3:       # %bb.0: # %entry5129; O3-NEXT:    movq foo(%rip), %rax5130; O3-NEXT:  .Lpcsection148:5131; O3-NEXT:    movzwl (%rdi), %eax5132; O3-NEXT:    .p2align 45133; O3-NEXT:  .LBB85_1: # %atomicrmw.start5134; O3-NEXT:    # =>This Inner Loop Header: Depth=15135; O3-NEXT:    movl %eax, %ecx5136; O3-NEXT:  .Lpcsection149:5137; O3-NEXT:    notl %ecx5138; O3-NEXT:  .Lpcsection150:5139; O3-NEXT:    orl $65493, %ecx # imm = 0xFFD55140; O3-NEXT:  .Lpcsection151:5141; O3-NEXT:    # kill: def $ax killed $ax killed $eax5142; O3-NEXT:  .Lpcsection152:5143; O3-NEXT:    lock cmpxchgw %cx, (%rdi)5144; O3-NEXT:  .Lpcsection153:5145; O3-NEXT:    # kill: def $ax killed $ax def $eax5146; O3-NEXT:  .Lpcsection154:5147; O3-NEXT:    jne .LBB85_15148; O3-NEXT:  # %bb.2: # %atomicrmw.end5149; O3-NEXT:    movq $1, foo(%rip)5150; O3-NEXT:    retq5151;5152; HASWELL-O3-LABEL: atomic16_nand_acq_rel:5153; HASWELL-O3:       # %bb.0: # %entry5154; HASWELL-O3-NEXT:    movq foo(%rip), %rax5155; HASWELL-O3-NEXT:  .Lpcsection148:5156; HASWELL-O3-NEXT:    movzwl (%rdi), %eax5157; HASWELL-O3-NEXT:    .p2align 45158; HASWELL-O3-NEXT:  .LBB85_1: # %atomicrmw.start5159; HASWELL-O3-NEXT:    # =>This Inner Loop Header: Depth=15160; HASWELL-O3-NEXT:    movl %eax, %ecx5161; HASWELL-O3-NEXT:  .Lpcsection149:5162; HASWELL-O3-NEXT:    notl %ecx5163; HASWELL-O3-NEXT:  .Lpcsection150:5164; HASWELL-O3-NEXT:    orl $65493, %ecx # imm = 0xFFD55165; HASWELL-O3-NEXT:  .Lpcsection151:5166; HASWELL-O3-NEXT:    # kill: def $ax killed $ax killed $eax5167; HASWELL-O3-NEXT:  .Lpcsection152:5168; HASWELL-O3-NEXT:    lock cmpxchgw %cx, (%rdi)5169; HASWELL-O3-NEXT:  .Lpcsection153:5170; HASWELL-O3-NEXT:    # kill: def $ax killed $ax def $eax5171; HASWELL-O3-NEXT:  .Lpcsection154:5172; HASWELL-O3-NEXT:    jne .LBB85_15173; HASWELL-O3-NEXT:  # %bb.2: # %atomicrmw.end5174; HASWELL-O3-NEXT:    movq $1, foo(%rip)5175; HASWELL-O3-NEXT:    retq5176entry:5177  load volatile i64, ptr @foo, align 85178  %x = atomicrmw nand ptr %a, i16 42 acq_rel, align 2, !pcsections !05179  store volatile i64 1, ptr @foo, align 85180  ret void5181}5182 5183define void @atomic16_xchg_seq_cst(ptr %a) {5184; O0-LABEL: atomic16_xchg_seq_cst:5185; O0:       # %bb.0: # %entry5186; O0-NEXT:    movq foo(%rip), %rax5187; O0-NEXT:    movw $42, %ax5188; O0-NEXT:  .Lpcsection168:5189; O0-NEXT:    xchgw %ax, (%rdi)5190; O0-NEXT:    movq $1, foo5191; O0-NEXT:    retq5192;5193; O1-LABEL: atomic16_xchg_seq_cst:5194; O1:       # %bb.0: # %entry5195; O1-NEXT:    movq foo(%rip), %rax5196; O1-NEXT:    movw $42, %ax5197; O1-NEXT:  .Lpcsection155:5198; O1-NEXT:    xchgw %ax, (%rdi)5199; O1-NEXT:    movq $1, foo(%rip)5200; O1-NEXT:    retq5201;5202; O2-LABEL: atomic16_xchg_seq_cst:5203; O2:       # %bb.0: # %entry5204; O2-NEXT:    movq foo(%rip), %rax5205; O2-NEXT:    movw $42, %ax5206; O2-NEXT:  .Lpcsection155:5207; O2-NEXT:    xchgw %ax, (%rdi)5208; O2-NEXT:    movq $1, foo(%rip)5209; O2-NEXT:    retq5210;5211; O3-LABEL: atomic16_xchg_seq_cst:5212; O3:       # %bb.0: # %entry5213; O3-NEXT:    movq foo(%rip), %rax5214; O3-NEXT:    movw $42, %ax5215; O3-NEXT:  .Lpcsection155:5216; O3-NEXT:    xchgw %ax, (%rdi)5217; O3-NEXT:    movq $1, foo(%rip)5218; O3-NEXT:    retq5219;5220; HASWELL-O3-LABEL: atomic16_xchg_seq_cst:5221; HASWELL-O3:       # %bb.0: # %entry5222; HASWELL-O3-NEXT:    movq foo(%rip), %rax5223; HASWELL-O3-NEXT:    movw $42, %ax5224; HASWELL-O3-NEXT:  .Lpcsection155:5225; HASWELL-O3-NEXT:    xchgw %ax, (%rdi)5226; HASWELL-O3-NEXT:    movq $1, foo(%rip)5227; HASWELL-O3-NEXT:    retq5228entry:5229  load volatile i64, ptr @foo, align 85230  %x = atomicrmw xchg ptr %a, i16 42 seq_cst, align 2, !pcsections !05231  store volatile i64 1, ptr @foo, align 85232  ret void5233}5234 5235define void @atomic16_add_seq_cst(ptr %a) {5236; O0-LABEL: atomic16_add_seq_cst:5237; O0:       # %bb.0: # %entry5238; O0-NEXT:    movq foo(%rip), %rax5239; O0-NEXT:  .Lpcsection169:5240; O0-NEXT:    lock addw $42, (%rdi)5241; O0-NEXT:    movq $1, foo5242; O0-NEXT:    retq5243;5244; O1-LABEL: atomic16_add_seq_cst:5245; O1:       # %bb.0: # %entry5246; O1-NEXT:    movq foo(%rip), %rax5247; O1-NEXT:  .Lpcsection156:5248; O1-NEXT:    lock addw $42, (%rdi)5249; O1-NEXT:    movq $1, foo(%rip)5250; O1-NEXT:    retq5251;5252; O2-LABEL: atomic16_add_seq_cst:5253; O2:       # %bb.0: # %entry5254; O2-NEXT:    movq foo(%rip), %rax5255; O2-NEXT:  .Lpcsection156:5256; O2-NEXT:    lock addw $42, (%rdi)5257; O2-NEXT:    movq $1, foo(%rip)5258; O2-NEXT:    retq5259;5260; O3-LABEL: atomic16_add_seq_cst:5261; O3:       # %bb.0: # %entry5262; O3-NEXT:    movq foo(%rip), %rax5263; O3-NEXT:  .Lpcsection156:5264; O3-NEXT:    lock addw $42, (%rdi)5265; O3-NEXT:    movq $1, foo(%rip)5266; O3-NEXT:    retq5267;5268; HASWELL-O3-LABEL: atomic16_add_seq_cst:5269; HASWELL-O3:       # %bb.0: # %entry5270; HASWELL-O3-NEXT:    movq foo(%rip), %rax5271; HASWELL-O3-NEXT:  .Lpcsection156:5272; HASWELL-O3-NEXT:    lock addw $42, (%rdi)5273; HASWELL-O3-NEXT:    movq $1, foo(%rip)5274; HASWELL-O3-NEXT:    retq5275entry:5276  load volatile i64, ptr @foo, align 85277  %x = atomicrmw add ptr %a, i16 42 seq_cst, align 2, !pcsections !05278  store volatile i64 1, ptr @foo, align 85279  ret void5280}5281 5282define void @atomic16_sub_seq_cst(ptr %a) {5283; O0-LABEL: atomic16_sub_seq_cst:5284; O0:       # %bb.0: # %entry5285; O0-NEXT:    movq foo(%rip), %rax5286; O0-NEXT:  .Lpcsection170:5287; O0-NEXT:    lock subw $42, (%rdi)5288; O0-NEXT:    movq $1, foo5289; O0-NEXT:    retq5290;5291; O1-LABEL: atomic16_sub_seq_cst:5292; O1:       # %bb.0: # %entry5293; O1-NEXT:    movq foo(%rip), %rax5294; O1-NEXT:  .Lpcsection157:5295; O1-NEXT:    lock subw $42, (%rdi)5296; O1-NEXT:    movq $1, foo(%rip)5297; O1-NEXT:    retq5298;5299; O2-LABEL: atomic16_sub_seq_cst:5300; O2:       # %bb.0: # %entry5301; O2-NEXT:    movq foo(%rip), %rax5302; O2-NEXT:  .Lpcsection157:5303; O2-NEXT:    lock subw $42, (%rdi)5304; O2-NEXT:    movq $1, foo(%rip)5305; O2-NEXT:    retq5306;5307; O3-LABEL: atomic16_sub_seq_cst:5308; O3:       # %bb.0: # %entry5309; O3-NEXT:    movq foo(%rip), %rax5310; O3-NEXT:  .Lpcsection157:5311; O3-NEXT:    lock subw $42, (%rdi)5312; O3-NEXT:    movq $1, foo(%rip)5313; O3-NEXT:    retq5314;5315; HASWELL-O3-LABEL: atomic16_sub_seq_cst:5316; HASWELL-O3:       # %bb.0: # %entry5317; HASWELL-O3-NEXT:    movq foo(%rip), %rax5318; HASWELL-O3-NEXT:  .Lpcsection157:5319; HASWELL-O3-NEXT:    lock subw $42, (%rdi)5320; HASWELL-O3-NEXT:    movq $1, foo(%rip)5321; HASWELL-O3-NEXT:    retq5322entry:5323  load volatile i64, ptr @foo, align 85324  %x = atomicrmw sub ptr %a, i16 42 seq_cst, align 2, !pcsections !05325  store volatile i64 1, ptr @foo, align 85326  ret void5327}5328 5329define void @atomic16_and_seq_cst(ptr %a) {5330; O0-LABEL: atomic16_and_seq_cst:5331; O0:       # %bb.0: # %entry5332; O0-NEXT:    movq foo(%rip), %rax5333; O0-NEXT:  .Lpcsection171:5334; O0-NEXT:    lock andw $42, (%rdi)5335; O0-NEXT:    movq $1, foo5336; O0-NEXT:    retq5337;5338; O1-LABEL: atomic16_and_seq_cst:5339; O1:       # %bb.0: # %entry5340; O1-NEXT:    movq foo(%rip), %rax5341; O1-NEXT:  .Lpcsection158:5342; O1-NEXT:    lock andw $42, (%rdi)5343; O1-NEXT:    movq $1, foo(%rip)5344; O1-NEXT:    retq5345;5346; O2-LABEL: atomic16_and_seq_cst:5347; O2:       # %bb.0: # %entry5348; O2-NEXT:    movq foo(%rip), %rax5349; O2-NEXT:  .Lpcsection158:5350; O2-NEXT:    lock andw $42, (%rdi)5351; O2-NEXT:    movq $1, foo(%rip)5352; O2-NEXT:    retq5353;5354; O3-LABEL: atomic16_and_seq_cst:5355; O3:       # %bb.0: # %entry5356; O3-NEXT:    movq foo(%rip), %rax5357; O3-NEXT:  .Lpcsection158:5358; O3-NEXT:    lock andw $42, (%rdi)5359; O3-NEXT:    movq $1, foo(%rip)5360; O3-NEXT:    retq5361;5362; HASWELL-O3-LABEL: atomic16_and_seq_cst:5363; HASWELL-O3:       # %bb.0: # %entry5364; HASWELL-O3-NEXT:    movq foo(%rip), %rax5365; HASWELL-O3-NEXT:  .Lpcsection158:5366; HASWELL-O3-NEXT:    lock andw $42, (%rdi)5367; HASWELL-O3-NEXT:    movq $1, foo(%rip)5368; HASWELL-O3-NEXT:    retq5369entry:5370  load volatile i64, ptr @foo, align 85371  %x = atomicrmw and ptr %a, i16 42 seq_cst, align 2, !pcsections !05372  store volatile i64 1, ptr @foo, align 85373  ret void5374}5375 5376define void @atomic16_or_seq_cst(ptr %a) {5377; O0-LABEL: atomic16_or_seq_cst:5378; O0:       # %bb.0: # %entry5379; O0-NEXT:    movq foo(%rip), %rax5380; O0-NEXT:  .Lpcsection172:5381; O0-NEXT:    lock orw $42, (%rdi)5382; O0-NEXT:    movq $1, foo5383; O0-NEXT:    retq5384;5385; O1-LABEL: atomic16_or_seq_cst:5386; O1:       # %bb.0: # %entry5387; O1-NEXT:    movq foo(%rip), %rax5388; O1-NEXT:  .Lpcsection159:5389; O1-NEXT:    lock orw $42, (%rdi)5390; O1-NEXT:    movq $1, foo(%rip)5391; O1-NEXT:    retq5392;5393; O2-LABEL: atomic16_or_seq_cst:5394; O2:       # %bb.0: # %entry5395; O2-NEXT:    movq foo(%rip), %rax5396; O2-NEXT:  .Lpcsection159:5397; O2-NEXT:    lock orw $42, (%rdi)5398; O2-NEXT:    movq $1, foo(%rip)5399; O2-NEXT:    retq5400;5401; O3-LABEL: atomic16_or_seq_cst:5402; O3:       # %bb.0: # %entry5403; O3-NEXT:    movq foo(%rip), %rax5404; O3-NEXT:  .Lpcsection159:5405; O3-NEXT:    lock orw $42, (%rdi)5406; O3-NEXT:    movq $1, foo(%rip)5407; O3-NEXT:    retq5408;5409; HASWELL-O3-LABEL: atomic16_or_seq_cst:5410; HASWELL-O3:       # %bb.0: # %entry5411; HASWELL-O3-NEXT:    movq foo(%rip), %rax5412; HASWELL-O3-NEXT:  .Lpcsection159:5413; HASWELL-O3-NEXT:    lock orw $42, (%rdi)5414; HASWELL-O3-NEXT:    movq $1, foo(%rip)5415; HASWELL-O3-NEXT:    retq5416entry:5417  load volatile i64, ptr @foo, align 85418  %x = atomicrmw or ptr %a, i16 42 seq_cst, align 2, !pcsections !05419  store volatile i64 1, ptr @foo, align 85420  ret void5421}5422 5423define void @atomic16_xor_seq_cst(ptr %a) {5424; O0-LABEL: atomic16_xor_seq_cst:5425; O0:       # %bb.0: # %entry5426; O0-NEXT:    movq foo(%rip), %rax5427; O0-NEXT:  .Lpcsection173:5428; O0-NEXT:    lock xorw $42, (%rdi)5429; O0-NEXT:    movq $1, foo5430; O0-NEXT:    retq5431;5432; O1-LABEL: atomic16_xor_seq_cst:5433; O1:       # %bb.0: # %entry5434; O1-NEXT:    movq foo(%rip), %rax5435; O1-NEXT:  .Lpcsection160:5436; O1-NEXT:    lock xorw $42, (%rdi)5437; O1-NEXT:    movq $1, foo(%rip)5438; O1-NEXT:    retq5439;5440; O2-LABEL: atomic16_xor_seq_cst:5441; O2:       # %bb.0: # %entry5442; O2-NEXT:    movq foo(%rip), %rax5443; O2-NEXT:  .Lpcsection160:5444; O2-NEXT:    lock xorw $42, (%rdi)5445; O2-NEXT:    movq $1, foo(%rip)5446; O2-NEXT:    retq5447;5448; O3-LABEL: atomic16_xor_seq_cst:5449; O3:       # %bb.0: # %entry5450; O3-NEXT:    movq foo(%rip), %rax5451; O3-NEXT:  .Lpcsection160:5452; O3-NEXT:    lock xorw $42, (%rdi)5453; O3-NEXT:    movq $1, foo(%rip)5454; O3-NEXT:    retq5455;5456; HASWELL-O3-LABEL: atomic16_xor_seq_cst:5457; HASWELL-O3:       # %bb.0: # %entry5458; HASWELL-O3-NEXT:    movq foo(%rip), %rax5459; HASWELL-O3-NEXT:  .Lpcsection160:5460; HASWELL-O3-NEXT:    lock xorw $42, (%rdi)5461; HASWELL-O3-NEXT:    movq $1, foo(%rip)5462; HASWELL-O3-NEXT:    retq5463entry:5464  load volatile i64, ptr @foo, align 85465  %x = atomicrmw xor ptr %a, i16 42 seq_cst, align 2, !pcsections !05466  store volatile i64 1, ptr @foo, align 85467  ret void5468}5469 5470define void @atomic16_nand_seq_cst(ptr %a) {5471; O0-LABEL: atomic16_nand_seq_cst:5472; O0:       # %bb.0: # %entry5473; O0-NEXT:    movq %rdi, {{[-0-9]+}}(%r{{[sb]}}p) # 8-byte Spill5474; O0-NEXT:    movq foo, %rax5475; O0-NEXT:  .Lpcsection174:5476; O0-NEXT:    movw (%rdi), %ax5477; O0-NEXT:    movw %ax, {{[-0-9]+}}(%r{{[sb]}}p) # 2-byte Spill5478; O0-NEXT:  .LBB92_1: # %atomicrmw.start5479; O0-NEXT:    # =>This Inner Loop Header: Depth=15480; O0-NEXT:    movw {{[-0-9]+}}(%r{{[sb]}}p), %ax # 2-byte Reload5481; O0-NEXT:    movq {{[-0-9]+}}(%r{{[sb]}}p), %rcx # 8-byte Reload5482; O0-NEXT:  .Lpcsection175:5483; O0-NEXT:    # implicit-def: $edx5484; O0-NEXT:    movw %ax, %dx5485; O0-NEXT:  .Lpcsection176:5486; O0-NEXT:    notl %edx5487; O0-NEXT:  .Lpcsection177:5488; O0-NEXT:    orl $65493, %edx # imm = 0xFFD55489; O0-NEXT:  .Lpcsection178:5490; O0-NEXT:    # kill: def $dx killed $dx killed $edx5491; O0-NEXT:  .Lpcsection179:5492; O0-NEXT:    lock cmpxchgw %dx, (%rcx)5493; O0-NEXT:  .Lpcsection180:5494; O0-NEXT:    sete %cl5495; O0-NEXT:  .Lpcsection181:5496; O0-NEXT:    testb $1, %cl5497; O0-NEXT:    movw %ax, {{[-0-9]+}}(%r{{[sb]}}p) # 2-byte Spill5498; O0-NEXT:  .Lpcsection182:5499; O0-NEXT:    jne .LBB92_25500; O0-NEXT:    jmp .LBB92_15501; O0-NEXT:  .LBB92_2: # %atomicrmw.end5502; O0-NEXT:    movq $1, foo5503; O0-NEXT:    retq5504;5505; O1-LABEL: atomic16_nand_seq_cst:5506; O1:       # %bb.0: # %entry5507; O1-NEXT:    movq foo(%rip), %rax5508; O1-NEXT:  .Lpcsection161:5509; O1-NEXT:    movzwl (%rdi), %eax5510; O1-NEXT:    .p2align 45511; O1-NEXT:  .LBB92_1: # %atomicrmw.start5512; O1-NEXT:    # =>This Inner Loop Header: Depth=15513; O1-NEXT:    movl %eax, %ecx5514; O1-NEXT:  .Lpcsection162:5515; O1-NEXT:    notl %ecx5516; O1-NEXT:  .Lpcsection163:5517; O1-NEXT:    orl $65493, %ecx # imm = 0xFFD55518; O1-NEXT:  .Lpcsection164:5519; O1-NEXT:    # kill: def $ax killed $ax killed $eax5520; O1-NEXT:  .Lpcsection165:5521; O1-NEXT:    lock cmpxchgw %cx, (%rdi)5522; O1-NEXT:  .Lpcsection166:5523; O1-NEXT:    # kill: def $ax killed $ax def $eax5524; O1-NEXT:  .Lpcsection167:5525; O1-NEXT:    jne .LBB92_15526; O1-NEXT:  # %bb.2: # %atomicrmw.end5527; O1-NEXT:    movq $1, foo(%rip)5528; O1-NEXT:    retq5529;5530; O2-LABEL: atomic16_nand_seq_cst:5531; O2:       # %bb.0: # %entry5532; O2-NEXT:    movq foo(%rip), %rax5533; O2-NEXT:  .Lpcsection161:5534; O2-NEXT:    movzwl (%rdi), %eax5535; O2-NEXT:    .p2align 45536; O2-NEXT:  .LBB92_1: # %atomicrmw.start5537; O2-NEXT:    # =>This Inner Loop Header: Depth=15538; O2-NEXT:    movl %eax, %ecx5539; O2-NEXT:  .Lpcsection162:5540; O2-NEXT:    notl %ecx5541; O2-NEXT:  .Lpcsection163:5542; O2-NEXT:    orl $65493, %ecx # imm = 0xFFD55543; O2-NEXT:  .Lpcsection164:5544; O2-NEXT:    # kill: def $ax killed $ax killed $eax5545; O2-NEXT:  .Lpcsection165:5546; O2-NEXT:    lock cmpxchgw %cx, (%rdi)5547; O2-NEXT:  .Lpcsection166:5548; O2-NEXT:    # kill: def $ax killed $ax def $eax5549; O2-NEXT:  .Lpcsection167:5550; O2-NEXT:    jne .LBB92_15551; O2-NEXT:  # %bb.2: # %atomicrmw.end5552; O2-NEXT:    movq $1, foo(%rip)5553; O2-NEXT:    retq5554;5555; O3-LABEL: atomic16_nand_seq_cst:5556; O3:       # %bb.0: # %entry5557; O3-NEXT:    movq foo(%rip), %rax5558; O3-NEXT:  .Lpcsection161:5559; O3-NEXT:    movzwl (%rdi), %eax5560; O3-NEXT:    .p2align 45561; O3-NEXT:  .LBB92_1: # %atomicrmw.start5562; O3-NEXT:    # =>This Inner Loop Header: Depth=15563; O3-NEXT:    movl %eax, %ecx5564; O3-NEXT:  .Lpcsection162:5565; O3-NEXT:    notl %ecx5566; O3-NEXT:  .Lpcsection163:5567; O3-NEXT:    orl $65493, %ecx # imm = 0xFFD55568; O3-NEXT:  .Lpcsection164:5569; O3-NEXT:    # kill: def $ax killed $ax killed $eax5570; O3-NEXT:  .Lpcsection165:5571; O3-NEXT:    lock cmpxchgw %cx, (%rdi)5572; O3-NEXT:  .Lpcsection166:5573; O3-NEXT:    # kill: def $ax killed $ax def $eax5574; O3-NEXT:  .Lpcsection167:5575; O3-NEXT:    jne .LBB92_15576; O3-NEXT:  # %bb.2: # %atomicrmw.end5577; O3-NEXT:    movq $1, foo(%rip)5578; O3-NEXT:    retq5579;5580; HASWELL-O3-LABEL: atomic16_nand_seq_cst:5581; HASWELL-O3:       # %bb.0: # %entry5582; HASWELL-O3-NEXT:    movq foo(%rip), %rax5583; HASWELL-O3-NEXT:  .Lpcsection161:5584; HASWELL-O3-NEXT:    movzwl (%rdi), %eax5585; HASWELL-O3-NEXT:    .p2align 45586; HASWELL-O3-NEXT:  .LBB92_1: # %atomicrmw.start5587; HASWELL-O3-NEXT:    # =>This Inner Loop Header: Depth=15588; HASWELL-O3-NEXT:    movl %eax, %ecx5589; HASWELL-O3-NEXT:  .Lpcsection162:5590; HASWELL-O3-NEXT:    notl %ecx5591; HASWELL-O3-NEXT:  .Lpcsection163:5592; HASWELL-O3-NEXT:    orl $65493, %ecx # imm = 0xFFD55593; HASWELL-O3-NEXT:  .Lpcsection164:5594; HASWELL-O3-NEXT:    # kill: def $ax killed $ax killed $eax5595; HASWELL-O3-NEXT:  .Lpcsection165:5596; HASWELL-O3-NEXT:    lock cmpxchgw %cx, (%rdi)5597; HASWELL-O3-NEXT:  .Lpcsection166:5598; HASWELL-O3-NEXT:    # kill: def $ax killed $ax def $eax5599; HASWELL-O3-NEXT:  .Lpcsection167:5600; HASWELL-O3-NEXT:    jne .LBB92_15601; HASWELL-O3-NEXT:  # %bb.2: # %atomicrmw.end5602; HASWELL-O3-NEXT:    movq $1, foo(%rip)5603; HASWELL-O3-NEXT:    retq5604entry:5605  load volatile i64, ptr @foo, align 85606  %x = atomicrmw nand ptr %a, i16 42 seq_cst, align 2, !pcsections !05607  store volatile i64 1, ptr @foo, align 85608  ret void5609}5610 5611define void @atomic16_cas_monotonic(ptr %a) {5612; O0-LABEL: atomic16_cas_monotonic:5613; O0:       # %bb.0: # %entry5614; O0-NEXT:    movq foo(%rip), %rax5615; O0-NEXT:    movw $42, %ax5616; O0-NEXT:    movw %ax, {{[-0-9]+}}(%r{{[sb]}}p) # 2-byte Spill5617; O0-NEXT:    movw $1, %cx5618; O0-NEXT:  .Lpcsection183:5619; O0-NEXT:    lock cmpxchgw %cx, (%rdi)5620; O0-NEXT:  .Lpcsection184:5621; O0-NEXT:    # kill: def $dx killed $ax5622; O0-NEXT:    movw {{[-0-9]+}}(%r{{[sb]}}p), %ax # 2-byte Reload5623; O0-NEXT:  .Lpcsection185:5624; O0-NEXT:    lock cmpxchgw %cx, (%rdi)5625; O0-NEXT:  .Lpcsection186:5626; O0-NEXT:    # kill: def $dx killed $ax5627; O0-NEXT:    movw {{[-0-9]+}}(%r{{[sb]}}p), %ax # 2-byte Reload5628; O0-NEXT:  .Lpcsection187:5629; O0-NEXT:    lock cmpxchgw %cx, (%rdi)5630; O0-NEXT:    movq $1, foo5631; O0-NEXT:    retq5632;5633; O1-LABEL: atomic16_cas_monotonic:5634; O1:       # %bb.0: # %entry5635; O1-NEXT:    movq foo(%rip), %rax5636; O1-NEXT:    movw $1, %cx5637; O1-NEXT:    movw $42, %ax5638; O1-NEXT:  .Lpcsection168:5639; O1-NEXT:    lock cmpxchgw %cx, (%rdi)5640; O1-NEXT:    movw $42, %ax5641; O1-NEXT:  .Lpcsection169:5642; O1-NEXT:    lock cmpxchgw %cx, (%rdi)5643; O1-NEXT:    movw $42, %ax5644; O1-NEXT:  .Lpcsection170:5645; O1-NEXT:    lock cmpxchgw %cx, (%rdi)5646; O1-NEXT:    movq $1, foo(%rip)5647; O1-NEXT:    retq5648;5649; O2-LABEL: atomic16_cas_monotonic:5650; O2:       # %bb.0: # %entry5651; O2-NEXT:    movq foo(%rip), %rax5652; O2-NEXT:    movw $1, %cx5653; O2-NEXT:    movw $42, %ax5654; O2-NEXT:  .Lpcsection168:5655; O2-NEXT:    lock cmpxchgw %cx, (%rdi)5656; O2-NEXT:    movw $42, %ax5657; O2-NEXT:  .Lpcsection169:5658; O2-NEXT:    lock cmpxchgw %cx, (%rdi)5659; O2-NEXT:    movw $42, %ax5660; O2-NEXT:  .Lpcsection170:5661; O2-NEXT:    lock cmpxchgw %cx, (%rdi)5662; O2-NEXT:    movq $1, foo(%rip)5663; O2-NEXT:    retq5664;5665; O3-LABEL: atomic16_cas_monotonic:5666; O3:       # %bb.0: # %entry5667; O3-NEXT:    movq foo(%rip), %rax5668; O3-NEXT:    movw $1, %cx5669; O3-NEXT:    movw $42, %ax5670; O3-NEXT:  .Lpcsection168:5671; O3-NEXT:    lock cmpxchgw %cx, (%rdi)5672; O3-NEXT:    movw $42, %ax5673; O3-NEXT:  .Lpcsection169:5674; O3-NEXT:    lock cmpxchgw %cx, (%rdi)5675; O3-NEXT:    movw $42, %ax5676; O3-NEXT:  .Lpcsection170:5677; O3-NEXT:    lock cmpxchgw %cx, (%rdi)5678; O3-NEXT:    movq $1, foo(%rip)5679; O3-NEXT:    retq5680;5681; HASWELL-O3-LABEL: atomic16_cas_monotonic:5682; HASWELL-O3:       # %bb.0: # %entry5683; HASWELL-O3-NEXT:    movq foo(%rip), %rax5684; HASWELL-O3-NEXT:    movw $1, %cx5685; HASWELL-O3-NEXT:    movw $42, %ax5686; HASWELL-O3-NEXT:  .Lpcsection168:5687; HASWELL-O3-NEXT:    lock cmpxchgw %cx, (%rdi)5688; HASWELL-O3-NEXT:    movw $42, %ax5689; HASWELL-O3-NEXT:  .Lpcsection169:5690; HASWELL-O3-NEXT:    lock cmpxchgw %cx, (%rdi)5691; HASWELL-O3-NEXT:    movw $42, %ax5692; HASWELL-O3-NEXT:  .Lpcsection170:5693; HASWELL-O3-NEXT:    lock cmpxchgw %cx, (%rdi)5694; HASWELL-O3-NEXT:    movq $1, foo(%rip)5695; HASWELL-O3-NEXT:    retq5696entry:5697  load volatile i64, ptr @foo, align 85698  %x = cmpxchg ptr %a, i16 42, i16 1 monotonic monotonic, align 2, !pcsections !05699  %y = cmpxchg ptr %a, i16 42, i16 1 monotonic acquire, align 2, !pcsections !05700  %z = cmpxchg ptr %a, i16 42, i16 1 monotonic seq_cst, align 2, !pcsections !05701  store volatile i64 1, ptr @foo, align 85702  ret void5703}5704 5705define void @atomic16_cas_acquire(ptr %a) {5706; O0-LABEL: atomic16_cas_acquire:5707; O0:       # %bb.0: # %entry5708; O0-NEXT:    movq foo(%rip), %rax5709; O0-NEXT:    movw $42, %ax5710; O0-NEXT:    movw %ax, {{[-0-9]+}}(%r{{[sb]}}p) # 2-byte Spill5711; O0-NEXT:    movw $1, %cx5712; O0-NEXT:  .Lpcsection188:5713; O0-NEXT:    lock cmpxchgw %cx, (%rdi)5714; O0-NEXT:  .Lpcsection189:5715; O0-NEXT:    # kill: def $dx killed $ax5716; O0-NEXT:    movw {{[-0-9]+}}(%r{{[sb]}}p), %ax # 2-byte Reload5717; O0-NEXT:  .Lpcsection190:5718; O0-NEXT:    lock cmpxchgw %cx, (%rdi)5719; O0-NEXT:  .Lpcsection191:5720; O0-NEXT:    # kill: def $dx killed $ax5721; O0-NEXT:    movw {{[-0-9]+}}(%r{{[sb]}}p), %ax # 2-byte Reload5722; O0-NEXT:  .Lpcsection192:5723; O0-NEXT:    lock cmpxchgw %cx, (%rdi)5724; O0-NEXT:    movq $1, foo5725; O0-NEXT:    retq5726;5727; O1-LABEL: atomic16_cas_acquire:5728; O1:       # %bb.0: # %entry5729; O1-NEXT:    movq foo(%rip), %rax5730; O1-NEXT:    movw $1, %cx5731; O1-NEXT:    movw $42, %ax5732; O1-NEXT:  .Lpcsection171:5733; O1-NEXT:    lock cmpxchgw %cx, (%rdi)5734; O1-NEXT:    movw $42, %ax5735; O1-NEXT:  .Lpcsection172:5736; O1-NEXT:    lock cmpxchgw %cx, (%rdi)5737; O1-NEXT:    movw $42, %ax5738; O1-NEXT:  .Lpcsection173:5739; O1-NEXT:    lock cmpxchgw %cx, (%rdi)5740; O1-NEXT:    movq $1, foo(%rip)5741; O1-NEXT:    retq5742;5743; O2-LABEL: atomic16_cas_acquire:5744; O2:       # %bb.0: # %entry5745; O2-NEXT:    movq foo(%rip), %rax5746; O2-NEXT:    movw $1, %cx5747; O2-NEXT:    movw $42, %ax5748; O2-NEXT:  .Lpcsection171:5749; O2-NEXT:    lock cmpxchgw %cx, (%rdi)5750; O2-NEXT:    movw $42, %ax5751; O2-NEXT:  .Lpcsection172:5752; O2-NEXT:    lock cmpxchgw %cx, (%rdi)5753; O2-NEXT:    movw $42, %ax5754; O2-NEXT:  .Lpcsection173:5755; O2-NEXT:    lock cmpxchgw %cx, (%rdi)5756; O2-NEXT:    movq $1, foo(%rip)5757; O2-NEXT:    retq5758;5759; O3-LABEL: atomic16_cas_acquire:5760; O3:       # %bb.0: # %entry5761; O3-NEXT:    movq foo(%rip), %rax5762; O3-NEXT:    movw $1, %cx5763; O3-NEXT:    movw $42, %ax5764; O3-NEXT:  .Lpcsection171:5765; O3-NEXT:    lock cmpxchgw %cx, (%rdi)5766; O3-NEXT:    movw $42, %ax5767; O3-NEXT:  .Lpcsection172:5768; O3-NEXT:    lock cmpxchgw %cx, (%rdi)5769; O3-NEXT:    movw $42, %ax5770; O3-NEXT:  .Lpcsection173:5771; O3-NEXT:    lock cmpxchgw %cx, (%rdi)5772; O3-NEXT:    movq $1, foo(%rip)5773; O3-NEXT:    retq5774;5775; HASWELL-O3-LABEL: atomic16_cas_acquire:5776; HASWELL-O3:       # %bb.0: # %entry5777; HASWELL-O3-NEXT:    movq foo(%rip), %rax5778; HASWELL-O3-NEXT:    movw $1, %cx5779; HASWELL-O3-NEXT:    movw $42, %ax5780; HASWELL-O3-NEXT:  .Lpcsection171:5781; HASWELL-O3-NEXT:    lock cmpxchgw %cx, (%rdi)5782; HASWELL-O3-NEXT:    movw $42, %ax5783; HASWELL-O3-NEXT:  .Lpcsection172:5784; HASWELL-O3-NEXT:    lock cmpxchgw %cx, (%rdi)5785; HASWELL-O3-NEXT:    movw $42, %ax5786; HASWELL-O3-NEXT:  .Lpcsection173:5787; HASWELL-O3-NEXT:    lock cmpxchgw %cx, (%rdi)5788; HASWELL-O3-NEXT:    movq $1, foo(%rip)5789; HASWELL-O3-NEXT:    retq5790entry:5791  load volatile i64, ptr @foo, align 85792  %x = cmpxchg ptr %a, i16 42, i16 1 acquire monotonic, align 2, !pcsections !05793  %y = cmpxchg ptr %a, i16 42, i16 1 acquire acquire, align 2, !pcsections !05794  %z = cmpxchg ptr %a, i16 42, i16 1 acquire seq_cst, align 2, !pcsections !05795  store volatile i64 1, ptr @foo, align 85796  ret void5797}5798 5799define void @atomic16_cas_release(ptr %a) {5800; O0-LABEL: atomic16_cas_release:5801; O0:       # %bb.0: # %entry5802; O0-NEXT:    movq foo(%rip), %rax5803; O0-NEXT:    movw $42, %ax5804; O0-NEXT:    movw %ax, {{[-0-9]+}}(%r{{[sb]}}p) # 2-byte Spill5805; O0-NEXT:    movw $1, %cx5806; O0-NEXT:  .Lpcsection193:5807; O0-NEXT:    lock cmpxchgw %cx, (%rdi)5808; O0-NEXT:  .Lpcsection194:5809; O0-NEXT:    # kill: def $dx killed $ax5810; O0-NEXT:    movw {{[-0-9]+}}(%r{{[sb]}}p), %ax # 2-byte Reload5811; O0-NEXT:  .Lpcsection195:5812; O0-NEXT:    lock cmpxchgw %cx, (%rdi)5813; O0-NEXT:  .Lpcsection196:5814; O0-NEXT:    # kill: def $dx killed $ax5815; O0-NEXT:    movw {{[-0-9]+}}(%r{{[sb]}}p), %ax # 2-byte Reload5816; O0-NEXT:  .Lpcsection197:5817; O0-NEXT:    lock cmpxchgw %cx, (%rdi)5818; O0-NEXT:    movq $1, foo5819; O0-NEXT:    retq5820;5821; O1-LABEL: atomic16_cas_release:5822; O1:       # %bb.0: # %entry5823; O1-NEXT:    movq foo(%rip), %rax5824; O1-NEXT:    movw $1, %cx5825; O1-NEXT:    movw $42, %ax5826; O1-NEXT:  .Lpcsection174:5827; O1-NEXT:    lock cmpxchgw %cx, (%rdi)5828; O1-NEXT:    movw $42, %ax5829; O1-NEXT:  .Lpcsection175:5830; O1-NEXT:    lock cmpxchgw %cx, (%rdi)5831; O1-NEXT:    movw $42, %ax5832; O1-NEXT:  .Lpcsection176:5833; O1-NEXT:    lock cmpxchgw %cx, (%rdi)5834; O1-NEXT:    movq $1, foo(%rip)5835; O1-NEXT:    retq5836;5837; O2-LABEL: atomic16_cas_release:5838; O2:       # %bb.0: # %entry5839; O2-NEXT:    movq foo(%rip), %rax5840; O2-NEXT:    movw $1, %cx5841; O2-NEXT:    movw $42, %ax5842; O2-NEXT:  .Lpcsection174:5843; O2-NEXT:    lock cmpxchgw %cx, (%rdi)5844; O2-NEXT:    movw $42, %ax5845; O2-NEXT:  .Lpcsection175:5846; O2-NEXT:    lock cmpxchgw %cx, (%rdi)5847; O2-NEXT:    movw $42, %ax5848; O2-NEXT:  .Lpcsection176:5849; O2-NEXT:    lock cmpxchgw %cx, (%rdi)5850; O2-NEXT:    movq $1, foo(%rip)5851; O2-NEXT:    retq5852;5853; O3-LABEL: atomic16_cas_release:5854; O3:       # %bb.0: # %entry5855; O3-NEXT:    movq foo(%rip), %rax5856; O3-NEXT:    movw $1, %cx5857; O3-NEXT:    movw $42, %ax5858; O3-NEXT:  .Lpcsection174:5859; O3-NEXT:    lock cmpxchgw %cx, (%rdi)5860; O3-NEXT:    movw $42, %ax5861; O3-NEXT:  .Lpcsection175:5862; O3-NEXT:    lock cmpxchgw %cx, (%rdi)5863; O3-NEXT:    movw $42, %ax5864; O3-NEXT:  .Lpcsection176:5865; O3-NEXT:    lock cmpxchgw %cx, (%rdi)5866; O3-NEXT:    movq $1, foo(%rip)5867; O3-NEXT:    retq5868;5869; HASWELL-O3-LABEL: atomic16_cas_release:5870; HASWELL-O3:       # %bb.0: # %entry5871; HASWELL-O3-NEXT:    movq foo(%rip), %rax5872; HASWELL-O3-NEXT:    movw $1, %cx5873; HASWELL-O3-NEXT:    movw $42, %ax5874; HASWELL-O3-NEXT:  .Lpcsection174:5875; HASWELL-O3-NEXT:    lock cmpxchgw %cx, (%rdi)5876; HASWELL-O3-NEXT:    movw $42, %ax5877; HASWELL-O3-NEXT:  .Lpcsection175:5878; HASWELL-O3-NEXT:    lock cmpxchgw %cx, (%rdi)5879; HASWELL-O3-NEXT:    movw $42, %ax5880; HASWELL-O3-NEXT:  .Lpcsection176:5881; HASWELL-O3-NEXT:    lock cmpxchgw %cx, (%rdi)5882; HASWELL-O3-NEXT:    movq $1, foo(%rip)5883; HASWELL-O3-NEXT:    retq5884entry:5885  load volatile i64, ptr @foo, align 85886  %x = cmpxchg ptr %a, i16 42, i16 1 release monotonic, align 2, !pcsections !05887  %y = cmpxchg ptr %a, i16 42, i16 1 release acquire, align 2, !pcsections !05888  %z = cmpxchg ptr %a, i16 42, i16 1 release seq_cst, align 2, !pcsections !05889  store volatile i64 1, ptr @foo, align 85890  ret void5891}5892 5893define void @atomic16_cas_acq_rel(ptr %a) {5894; O0-LABEL: atomic16_cas_acq_rel:5895; O0:       # %bb.0: # %entry5896; O0-NEXT:    movq foo(%rip), %rax5897; O0-NEXT:    movw $42, %ax5898; O0-NEXT:    movw %ax, {{[-0-9]+}}(%r{{[sb]}}p) # 2-byte Spill5899; O0-NEXT:    movw $1, %cx5900; O0-NEXT:  .Lpcsection198:5901; O0-NEXT:    lock cmpxchgw %cx, (%rdi)5902; O0-NEXT:  .Lpcsection199:5903; O0-NEXT:    # kill: def $dx killed $ax5904; O0-NEXT:    movw {{[-0-9]+}}(%r{{[sb]}}p), %ax # 2-byte Reload5905; O0-NEXT:  .Lpcsection200:5906; O0-NEXT:    lock cmpxchgw %cx, (%rdi)5907; O0-NEXT:  .Lpcsection201:5908; O0-NEXT:    # kill: def $dx killed $ax5909; O0-NEXT:    movw {{[-0-9]+}}(%r{{[sb]}}p), %ax # 2-byte Reload5910; O0-NEXT:  .Lpcsection202:5911; O0-NEXT:    lock cmpxchgw %cx, (%rdi)5912; O0-NEXT:    movq $1, foo5913; O0-NEXT:    retq5914;5915; O1-LABEL: atomic16_cas_acq_rel:5916; O1:       # %bb.0: # %entry5917; O1-NEXT:    movq foo(%rip), %rax5918; O1-NEXT:    movw $1, %cx5919; O1-NEXT:    movw $42, %ax5920; O1-NEXT:  .Lpcsection177:5921; O1-NEXT:    lock cmpxchgw %cx, (%rdi)5922; O1-NEXT:    movw $42, %ax5923; O1-NEXT:  .Lpcsection178:5924; O1-NEXT:    lock cmpxchgw %cx, (%rdi)5925; O1-NEXT:    movw $42, %ax5926; O1-NEXT:  .Lpcsection179:5927; O1-NEXT:    lock cmpxchgw %cx, (%rdi)5928; O1-NEXT:    movq $1, foo(%rip)5929; O1-NEXT:    retq5930;5931; O2-LABEL: atomic16_cas_acq_rel:5932; O2:       # %bb.0: # %entry5933; O2-NEXT:    movq foo(%rip), %rax5934; O2-NEXT:    movw $1, %cx5935; O2-NEXT:    movw $42, %ax5936; O2-NEXT:  .Lpcsection177:5937; O2-NEXT:    lock cmpxchgw %cx, (%rdi)5938; O2-NEXT:    movw $42, %ax5939; O2-NEXT:  .Lpcsection178:5940; O2-NEXT:    lock cmpxchgw %cx, (%rdi)5941; O2-NEXT:    movw $42, %ax5942; O2-NEXT:  .Lpcsection179:5943; O2-NEXT:    lock cmpxchgw %cx, (%rdi)5944; O2-NEXT:    movq $1, foo(%rip)5945; O2-NEXT:    retq5946;5947; O3-LABEL: atomic16_cas_acq_rel:5948; O3:       # %bb.0: # %entry5949; O3-NEXT:    movq foo(%rip), %rax5950; O3-NEXT:    movw $1, %cx5951; O3-NEXT:    movw $42, %ax5952; O3-NEXT:  .Lpcsection177:5953; O3-NEXT:    lock cmpxchgw %cx, (%rdi)5954; O3-NEXT:    movw $42, %ax5955; O3-NEXT:  .Lpcsection178:5956; O3-NEXT:    lock cmpxchgw %cx, (%rdi)5957; O3-NEXT:    movw $42, %ax5958; O3-NEXT:  .Lpcsection179:5959; O3-NEXT:    lock cmpxchgw %cx, (%rdi)5960; O3-NEXT:    movq $1, foo(%rip)5961; O3-NEXT:    retq5962;5963; HASWELL-O3-LABEL: atomic16_cas_acq_rel:5964; HASWELL-O3:       # %bb.0: # %entry5965; HASWELL-O3-NEXT:    movq foo(%rip), %rax5966; HASWELL-O3-NEXT:    movw $1, %cx5967; HASWELL-O3-NEXT:    movw $42, %ax5968; HASWELL-O3-NEXT:  .Lpcsection177:5969; HASWELL-O3-NEXT:    lock cmpxchgw %cx, (%rdi)5970; HASWELL-O3-NEXT:    movw $42, %ax5971; HASWELL-O3-NEXT:  .Lpcsection178:5972; HASWELL-O3-NEXT:    lock cmpxchgw %cx, (%rdi)5973; HASWELL-O3-NEXT:    movw $42, %ax5974; HASWELL-O3-NEXT:  .Lpcsection179:5975; HASWELL-O3-NEXT:    lock cmpxchgw %cx, (%rdi)5976; HASWELL-O3-NEXT:    movq $1, foo(%rip)5977; HASWELL-O3-NEXT:    retq5978entry:5979  load volatile i64, ptr @foo, align 85980  %x = cmpxchg ptr %a, i16 42, i16 1 acq_rel monotonic, align 2, !pcsections !05981  %y = cmpxchg ptr %a, i16 42, i16 1 acq_rel acquire, align 2, !pcsections !05982  %z = cmpxchg ptr %a, i16 42, i16 1 acq_rel seq_cst, align 2, !pcsections !05983  store volatile i64 1, ptr @foo, align 85984  ret void5985}5986 5987define void @atomic16_cas_seq_cst(ptr %a) {5988; O0-LABEL: atomic16_cas_seq_cst:5989; O0:       # %bb.0: # %entry5990; O0-NEXT:    movq foo(%rip), %rax5991; O0-NEXT:    movw $42, %ax5992; O0-NEXT:    movw %ax, {{[-0-9]+}}(%r{{[sb]}}p) # 2-byte Spill5993; O0-NEXT:    movw $1, %cx5994; O0-NEXT:  .Lpcsection203:5995; O0-NEXT:    lock cmpxchgw %cx, (%rdi)5996; O0-NEXT:  .Lpcsection204:5997; O0-NEXT:    # kill: def $dx killed $ax5998; O0-NEXT:    movw {{[-0-9]+}}(%r{{[sb]}}p), %ax # 2-byte Reload5999; O0-NEXT:  .Lpcsection205:6000; O0-NEXT:    lock cmpxchgw %cx, (%rdi)6001; O0-NEXT:  .Lpcsection206:6002; O0-NEXT:    # kill: def $dx killed $ax6003; O0-NEXT:    movw {{[-0-9]+}}(%r{{[sb]}}p), %ax # 2-byte Reload6004; O0-NEXT:  .Lpcsection207:6005; O0-NEXT:    lock cmpxchgw %cx, (%rdi)6006; O0-NEXT:    movq $1, foo6007; O0-NEXT:    retq6008;6009; O1-LABEL: atomic16_cas_seq_cst:6010; O1:       # %bb.0: # %entry6011; O1-NEXT:    movq foo(%rip), %rax6012; O1-NEXT:    movw $1, %cx6013; O1-NEXT:    movw $42, %ax6014; O1-NEXT:  .Lpcsection180:6015; O1-NEXT:    lock cmpxchgw %cx, (%rdi)6016; O1-NEXT:    movw $42, %ax6017; O1-NEXT:  .Lpcsection181:6018; O1-NEXT:    lock cmpxchgw %cx, (%rdi)6019; O1-NEXT:    movw $42, %ax6020; O1-NEXT:  .Lpcsection182:6021; O1-NEXT:    lock cmpxchgw %cx, (%rdi)6022; O1-NEXT:    movq $1, foo(%rip)6023; O1-NEXT:    retq6024;6025; O2-LABEL: atomic16_cas_seq_cst:6026; O2:       # %bb.0: # %entry6027; O2-NEXT:    movq foo(%rip), %rax6028; O2-NEXT:    movw $1, %cx6029; O2-NEXT:    movw $42, %ax6030; O2-NEXT:  .Lpcsection180:6031; O2-NEXT:    lock cmpxchgw %cx, (%rdi)6032; O2-NEXT:    movw $42, %ax6033; O2-NEXT:  .Lpcsection181:6034; O2-NEXT:    lock cmpxchgw %cx, (%rdi)6035; O2-NEXT:    movw $42, %ax6036; O2-NEXT:  .Lpcsection182:6037; O2-NEXT:    lock cmpxchgw %cx, (%rdi)6038; O2-NEXT:    movq $1, foo(%rip)6039; O2-NEXT:    retq6040;6041; O3-LABEL: atomic16_cas_seq_cst:6042; O3:       # %bb.0: # %entry6043; O3-NEXT:    movq foo(%rip), %rax6044; O3-NEXT:    movw $1, %cx6045; O3-NEXT:    movw $42, %ax6046; O3-NEXT:  .Lpcsection180:6047; O3-NEXT:    lock cmpxchgw %cx, (%rdi)6048; O3-NEXT:    movw $42, %ax6049; O3-NEXT:  .Lpcsection181:6050; O3-NEXT:    lock cmpxchgw %cx, (%rdi)6051; O3-NEXT:    movw $42, %ax6052; O3-NEXT:  .Lpcsection182:6053; O3-NEXT:    lock cmpxchgw %cx, (%rdi)6054; O3-NEXT:    movq $1, foo(%rip)6055; O3-NEXT:    retq6056;6057; HASWELL-O3-LABEL: atomic16_cas_seq_cst:6058; HASWELL-O3:       # %bb.0: # %entry6059; HASWELL-O3-NEXT:    movq foo(%rip), %rax6060; HASWELL-O3-NEXT:    movw $1, %cx6061; HASWELL-O3-NEXT:    movw $42, %ax6062; HASWELL-O3-NEXT:  .Lpcsection180:6063; HASWELL-O3-NEXT:    lock cmpxchgw %cx, (%rdi)6064; HASWELL-O3-NEXT:    movw $42, %ax6065; HASWELL-O3-NEXT:  .Lpcsection181:6066; HASWELL-O3-NEXT:    lock cmpxchgw %cx, (%rdi)6067; HASWELL-O3-NEXT:    movw $42, %ax6068; HASWELL-O3-NEXT:  .Lpcsection182:6069; HASWELL-O3-NEXT:    lock cmpxchgw %cx, (%rdi)6070; HASWELL-O3-NEXT:    movq $1, foo(%rip)6071; HASWELL-O3-NEXT:    retq6072entry:6073  load volatile i64, ptr @foo, align 86074  %x = cmpxchg ptr %a, i16 42, i16 1 seq_cst monotonic, align 2, !pcsections !06075  %y = cmpxchg ptr %a, i16 42, i16 1 seq_cst acquire, align 2, !pcsections !06076  %z = cmpxchg ptr %a, i16 42, i16 1 seq_cst seq_cst, align 2, !pcsections !06077  store volatile i64 1, ptr @foo, align 86078  ret void6079}6080 6081define i32 @atomic32_load_unordered(ptr %a) {6082; O0-LABEL: atomic32_load_unordered:6083; O0:       # %bb.0: # %entry6084; O0-NEXT:    movq foo(%rip), %rax6085; O0-NEXT:  .Lpcsection208:6086; O0-NEXT:    movl (%rdi), %eax6087; O0-NEXT:    movq $1, foo6088; O0-NEXT:    retq6089;6090; O1-LABEL: atomic32_load_unordered:6091; O1:       # %bb.0: # %entry6092; O1-NEXT:    movq foo(%rip), %rax6093; O1-NEXT:  .Lpcsection183:6094; O1-NEXT:    movl (%rdi), %eax6095; O1-NEXT:    movq $1, foo(%rip)6096; O1-NEXT:    retq6097;6098; O2-LABEL: atomic32_load_unordered:6099; O2:       # %bb.0: # %entry6100; O2-NEXT:    movq foo(%rip), %rax6101; O2-NEXT:  .Lpcsection183:6102; O2-NEXT:    movl (%rdi), %eax6103; O2-NEXT:    movq $1, foo(%rip)6104; O2-NEXT:    retq6105;6106; O3-LABEL: atomic32_load_unordered:6107; O3:       # %bb.0: # %entry6108; O3-NEXT:    movq foo(%rip), %rax6109; O3-NEXT:  .Lpcsection183:6110; O3-NEXT:    movl (%rdi), %eax6111; O3-NEXT:    movq $1, foo(%rip)6112; O3-NEXT:    retq6113;6114; HASWELL-O3-LABEL: atomic32_load_unordered:6115; HASWELL-O3:       # %bb.0: # %entry6116; HASWELL-O3-NEXT:    movq foo(%rip), %rax6117; HASWELL-O3-NEXT:  .Lpcsection183:6118; HASWELL-O3-NEXT:    movl (%rdi), %eax6119; HASWELL-O3-NEXT:    movq $1, foo(%rip)6120; HASWELL-O3-NEXT:    retq6121entry:6122  load volatile i64, ptr @foo, align 86123  %x = load atomic i32, ptr %a unordered, align 4, !pcsections !06124  store volatile i64 1, ptr @foo, align 86125  ret i32 %x6126}6127 6128define i32 @atomic32_load_monotonic(ptr %a) {6129; O0-LABEL: atomic32_load_monotonic:6130; O0:       # %bb.0: # %entry6131; O0-NEXT:    movq foo(%rip), %rax6132; O0-NEXT:  .Lpcsection209:6133; O0-NEXT:    movl (%rdi), %eax6134; O0-NEXT:    movq $1, foo6135; O0-NEXT:    retq6136;6137; O1-LABEL: atomic32_load_monotonic:6138; O1:       # %bb.0: # %entry6139; O1-NEXT:    movq foo(%rip), %rax6140; O1-NEXT:  .Lpcsection184:6141; O1-NEXT:    movl (%rdi), %eax6142; O1-NEXT:    movq $1, foo(%rip)6143; O1-NEXT:    retq6144;6145; O2-LABEL: atomic32_load_monotonic:6146; O2:       # %bb.0: # %entry6147; O2-NEXT:    movq foo(%rip), %rax6148; O2-NEXT:  .Lpcsection184:6149; O2-NEXT:    movl (%rdi), %eax6150; O2-NEXT:    movq $1, foo(%rip)6151; O2-NEXT:    retq6152;6153; O3-LABEL: atomic32_load_monotonic:6154; O3:       # %bb.0: # %entry6155; O3-NEXT:    movq foo(%rip), %rax6156; O3-NEXT:  .Lpcsection184:6157; O3-NEXT:    movl (%rdi), %eax6158; O3-NEXT:    movq $1, foo(%rip)6159; O3-NEXT:    retq6160;6161; HASWELL-O3-LABEL: atomic32_load_monotonic:6162; HASWELL-O3:       # %bb.0: # %entry6163; HASWELL-O3-NEXT:    movq foo(%rip), %rax6164; HASWELL-O3-NEXT:  .Lpcsection184:6165; HASWELL-O3-NEXT:    movl (%rdi), %eax6166; HASWELL-O3-NEXT:    movq $1, foo(%rip)6167; HASWELL-O3-NEXT:    retq6168entry:6169  load volatile i64, ptr @foo, align 86170  %x = load atomic i32, ptr %a monotonic, align 4, !pcsections !06171  store volatile i64 1, ptr @foo, align 86172  ret i32 %x6173}6174 6175define i32 @atomic32_load_acquire(ptr %a) {6176; O0-LABEL: atomic32_load_acquire:6177; O0:       # %bb.0: # %entry6178; O0-NEXT:    movq foo(%rip), %rax6179; O0-NEXT:  .Lpcsection210:6180; O0-NEXT:    movl (%rdi), %eax6181; O0-NEXT:    movq $1, foo6182; O0-NEXT:    retq6183;6184; O1-LABEL: atomic32_load_acquire:6185; O1:       # %bb.0: # %entry6186; O1-NEXT:    movq foo(%rip), %rax6187; O1-NEXT:  .Lpcsection185:6188; O1-NEXT:    movl (%rdi), %eax6189; O1-NEXT:    movq $1, foo(%rip)6190; O1-NEXT:    retq6191;6192; O2-LABEL: atomic32_load_acquire:6193; O2:       # %bb.0: # %entry6194; O2-NEXT:    movq foo(%rip), %rax6195; O2-NEXT:  .Lpcsection185:6196; O2-NEXT:    movl (%rdi), %eax6197; O2-NEXT:    movq $1, foo(%rip)6198; O2-NEXT:    retq6199;6200; O3-LABEL: atomic32_load_acquire:6201; O3:       # %bb.0: # %entry6202; O3-NEXT:    movq foo(%rip), %rax6203; O3-NEXT:  .Lpcsection185:6204; O3-NEXT:    movl (%rdi), %eax6205; O3-NEXT:    movq $1, foo(%rip)6206; O3-NEXT:    retq6207;6208; HASWELL-O3-LABEL: atomic32_load_acquire:6209; HASWELL-O3:       # %bb.0: # %entry6210; HASWELL-O3-NEXT:    movq foo(%rip), %rax6211; HASWELL-O3-NEXT:  .Lpcsection185:6212; HASWELL-O3-NEXT:    movl (%rdi), %eax6213; HASWELL-O3-NEXT:    movq $1, foo(%rip)6214; HASWELL-O3-NEXT:    retq6215entry:6216  load volatile i64, ptr @foo, align 86217  %x = load atomic i32, ptr %a acquire, align 4, !pcsections !06218  store volatile i64 1, ptr @foo, align 86219  ret i32 %x6220}6221 6222define i32 @atomic32_load_seq_cst(ptr %a) {6223; O0-LABEL: atomic32_load_seq_cst:6224; O0:       # %bb.0: # %entry6225; O0-NEXT:    movq foo(%rip), %rax6226; O0-NEXT:  .Lpcsection211:6227; O0-NEXT:    movl (%rdi), %eax6228; O0-NEXT:    movq $1, foo6229; O0-NEXT:    retq6230;6231; O1-LABEL: atomic32_load_seq_cst:6232; O1:       # %bb.0: # %entry6233; O1-NEXT:    movq foo(%rip), %rax6234; O1-NEXT:  .Lpcsection186:6235; O1-NEXT:    movl (%rdi), %eax6236; O1-NEXT:    movq $1, foo(%rip)6237; O1-NEXT:    retq6238;6239; O2-LABEL: atomic32_load_seq_cst:6240; O2:       # %bb.0: # %entry6241; O2-NEXT:    movq foo(%rip), %rax6242; O2-NEXT:  .Lpcsection186:6243; O2-NEXT:    movl (%rdi), %eax6244; O2-NEXT:    movq $1, foo(%rip)6245; O2-NEXT:    retq6246;6247; O3-LABEL: atomic32_load_seq_cst:6248; O3:       # %bb.0: # %entry6249; O3-NEXT:    movq foo(%rip), %rax6250; O3-NEXT:  .Lpcsection186:6251; O3-NEXT:    movl (%rdi), %eax6252; O3-NEXT:    movq $1, foo(%rip)6253; O3-NEXT:    retq6254;6255; HASWELL-O3-LABEL: atomic32_load_seq_cst:6256; HASWELL-O3:       # %bb.0: # %entry6257; HASWELL-O3-NEXT:    movq foo(%rip), %rax6258; HASWELL-O3-NEXT:  .Lpcsection186:6259; HASWELL-O3-NEXT:    movl (%rdi), %eax6260; HASWELL-O3-NEXT:    movq $1, foo(%rip)6261; HASWELL-O3-NEXT:    retq6262entry:6263  load volatile i64, ptr @foo, align 86264  %x = load atomic i32, ptr %a seq_cst, align 4, !pcsections !06265  store volatile i64 1, ptr @foo, align 86266  ret i32 %x6267}6268 6269define void @atomic32_store_unordered(ptr %a) {6270; O0-LABEL: atomic32_store_unordered:6271; O0:       # %bb.0: # %entry6272; O0-NEXT:    movq foo(%rip), %rax6273; O0-NEXT:  .Lpcsection212:6274; O0-NEXT:    movl $42, (%rdi)6275; O0-NEXT:    movq $1, foo6276; O0-NEXT:    retq6277;6278; O1-LABEL: atomic32_store_unordered:6279; O1:       # %bb.0: # %entry6280; O1-NEXT:    movq foo(%rip), %rax6281; O1-NEXT:  .Lpcsection187:6282; O1-NEXT:    movl $42, (%rdi)6283; O1-NEXT:    movq $1, foo(%rip)6284; O1-NEXT:    retq6285;6286; O2-LABEL: atomic32_store_unordered:6287; O2:       # %bb.0: # %entry6288; O2-NEXT:    movq foo(%rip), %rax6289; O2-NEXT:  .Lpcsection187:6290; O2-NEXT:    movl $42, (%rdi)6291; O2-NEXT:    movq $1, foo(%rip)6292; O2-NEXT:    retq6293;6294; O3-LABEL: atomic32_store_unordered:6295; O3:       # %bb.0: # %entry6296; O3-NEXT:    movq foo(%rip), %rax6297; O3-NEXT:  .Lpcsection187:6298; O3-NEXT:    movl $42, (%rdi)6299; O3-NEXT:    movq $1, foo(%rip)6300; O3-NEXT:    retq6301;6302; HASWELL-O3-LABEL: atomic32_store_unordered:6303; HASWELL-O3:       # %bb.0: # %entry6304; HASWELL-O3-NEXT:    movq foo(%rip), %rax6305; HASWELL-O3-NEXT:  .Lpcsection187:6306; HASWELL-O3-NEXT:    movl $42, (%rdi)6307; HASWELL-O3-NEXT:    movq $1, foo(%rip)6308; HASWELL-O3-NEXT:    retq6309entry:6310  load volatile i64, ptr @foo, align 86311  store atomic i32 42, ptr %a unordered, align 4, !pcsections !06312  store volatile i64 1, ptr @foo, align 86313  ret void6314}6315 6316define void @atomic32_store_monotonic(ptr %a) {6317; O0-LABEL: atomic32_store_monotonic:6318; O0:       # %bb.0: # %entry6319; O0-NEXT:    movq foo(%rip), %rax6320; O0-NEXT:  .Lpcsection213:6321; O0-NEXT:    movl $42, (%rdi)6322; O0-NEXT:    movq $1, foo6323; O0-NEXT:    retq6324;6325; O1-LABEL: atomic32_store_monotonic:6326; O1:       # %bb.0: # %entry6327; O1-NEXT:    movq foo(%rip), %rax6328; O1-NEXT:  .Lpcsection188:6329; O1-NEXT:    movl $42, (%rdi)6330; O1-NEXT:    movq $1, foo(%rip)6331; O1-NEXT:    retq6332;6333; O2-LABEL: atomic32_store_monotonic:6334; O2:       # %bb.0: # %entry6335; O2-NEXT:    movq foo(%rip), %rax6336; O2-NEXT:  .Lpcsection188:6337; O2-NEXT:    movl $42, (%rdi)6338; O2-NEXT:    movq $1, foo(%rip)6339; O2-NEXT:    retq6340;6341; O3-LABEL: atomic32_store_monotonic:6342; O3:       # %bb.0: # %entry6343; O3-NEXT:    movq foo(%rip), %rax6344; O3-NEXT:  .Lpcsection188:6345; O3-NEXT:    movl $42, (%rdi)6346; O3-NEXT:    movq $1, foo(%rip)6347; O3-NEXT:    retq6348;6349; HASWELL-O3-LABEL: atomic32_store_monotonic:6350; HASWELL-O3:       # %bb.0: # %entry6351; HASWELL-O3-NEXT:    movq foo(%rip), %rax6352; HASWELL-O3-NEXT:  .Lpcsection188:6353; HASWELL-O3-NEXT:    movl $42, (%rdi)6354; HASWELL-O3-NEXT:    movq $1, foo(%rip)6355; HASWELL-O3-NEXT:    retq6356entry:6357  load volatile i64, ptr @foo, align 86358  store atomic i32 42, ptr %a monotonic, align 4, !pcsections !06359  store volatile i64 1, ptr @foo, align 86360  ret void6361}6362 6363define void @atomic32_store_release(ptr %a) {6364; O0-LABEL: atomic32_store_release:6365; O0:       # %bb.0: # %entry6366; O0-NEXT:    movq foo(%rip), %rax6367; O0-NEXT:  .Lpcsection214:6368; O0-NEXT:    movl $42, (%rdi)6369; O0-NEXT:    movq $1, foo6370; O0-NEXT:    retq6371;6372; O1-LABEL: atomic32_store_release:6373; O1:       # %bb.0: # %entry6374; O1-NEXT:    movq foo(%rip), %rax6375; O1-NEXT:  .Lpcsection189:6376; O1-NEXT:    movl $42, (%rdi)6377; O1-NEXT:    movq $1, foo(%rip)6378; O1-NEXT:    retq6379;6380; O2-LABEL: atomic32_store_release:6381; O2:       # %bb.0: # %entry6382; O2-NEXT:    movq foo(%rip), %rax6383; O2-NEXT:  .Lpcsection189:6384; O2-NEXT:    movl $42, (%rdi)6385; O2-NEXT:    movq $1, foo(%rip)6386; O2-NEXT:    retq6387;6388; O3-LABEL: atomic32_store_release:6389; O3:       # %bb.0: # %entry6390; O3-NEXT:    movq foo(%rip), %rax6391; O3-NEXT:  .Lpcsection189:6392; O3-NEXT:    movl $42, (%rdi)6393; O3-NEXT:    movq $1, foo(%rip)6394; O3-NEXT:    retq6395;6396; HASWELL-O3-LABEL: atomic32_store_release:6397; HASWELL-O3:       # %bb.0: # %entry6398; HASWELL-O3-NEXT:    movq foo(%rip), %rax6399; HASWELL-O3-NEXT:  .Lpcsection189:6400; HASWELL-O3-NEXT:    movl $42, (%rdi)6401; HASWELL-O3-NEXT:    movq $1, foo(%rip)6402; HASWELL-O3-NEXT:    retq6403entry:6404  load volatile i64, ptr @foo, align 86405  store atomic i32 42, ptr %a release, align 4, !pcsections !06406  store volatile i64 1, ptr @foo, align 86407  ret void6408}6409 6410define void @atomic32_store_seq_cst(ptr %a) {6411; O0-LABEL: atomic32_store_seq_cst:6412; O0:       # %bb.0: # %entry6413; O0-NEXT:    movq foo(%rip), %rax6414; O0-NEXT:    movl $42, %eax6415; O0-NEXT:  .Lpcsection215:6416; O0-NEXT:    xchgl %eax, (%rdi)6417; O0-NEXT:    movq $1, foo6418; O0-NEXT:    retq6419;6420; O1-LABEL: atomic32_store_seq_cst:6421; O1:       # %bb.0: # %entry6422; O1-NEXT:    movq foo(%rip), %rax6423; O1-NEXT:    movl $42, %eax6424; O1-NEXT:  .Lpcsection190:6425; O1-NEXT:    xchgl %eax, (%rdi)6426; O1-NEXT:    movq $1, foo(%rip)6427; O1-NEXT:    retq6428;6429; O2-LABEL: atomic32_store_seq_cst:6430; O2:       # %bb.0: # %entry6431; O2-NEXT:    movq foo(%rip), %rax6432; O2-NEXT:    movl $42, %eax6433; O2-NEXT:  .Lpcsection190:6434; O2-NEXT:    xchgl %eax, (%rdi)6435; O2-NEXT:    movq $1, foo(%rip)6436; O2-NEXT:    retq6437;6438; O3-LABEL: atomic32_store_seq_cst:6439; O3:       # %bb.0: # %entry6440; O3-NEXT:    movq foo(%rip), %rax6441; O3-NEXT:    movl $42, %eax6442; O3-NEXT:  .Lpcsection190:6443; O3-NEXT:    xchgl %eax, (%rdi)6444; O3-NEXT:    movq $1, foo(%rip)6445; O3-NEXT:    retq6446;6447; HASWELL-O3-LABEL: atomic32_store_seq_cst:6448; HASWELL-O3:       # %bb.0: # %entry6449; HASWELL-O3-NEXT:    movq foo(%rip), %rax6450; HASWELL-O3-NEXT:    movl $42, %eax6451; HASWELL-O3-NEXT:  .Lpcsection190:6452; HASWELL-O3-NEXT:    xchgl %eax, (%rdi)6453; HASWELL-O3-NEXT:    movq $1, foo(%rip)6454; HASWELL-O3-NEXT:    retq6455entry:6456  load volatile i64, ptr @foo, align 86457  store atomic i32 42, ptr %a seq_cst, align 4, !pcsections !06458  store volatile i64 1, ptr @foo, align 86459  ret void6460}6461 6462define void @atomic32_xchg_monotonic(ptr %a) {6463; O0-LABEL: atomic32_xchg_monotonic:6464; O0:       # %bb.0: # %entry6465; O0-NEXT:    movq foo(%rip), %rax6466; O0-NEXT:    movl $42, %eax6467; O0-NEXT:  .Lpcsection216:6468; O0-NEXT:    xchgl %eax, (%rdi)6469; O0-NEXT:    movq $1, foo6470; O0-NEXT:    retq6471;6472; O1-LABEL: atomic32_xchg_monotonic:6473; O1:       # %bb.0: # %entry6474; O1-NEXT:    movq foo(%rip), %rax6475; O1-NEXT:    movl $42, %eax6476; O1-NEXT:  .Lpcsection191:6477; O1-NEXT:    xchgl %eax, (%rdi)6478; O1-NEXT:    movq $1, foo(%rip)6479; O1-NEXT:    retq6480;6481; O2-LABEL: atomic32_xchg_monotonic:6482; O2:       # %bb.0: # %entry6483; O2-NEXT:    movq foo(%rip), %rax6484; O2-NEXT:    movl $42, %eax6485; O2-NEXT:  .Lpcsection191:6486; O2-NEXT:    xchgl %eax, (%rdi)6487; O2-NEXT:    movq $1, foo(%rip)6488; O2-NEXT:    retq6489;6490; O3-LABEL: atomic32_xchg_monotonic:6491; O3:       # %bb.0: # %entry6492; O3-NEXT:    movq foo(%rip), %rax6493; O3-NEXT:    movl $42, %eax6494; O3-NEXT:  .Lpcsection191:6495; O3-NEXT:    xchgl %eax, (%rdi)6496; O3-NEXT:    movq $1, foo(%rip)6497; O3-NEXT:    retq6498;6499; HASWELL-O3-LABEL: atomic32_xchg_monotonic:6500; HASWELL-O3:       # %bb.0: # %entry6501; HASWELL-O3-NEXT:    movq foo(%rip), %rax6502; HASWELL-O3-NEXT:    movl $42, %eax6503; HASWELL-O3-NEXT:  .Lpcsection191:6504; HASWELL-O3-NEXT:    xchgl %eax, (%rdi)6505; HASWELL-O3-NEXT:    movq $1, foo(%rip)6506; HASWELL-O3-NEXT:    retq6507entry:6508  load volatile i64, ptr @foo, align 86509  %x = atomicrmw xchg ptr %a, i32 42 monotonic, align 4, !pcsections !06510  store volatile i64 1, ptr @foo, align 86511  ret void6512}6513 6514define void @atomic32_add_monotonic(ptr %a) {6515; O0-LABEL: atomic32_add_monotonic:6516; O0:       # %bb.0: # %entry6517; O0-NEXT:    movq foo(%rip), %rax6518; O0-NEXT:  .Lpcsection217:6519; O0-NEXT:    lock addl $42, (%rdi)6520; O0-NEXT:    movq $1, foo6521; O0-NEXT:    retq6522;6523; O1-LABEL: atomic32_add_monotonic:6524; O1:       # %bb.0: # %entry6525; O1-NEXT:    movq foo(%rip), %rax6526; O1-NEXT:  .Lpcsection192:6527; O1-NEXT:    lock addl $42, (%rdi)6528; O1-NEXT:    movq $1, foo(%rip)6529; O1-NEXT:    retq6530;6531; O2-LABEL: atomic32_add_monotonic:6532; O2:       # %bb.0: # %entry6533; O2-NEXT:    movq foo(%rip), %rax6534; O2-NEXT:  .Lpcsection192:6535; O2-NEXT:    lock addl $42, (%rdi)6536; O2-NEXT:    movq $1, foo(%rip)6537; O2-NEXT:    retq6538;6539; O3-LABEL: atomic32_add_monotonic:6540; O3:       # %bb.0: # %entry6541; O3-NEXT:    movq foo(%rip), %rax6542; O3-NEXT:  .Lpcsection192:6543; O3-NEXT:    lock addl $42, (%rdi)6544; O3-NEXT:    movq $1, foo(%rip)6545; O3-NEXT:    retq6546;6547; HASWELL-O3-LABEL: atomic32_add_monotonic:6548; HASWELL-O3:       # %bb.0: # %entry6549; HASWELL-O3-NEXT:    movq foo(%rip), %rax6550; HASWELL-O3-NEXT:  .Lpcsection192:6551; HASWELL-O3-NEXT:    lock addl $42, (%rdi)6552; HASWELL-O3-NEXT:    movq $1, foo(%rip)6553; HASWELL-O3-NEXT:    retq6554entry:6555  load volatile i64, ptr @foo, align 86556  %x = atomicrmw add ptr %a, i32 42 monotonic, align 4, !pcsections !06557  store volatile i64 1, ptr @foo, align 86558  ret void6559}6560 6561define void @atomic32_sub_monotonic(ptr %a) {6562; O0-LABEL: atomic32_sub_monotonic:6563; O0:       # %bb.0: # %entry6564; O0-NEXT:    movq foo(%rip), %rax6565; O0-NEXT:  .Lpcsection218:6566; O0-NEXT:    lock subl $42, (%rdi)6567; O0-NEXT:    movq $1, foo6568; O0-NEXT:    retq6569;6570; O1-LABEL: atomic32_sub_monotonic:6571; O1:       # %bb.0: # %entry6572; O1-NEXT:    movq foo(%rip), %rax6573; O1-NEXT:  .Lpcsection193:6574; O1-NEXT:    lock subl $42, (%rdi)6575; O1-NEXT:    movq $1, foo(%rip)6576; O1-NEXT:    retq6577;6578; O2-LABEL: atomic32_sub_monotonic:6579; O2:       # %bb.0: # %entry6580; O2-NEXT:    movq foo(%rip), %rax6581; O2-NEXT:  .Lpcsection193:6582; O2-NEXT:    lock subl $42, (%rdi)6583; O2-NEXT:    movq $1, foo(%rip)6584; O2-NEXT:    retq6585;6586; O3-LABEL: atomic32_sub_monotonic:6587; O3:       # %bb.0: # %entry6588; O3-NEXT:    movq foo(%rip), %rax6589; O3-NEXT:  .Lpcsection193:6590; O3-NEXT:    lock subl $42, (%rdi)6591; O3-NEXT:    movq $1, foo(%rip)6592; O3-NEXT:    retq6593;6594; HASWELL-O3-LABEL: atomic32_sub_monotonic:6595; HASWELL-O3:       # %bb.0: # %entry6596; HASWELL-O3-NEXT:    movq foo(%rip), %rax6597; HASWELL-O3-NEXT:  .Lpcsection193:6598; HASWELL-O3-NEXT:    lock subl $42, (%rdi)6599; HASWELL-O3-NEXT:    movq $1, foo(%rip)6600; HASWELL-O3-NEXT:    retq6601entry:6602  load volatile i64, ptr @foo, align 86603  %x = atomicrmw sub ptr %a, i32 42 monotonic, align 4, !pcsections !06604  store volatile i64 1, ptr @foo, align 86605  ret void6606}6607 6608define void @atomic32_and_monotonic(ptr %a) {6609; O0-LABEL: atomic32_and_monotonic:6610; O0:       # %bb.0: # %entry6611; O0-NEXT:    movq foo(%rip), %rax6612; O0-NEXT:  .Lpcsection219:6613; O0-NEXT:    lock andl $42, (%rdi)6614; O0-NEXT:    movq $1, foo6615; O0-NEXT:    retq6616;6617; O1-LABEL: atomic32_and_monotonic:6618; O1:       # %bb.0: # %entry6619; O1-NEXT:    movq foo(%rip), %rax6620; O1-NEXT:  .Lpcsection194:6621; O1-NEXT:    lock andl $42, (%rdi)6622; O1-NEXT:    movq $1, foo(%rip)6623; O1-NEXT:    retq6624;6625; O2-LABEL: atomic32_and_monotonic:6626; O2:       # %bb.0: # %entry6627; O2-NEXT:    movq foo(%rip), %rax6628; O2-NEXT:  .Lpcsection194:6629; O2-NEXT:    lock andl $42, (%rdi)6630; O2-NEXT:    movq $1, foo(%rip)6631; O2-NEXT:    retq6632;6633; O3-LABEL: atomic32_and_monotonic:6634; O3:       # %bb.0: # %entry6635; O3-NEXT:    movq foo(%rip), %rax6636; O3-NEXT:  .Lpcsection194:6637; O3-NEXT:    lock andl $42, (%rdi)6638; O3-NEXT:    movq $1, foo(%rip)6639; O3-NEXT:    retq6640;6641; HASWELL-O3-LABEL: atomic32_and_monotonic:6642; HASWELL-O3:       # %bb.0: # %entry6643; HASWELL-O3-NEXT:    movq foo(%rip), %rax6644; HASWELL-O3-NEXT:  .Lpcsection194:6645; HASWELL-O3-NEXT:    lock andl $42, (%rdi)6646; HASWELL-O3-NEXT:    movq $1, foo(%rip)6647; HASWELL-O3-NEXT:    retq6648entry:6649  load volatile i64, ptr @foo, align 86650  %x = atomicrmw and ptr %a, i32 42 monotonic, align 4, !pcsections !06651  store volatile i64 1, ptr @foo, align 86652  ret void6653}6654 6655define void @atomic32_or_monotonic(ptr %a) {6656; O0-LABEL: atomic32_or_monotonic:6657; O0:       # %bb.0: # %entry6658; O0-NEXT:    movq foo(%rip), %rax6659; O0-NEXT:  .Lpcsection220:6660; O0-NEXT:    lock orl $42, (%rdi)6661; O0-NEXT:    movq $1, foo6662; O0-NEXT:    retq6663;6664; O1-LABEL: atomic32_or_monotonic:6665; O1:       # %bb.0: # %entry6666; O1-NEXT:    movq foo(%rip), %rax6667; O1-NEXT:  .Lpcsection195:6668; O1-NEXT:    lock orl $42, (%rdi)6669; O1-NEXT:    movq $1, foo(%rip)6670; O1-NEXT:    retq6671;6672; O2-LABEL: atomic32_or_monotonic:6673; O2:       # %bb.0: # %entry6674; O2-NEXT:    movq foo(%rip), %rax6675; O2-NEXT:  .Lpcsection195:6676; O2-NEXT:    lock orl $42, (%rdi)6677; O2-NEXT:    movq $1, foo(%rip)6678; O2-NEXT:    retq6679;6680; O3-LABEL: atomic32_or_monotonic:6681; O3:       # %bb.0: # %entry6682; O3-NEXT:    movq foo(%rip), %rax6683; O3-NEXT:  .Lpcsection195:6684; O3-NEXT:    lock orl $42, (%rdi)6685; O3-NEXT:    movq $1, foo(%rip)6686; O3-NEXT:    retq6687;6688; HASWELL-O3-LABEL: atomic32_or_monotonic:6689; HASWELL-O3:       # %bb.0: # %entry6690; HASWELL-O3-NEXT:    movq foo(%rip), %rax6691; HASWELL-O3-NEXT:  .Lpcsection195:6692; HASWELL-O3-NEXT:    lock orl $42, (%rdi)6693; HASWELL-O3-NEXT:    movq $1, foo(%rip)6694; HASWELL-O3-NEXT:    retq6695entry:6696  load volatile i64, ptr @foo, align 86697  %x = atomicrmw or ptr %a, i32 42 monotonic, align 4, !pcsections !06698  store volatile i64 1, ptr @foo, align 86699  ret void6700}6701 6702define void @atomic32_xor_monotonic(ptr %a) {6703; O0-LABEL: atomic32_xor_monotonic:6704; O0:       # %bb.0: # %entry6705; O0-NEXT:    movq foo(%rip), %rax6706; O0-NEXT:  .Lpcsection221:6707; O0-NEXT:    lock xorl $42, (%rdi)6708; O0-NEXT:    movq $1, foo6709; O0-NEXT:    retq6710;6711; O1-LABEL: atomic32_xor_monotonic:6712; O1:       # %bb.0: # %entry6713; O1-NEXT:    movq foo(%rip), %rax6714; O1-NEXT:  .Lpcsection196:6715; O1-NEXT:    lock xorl $42, (%rdi)6716; O1-NEXT:    movq $1, foo(%rip)6717; O1-NEXT:    retq6718;6719; O2-LABEL: atomic32_xor_monotonic:6720; O2:       # %bb.0: # %entry6721; O2-NEXT:    movq foo(%rip), %rax6722; O2-NEXT:  .Lpcsection196:6723; O2-NEXT:    lock xorl $42, (%rdi)6724; O2-NEXT:    movq $1, foo(%rip)6725; O2-NEXT:    retq6726;6727; O3-LABEL: atomic32_xor_monotonic:6728; O3:       # %bb.0: # %entry6729; O3-NEXT:    movq foo(%rip), %rax6730; O3-NEXT:  .Lpcsection196:6731; O3-NEXT:    lock xorl $42, (%rdi)6732; O3-NEXT:    movq $1, foo(%rip)6733; O3-NEXT:    retq6734;6735; HASWELL-O3-LABEL: atomic32_xor_monotonic:6736; HASWELL-O3:       # %bb.0: # %entry6737; HASWELL-O3-NEXT:    movq foo(%rip), %rax6738; HASWELL-O3-NEXT:  .Lpcsection196:6739; HASWELL-O3-NEXT:    lock xorl $42, (%rdi)6740; HASWELL-O3-NEXT:    movq $1, foo(%rip)6741; HASWELL-O3-NEXT:    retq6742entry:6743  load volatile i64, ptr @foo, align 86744  %x = atomicrmw xor ptr %a, i32 42 monotonic, align 4, !pcsections !06745  store volatile i64 1, ptr @foo, align 86746  ret void6747}6748 6749define void @atomic32_nand_monotonic(ptr %a) {6750; O0-LABEL: atomic32_nand_monotonic:6751; O0:       # %bb.0: # %entry6752; O0-NEXT:    movq %rdi, {{[-0-9]+}}(%r{{[sb]}}p) # 8-byte Spill6753; O0-NEXT:    movq foo, %rax6754; O0-NEXT:  .Lpcsection222:6755; O0-NEXT:    movl (%rdi), %eax6756; O0-NEXT:    movl %eax, {{[-0-9]+}}(%r{{[sb]}}p) # 4-byte Spill6757; O0-NEXT:  .LBB112_1: # %atomicrmw.start6758; O0-NEXT:    # =>This Inner Loop Header: Depth=16759; O0-NEXT:    movl {{[-0-9]+}}(%r{{[sb]}}p), %eax # 4-byte Reload6760; O0-NEXT:    movq {{[-0-9]+}}(%r{{[sb]}}p), %rcx # 8-byte Reload6761; O0-NEXT:    movl %eax, %edx6762; O0-NEXT:  .Lpcsection223:6763; O0-NEXT:    notl %edx6764; O0-NEXT:  .Lpcsection224:6765; O0-NEXT:    orl $-43, %edx6766; O0-NEXT:  .Lpcsection225:6767; O0-NEXT:    lock cmpxchgl %edx, (%rcx)6768; O0-NEXT:  .Lpcsection226:6769; O0-NEXT:    sete %cl6770; O0-NEXT:  .Lpcsection227:6771; O0-NEXT:    testb $1, %cl6772; O0-NEXT:    movl %eax, {{[-0-9]+}}(%r{{[sb]}}p) # 4-byte Spill6773; O0-NEXT:  .Lpcsection228:6774; O0-NEXT:    jne .LBB112_26775; O0-NEXT:    jmp .LBB112_16776; O0-NEXT:  .LBB112_2: # %atomicrmw.end6777; O0-NEXT:    movq $1, foo6778; O0-NEXT:    retq6779;6780; O1-LABEL: atomic32_nand_monotonic:6781; O1:       # %bb.0: # %entry6782; O1-NEXT:    movq foo(%rip), %rax6783; O1-NEXT:  .Lpcsection197:6784; O1-NEXT:    movl (%rdi), %eax6785; O1-NEXT:    .p2align 46786; O1-NEXT:  .LBB112_1: # %atomicrmw.start6787; O1-NEXT:    # =>This Inner Loop Header: Depth=16788; O1-NEXT:    movl %eax, %ecx6789; O1-NEXT:  .Lpcsection198:6790; O1-NEXT:    notl %ecx6791; O1-NEXT:  .Lpcsection199:6792; O1-NEXT:    orl $-43, %ecx6793; O1-NEXT:  .Lpcsection200:6794; O1-NEXT:    lock cmpxchgl %ecx, (%rdi)6795; O1-NEXT:  .Lpcsection201:6796; O1-NEXT:    jne .LBB112_16797; O1-NEXT:  # %bb.2: # %atomicrmw.end6798; O1-NEXT:    movq $1, foo(%rip)6799; O1-NEXT:    retq6800;6801; O2-LABEL: atomic32_nand_monotonic:6802; O2:       # %bb.0: # %entry6803; O2-NEXT:    movq foo(%rip), %rax6804; O2-NEXT:  .Lpcsection197:6805; O2-NEXT:    movl (%rdi), %eax6806; O2-NEXT:    .p2align 46807; O2-NEXT:  .LBB112_1: # %atomicrmw.start6808; O2-NEXT:    # =>This Inner Loop Header: Depth=16809; O2-NEXT:    movl %eax, %ecx6810; O2-NEXT:  .Lpcsection198:6811; O2-NEXT:    notl %ecx6812; O2-NEXT:  .Lpcsection199:6813; O2-NEXT:    orl $-43, %ecx6814; O2-NEXT:  .Lpcsection200:6815; O2-NEXT:    lock cmpxchgl %ecx, (%rdi)6816; O2-NEXT:  .Lpcsection201:6817; O2-NEXT:    jne .LBB112_16818; O2-NEXT:  # %bb.2: # %atomicrmw.end6819; O2-NEXT:    movq $1, foo(%rip)6820; O2-NEXT:    retq6821;6822; O3-LABEL: atomic32_nand_monotonic:6823; O3:       # %bb.0: # %entry6824; O3-NEXT:    movq foo(%rip), %rax6825; O3-NEXT:  .Lpcsection197:6826; O3-NEXT:    movl (%rdi), %eax6827; O3-NEXT:    .p2align 46828; O3-NEXT:  .LBB112_1: # %atomicrmw.start6829; O3-NEXT:    # =>This Inner Loop Header: Depth=16830; O3-NEXT:    movl %eax, %ecx6831; O3-NEXT:  .Lpcsection198:6832; O3-NEXT:    notl %ecx6833; O3-NEXT:  .Lpcsection199:6834; O3-NEXT:    orl $-43, %ecx6835; O3-NEXT:  .Lpcsection200:6836; O3-NEXT:    lock cmpxchgl %ecx, (%rdi)6837; O3-NEXT:  .Lpcsection201:6838; O3-NEXT:    jne .LBB112_16839; O3-NEXT:  # %bb.2: # %atomicrmw.end6840; O3-NEXT:    movq $1, foo(%rip)6841; O3-NEXT:    retq6842;6843; HASWELL-O3-LABEL: atomic32_nand_monotonic:6844; HASWELL-O3:       # %bb.0: # %entry6845; HASWELL-O3-NEXT:    movq foo(%rip), %rax6846; HASWELL-O3-NEXT:  .Lpcsection197:6847; HASWELL-O3-NEXT:    movl (%rdi), %eax6848; HASWELL-O3-NEXT:    .p2align 46849; HASWELL-O3-NEXT:  .LBB112_1: # %atomicrmw.start6850; HASWELL-O3-NEXT:    # =>This Inner Loop Header: Depth=16851; HASWELL-O3-NEXT:    movl %eax, %ecx6852; HASWELL-O3-NEXT:  .Lpcsection198:6853; HASWELL-O3-NEXT:    notl %ecx6854; HASWELL-O3-NEXT:  .Lpcsection199:6855; HASWELL-O3-NEXT:    orl $-43, %ecx6856; HASWELL-O3-NEXT:  .Lpcsection200:6857; HASWELL-O3-NEXT:    lock cmpxchgl %ecx, (%rdi)6858; HASWELL-O3-NEXT:  .Lpcsection201:6859; HASWELL-O3-NEXT:    jne .LBB112_16860; HASWELL-O3-NEXT:  # %bb.2: # %atomicrmw.end6861; HASWELL-O3-NEXT:    movq $1, foo(%rip)6862; HASWELL-O3-NEXT:    retq6863entry:6864  load volatile i64, ptr @foo, align 86865  %x = atomicrmw nand ptr %a, i32 42 monotonic, align 4, !pcsections !06866  store volatile i64 1, ptr @foo, align 86867  ret void6868}6869 6870define void @atomic32_xchg_acquire(ptr %a) {6871; O0-LABEL: atomic32_xchg_acquire:6872; O0:       # %bb.0: # %entry6873; O0-NEXT:    movq foo(%rip), %rax6874; O0-NEXT:    movl $42, %eax6875; O0-NEXT:  .Lpcsection229:6876; O0-NEXT:    xchgl %eax, (%rdi)6877; O0-NEXT:    movq $1, foo6878; O0-NEXT:    retq6879;6880; O1-LABEL: atomic32_xchg_acquire:6881; O1:       # %bb.0: # %entry6882; O1-NEXT:    movq foo(%rip), %rax6883; O1-NEXT:    movl $42, %eax6884; O1-NEXT:  .Lpcsection202:6885; O1-NEXT:    xchgl %eax, (%rdi)6886; O1-NEXT:    movq $1, foo(%rip)6887; O1-NEXT:    retq6888;6889; O2-LABEL: atomic32_xchg_acquire:6890; O2:       # %bb.0: # %entry6891; O2-NEXT:    movq foo(%rip), %rax6892; O2-NEXT:    movl $42, %eax6893; O2-NEXT:  .Lpcsection202:6894; O2-NEXT:    xchgl %eax, (%rdi)6895; O2-NEXT:    movq $1, foo(%rip)6896; O2-NEXT:    retq6897;6898; O3-LABEL: atomic32_xchg_acquire:6899; O3:       # %bb.0: # %entry6900; O3-NEXT:    movq foo(%rip), %rax6901; O3-NEXT:    movl $42, %eax6902; O3-NEXT:  .Lpcsection202:6903; O3-NEXT:    xchgl %eax, (%rdi)6904; O3-NEXT:    movq $1, foo(%rip)6905; O3-NEXT:    retq6906;6907; HASWELL-O3-LABEL: atomic32_xchg_acquire:6908; HASWELL-O3:       # %bb.0: # %entry6909; HASWELL-O3-NEXT:    movq foo(%rip), %rax6910; HASWELL-O3-NEXT:    movl $42, %eax6911; HASWELL-O3-NEXT:  .Lpcsection202:6912; HASWELL-O3-NEXT:    xchgl %eax, (%rdi)6913; HASWELL-O3-NEXT:    movq $1, foo(%rip)6914; HASWELL-O3-NEXT:    retq6915entry:6916  load volatile i64, ptr @foo, align 86917  %x = atomicrmw xchg ptr %a, i32 42 acquire, align 4, !pcsections !06918  store volatile i64 1, ptr @foo, align 86919  ret void6920}6921 6922define void @atomic32_add_acquire(ptr %a) {6923; O0-LABEL: atomic32_add_acquire:6924; O0:       # %bb.0: # %entry6925; O0-NEXT:    movq foo(%rip), %rax6926; O0-NEXT:  .Lpcsection230:6927; O0-NEXT:    lock addl $42, (%rdi)6928; O0-NEXT:    movq $1, foo6929; O0-NEXT:    retq6930;6931; O1-LABEL: atomic32_add_acquire:6932; O1:       # %bb.0: # %entry6933; O1-NEXT:    movq foo(%rip), %rax6934; O1-NEXT:  .Lpcsection203:6935; O1-NEXT:    lock addl $42, (%rdi)6936; O1-NEXT:    movq $1, foo(%rip)6937; O1-NEXT:    retq6938;6939; O2-LABEL: atomic32_add_acquire:6940; O2:       # %bb.0: # %entry6941; O2-NEXT:    movq foo(%rip), %rax6942; O2-NEXT:  .Lpcsection203:6943; O2-NEXT:    lock addl $42, (%rdi)6944; O2-NEXT:    movq $1, foo(%rip)6945; O2-NEXT:    retq6946;6947; O3-LABEL: atomic32_add_acquire:6948; O3:       # %bb.0: # %entry6949; O3-NEXT:    movq foo(%rip), %rax6950; O3-NEXT:  .Lpcsection203:6951; O3-NEXT:    lock addl $42, (%rdi)6952; O3-NEXT:    movq $1, foo(%rip)6953; O3-NEXT:    retq6954;6955; HASWELL-O3-LABEL: atomic32_add_acquire:6956; HASWELL-O3:       # %bb.0: # %entry6957; HASWELL-O3-NEXT:    movq foo(%rip), %rax6958; HASWELL-O3-NEXT:  .Lpcsection203:6959; HASWELL-O3-NEXT:    lock addl $42, (%rdi)6960; HASWELL-O3-NEXT:    movq $1, foo(%rip)6961; HASWELL-O3-NEXT:    retq6962entry:6963  load volatile i64, ptr @foo, align 86964  %x = atomicrmw add ptr %a, i32 42 acquire, align 4, !pcsections !06965  store volatile i64 1, ptr @foo, align 86966  ret void6967}6968 6969define void @atomic32_sub_acquire(ptr %a) {6970; O0-LABEL: atomic32_sub_acquire:6971; O0:       # %bb.0: # %entry6972; O0-NEXT:    movq foo(%rip), %rax6973; O0-NEXT:  .Lpcsection231:6974; O0-NEXT:    lock subl $42, (%rdi)6975; O0-NEXT:    movq $1, foo6976; O0-NEXT:    retq6977;6978; O1-LABEL: atomic32_sub_acquire:6979; O1:       # %bb.0: # %entry6980; O1-NEXT:    movq foo(%rip), %rax6981; O1-NEXT:  .Lpcsection204:6982; O1-NEXT:    lock subl $42, (%rdi)6983; O1-NEXT:    movq $1, foo(%rip)6984; O1-NEXT:    retq6985;6986; O2-LABEL: atomic32_sub_acquire:6987; O2:       # %bb.0: # %entry6988; O2-NEXT:    movq foo(%rip), %rax6989; O2-NEXT:  .Lpcsection204:6990; O2-NEXT:    lock subl $42, (%rdi)6991; O2-NEXT:    movq $1, foo(%rip)6992; O2-NEXT:    retq6993;6994; O3-LABEL: atomic32_sub_acquire:6995; O3:       # %bb.0: # %entry6996; O3-NEXT:    movq foo(%rip), %rax6997; O3-NEXT:  .Lpcsection204:6998; O3-NEXT:    lock subl $42, (%rdi)6999; O3-NEXT:    movq $1, foo(%rip)7000; O3-NEXT:    retq7001;7002; HASWELL-O3-LABEL: atomic32_sub_acquire:7003; HASWELL-O3:       # %bb.0: # %entry7004; HASWELL-O3-NEXT:    movq foo(%rip), %rax7005; HASWELL-O3-NEXT:  .Lpcsection204:7006; HASWELL-O3-NEXT:    lock subl $42, (%rdi)7007; HASWELL-O3-NEXT:    movq $1, foo(%rip)7008; HASWELL-O3-NEXT:    retq7009entry:7010  load volatile i64, ptr @foo, align 87011  %x = atomicrmw sub ptr %a, i32 42 acquire, align 4, !pcsections !07012  store volatile i64 1, ptr @foo, align 87013  ret void7014}7015 7016define void @atomic32_and_acquire(ptr %a) {7017; O0-LABEL: atomic32_and_acquire:7018; O0:       # %bb.0: # %entry7019; O0-NEXT:    movq foo(%rip), %rax7020; O0-NEXT:  .Lpcsection232:7021; O0-NEXT:    lock andl $42, (%rdi)7022; O0-NEXT:    movq $1, foo7023; O0-NEXT:    retq7024;7025; O1-LABEL: atomic32_and_acquire:7026; O1:       # %bb.0: # %entry7027; O1-NEXT:    movq foo(%rip), %rax7028; O1-NEXT:  .Lpcsection205:7029; O1-NEXT:    lock andl $42, (%rdi)7030; O1-NEXT:    movq $1, foo(%rip)7031; O1-NEXT:    retq7032;7033; O2-LABEL: atomic32_and_acquire:7034; O2:       # %bb.0: # %entry7035; O2-NEXT:    movq foo(%rip), %rax7036; O2-NEXT:  .Lpcsection205:7037; O2-NEXT:    lock andl $42, (%rdi)7038; O2-NEXT:    movq $1, foo(%rip)7039; O2-NEXT:    retq7040;7041; O3-LABEL: atomic32_and_acquire:7042; O3:       # %bb.0: # %entry7043; O3-NEXT:    movq foo(%rip), %rax7044; O3-NEXT:  .Lpcsection205:7045; O3-NEXT:    lock andl $42, (%rdi)7046; O3-NEXT:    movq $1, foo(%rip)7047; O3-NEXT:    retq7048;7049; HASWELL-O3-LABEL: atomic32_and_acquire:7050; HASWELL-O3:       # %bb.0: # %entry7051; HASWELL-O3-NEXT:    movq foo(%rip), %rax7052; HASWELL-O3-NEXT:  .Lpcsection205:7053; HASWELL-O3-NEXT:    lock andl $42, (%rdi)7054; HASWELL-O3-NEXT:    movq $1, foo(%rip)7055; HASWELL-O3-NEXT:    retq7056entry:7057  load volatile i64, ptr @foo, align 87058  %x = atomicrmw and ptr %a, i32 42 acquire, align 4, !pcsections !07059  store volatile i64 1, ptr @foo, align 87060  ret void7061}7062 7063define void @atomic32_or_acquire(ptr %a) {7064; O0-LABEL: atomic32_or_acquire:7065; O0:       # %bb.0: # %entry7066; O0-NEXT:    movq foo(%rip), %rax7067; O0-NEXT:  .Lpcsection233:7068; O0-NEXT:    lock orl $42, (%rdi)7069; O0-NEXT:    movq $1, foo7070; O0-NEXT:    retq7071;7072; O1-LABEL: atomic32_or_acquire:7073; O1:       # %bb.0: # %entry7074; O1-NEXT:    movq foo(%rip), %rax7075; O1-NEXT:  .Lpcsection206:7076; O1-NEXT:    lock orl $42, (%rdi)7077; O1-NEXT:    movq $1, foo(%rip)7078; O1-NEXT:    retq7079;7080; O2-LABEL: atomic32_or_acquire:7081; O2:       # %bb.0: # %entry7082; O2-NEXT:    movq foo(%rip), %rax7083; O2-NEXT:  .Lpcsection206:7084; O2-NEXT:    lock orl $42, (%rdi)7085; O2-NEXT:    movq $1, foo(%rip)7086; O2-NEXT:    retq7087;7088; O3-LABEL: atomic32_or_acquire:7089; O3:       # %bb.0: # %entry7090; O3-NEXT:    movq foo(%rip), %rax7091; O3-NEXT:  .Lpcsection206:7092; O3-NEXT:    lock orl $42, (%rdi)7093; O3-NEXT:    movq $1, foo(%rip)7094; O3-NEXT:    retq7095;7096; HASWELL-O3-LABEL: atomic32_or_acquire:7097; HASWELL-O3:       # %bb.0: # %entry7098; HASWELL-O3-NEXT:    movq foo(%rip), %rax7099; HASWELL-O3-NEXT:  .Lpcsection206:7100; HASWELL-O3-NEXT:    lock orl $42, (%rdi)7101; HASWELL-O3-NEXT:    movq $1, foo(%rip)7102; HASWELL-O3-NEXT:    retq7103entry:7104  load volatile i64, ptr @foo, align 87105  %x = atomicrmw or ptr %a, i32 42 acquire, align 4, !pcsections !07106  store volatile i64 1, ptr @foo, align 87107  ret void7108}7109 7110define void @atomic32_xor_acquire(ptr %a) {7111; O0-LABEL: atomic32_xor_acquire:7112; O0:       # %bb.0: # %entry7113; O0-NEXT:    movq foo(%rip), %rax7114; O0-NEXT:  .Lpcsection234:7115; O0-NEXT:    lock xorl $42, (%rdi)7116; O0-NEXT:    movq $1, foo7117; O0-NEXT:    retq7118;7119; O1-LABEL: atomic32_xor_acquire:7120; O1:       # %bb.0: # %entry7121; O1-NEXT:    movq foo(%rip), %rax7122; O1-NEXT:  .Lpcsection207:7123; O1-NEXT:    lock xorl $42, (%rdi)7124; O1-NEXT:    movq $1, foo(%rip)7125; O1-NEXT:    retq7126;7127; O2-LABEL: atomic32_xor_acquire:7128; O2:       # %bb.0: # %entry7129; O2-NEXT:    movq foo(%rip), %rax7130; O2-NEXT:  .Lpcsection207:7131; O2-NEXT:    lock xorl $42, (%rdi)7132; O2-NEXT:    movq $1, foo(%rip)7133; O2-NEXT:    retq7134;7135; O3-LABEL: atomic32_xor_acquire:7136; O3:       # %bb.0: # %entry7137; O3-NEXT:    movq foo(%rip), %rax7138; O3-NEXT:  .Lpcsection207:7139; O3-NEXT:    lock xorl $42, (%rdi)7140; O3-NEXT:    movq $1, foo(%rip)7141; O3-NEXT:    retq7142;7143; HASWELL-O3-LABEL: atomic32_xor_acquire:7144; HASWELL-O3:       # %bb.0: # %entry7145; HASWELL-O3-NEXT:    movq foo(%rip), %rax7146; HASWELL-O3-NEXT:  .Lpcsection207:7147; HASWELL-O3-NEXT:    lock xorl $42, (%rdi)7148; HASWELL-O3-NEXT:    movq $1, foo(%rip)7149; HASWELL-O3-NEXT:    retq7150entry:7151  load volatile i64, ptr @foo, align 87152  %x = atomicrmw xor ptr %a, i32 42 acquire, align 4, !pcsections !07153  store volatile i64 1, ptr @foo, align 87154  ret void7155}7156 7157define void @atomic32_nand_acquire(ptr %a) {7158; O0-LABEL: atomic32_nand_acquire:7159; O0:       # %bb.0: # %entry7160; O0-NEXT:    movq %rdi, {{[-0-9]+}}(%r{{[sb]}}p) # 8-byte Spill7161; O0-NEXT:    movq foo, %rax7162; O0-NEXT:  .Lpcsection235:7163; O0-NEXT:    movl (%rdi), %eax7164; O0-NEXT:    movl %eax, {{[-0-9]+}}(%r{{[sb]}}p) # 4-byte Spill7165; O0-NEXT:  .LBB119_1: # %atomicrmw.start7166; O0-NEXT:    # =>This Inner Loop Header: Depth=17167; O0-NEXT:    movl {{[-0-9]+}}(%r{{[sb]}}p), %eax # 4-byte Reload7168; O0-NEXT:    movq {{[-0-9]+}}(%r{{[sb]}}p), %rcx # 8-byte Reload7169; O0-NEXT:    movl %eax, %edx7170; O0-NEXT:  .Lpcsection236:7171; O0-NEXT:    notl %edx7172; O0-NEXT:  .Lpcsection237:7173; O0-NEXT:    orl $-43, %edx7174; O0-NEXT:  .Lpcsection238:7175; O0-NEXT:    lock cmpxchgl %edx, (%rcx)7176; O0-NEXT:  .Lpcsection239:7177; O0-NEXT:    sete %cl7178; O0-NEXT:  .Lpcsection240:7179; O0-NEXT:    testb $1, %cl7180; O0-NEXT:    movl %eax, {{[-0-9]+}}(%r{{[sb]}}p) # 4-byte Spill7181; O0-NEXT:  .Lpcsection241:7182; O0-NEXT:    jne .LBB119_27183; O0-NEXT:    jmp .LBB119_17184; O0-NEXT:  .LBB119_2: # %atomicrmw.end7185; O0-NEXT:    movq $1, foo7186; O0-NEXT:    retq7187;7188; O1-LABEL: atomic32_nand_acquire:7189; O1:       # %bb.0: # %entry7190; O1-NEXT:    movq foo(%rip), %rax7191; O1-NEXT:  .Lpcsection208:7192; O1-NEXT:    movl (%rdi), %eax7193; O1-NEXT:    .p2align 47194; O1-NEXT:  .LBB119_1: # %atomicrmw.start7195; O1-NEXT:    # =>This Inner Loop Header: Depth=17196; O1-NEXT:    movl %eax, %ecx7197; O1-NEXT:  .Lpcsection209:7198; O1-NEXT:    notl %ecx7199; O1-NEXT:  .Lpcsection210:7200; O1-NEXT:    orl $-43, %ecx7201; O1-NEXT:  .Lpcsection211:7202; O1-NEXT:    lock cmpxchgl %ecx, (%rdi)7203; O1-NEXT:  .Lpcsection212:7204; O1-NEXT:    jne .LBB119_17205; O1-NEXT:  # %bb.2: # %atomicrmw.end7206; O1-NEXT:    movq $1, foo(%rip)7207; O1-NEXT:    retq7208;7209; O2-LABEL: atomic32_nand_acquire:7210; O2:       # %bb.0: # %entry7211; O2-NEXT:    movq foo(%rip), %rax7212; O2-NEXT:  .Lpcsection208:7213; O2-NEXT:    movl (%rdi), %eax7214; O2-NEXT:    .p2align 47215; O2-NEXT:  .LBB119_1: # %atomicrmw.start7216; O2-NEXT:    # =>This Inner Loop Header: Depth=17217; O2-NEXT:    movl %eax, %ecx7218; O2-NEXT:  .Lpcsection209:7219; O2-NEXT:    notl %ecx7220; O2-NEXT:  .Lpcsection210:7221; O2-NEXT:    orl $-43, %ecx7222; O2-NEXT:  .Lpcsection211:7223; O2-NEXT:    lock cmpxchgl %ecx, (%rdi)7224; O2-NEXT:  .Lpcsection212:7225; O2-NEXT:    jne .LBB119_17226; O2-NEXT:  # %bb.2: # %atomicrmw.end7227; O2-NEXT:    movq $1, foo(%rip)7228; O2-NEXT:    retq7229;7230; O3-LABEL: atomic32_nand_acquire:7231; O3:       # %bb.0: # %entry7232; O3-NEXT:    movq foo(%rip), %rax7233; O3-NEXT:  .Lpcsection208:7234; O3-NEXT:    movl (%rdi), %eax7235; O3-NEXT:    .p2align 47236; O3-NEXT:  .LBB119_1: # %atomicrmw.start7237; O3-NEXT:    # =>This Inner Loop Header: Depth=17238; O3-NEXT:    movl %eax, %ecx7239; O3-NEXT:  .Lpcsection209:7240; O3-NEXT:    notl %ecx7241; O3-NEXT:  .Lpcsection210:7242; O3-NEXT:    orl $-43, %ecx7243; O3-NEXT:  .Lpcsection211:7244; O3-NEXT:    lock cmpxchgl %ecx, (%rdi)7245; O3-NEXT:  .Lpcsection212:7246; O3-NEXT:    jne .LBB119_17247; O3-NEXT:  # %bb.2: # %atomicrmw.end7248; O3-NEXT:    movq $1, foo(%rip)7249; O3-NEXT:    retq7250;7251; HASWELL-O3-LABEL: atomic32_nand_acquire:7252; HASWELL-O3:       # %bb.0: # %entry7253; HASWELL-O3-NEXT:    movq foo(%rip), %rax7254; HASWELL-O3-NEXT:  .Lpcsection208:7255; HASWELL-O3-NEXT:    movl (%rdi), %eax7256; HASWELL-O3-NEXT:    .p2align 47257; HASWELL-O3-NEXT:  .LBB119_1: # %atomicrmw.start7258; HASWELL-O3-NEXT:    # =>This Inner Loop Header: Depth=17259; HASWELL-O3-NEXT:    movl %eax, %ecx7260; HASWELL-O3-NEXT:  .Lpcsection209:7261; HASWELL-O3-NEXT:    notl %ecx7262; HASWELL-O3-NEXT:  .Lpcsection210:7263; HASWELL-O3-NEXT:    orl $-43, %ecx7264; HASWELL-O3-NEXT:  .Lpcsection211:7265; HASWELL-O3-NEXT:    lock cmpxchgl %ecx, (%rdi)7266; HASWELL-O3-NEXT:  .Lpcsection212:7267; HASWELL-O3-NEXT:    jne .LBB119_17268; HASWELL-O3-NEXT:  # %bb.2: # %atomicrmw.end7269; HASWELL-O3-NEXT:    movq $1, foo(%rip)7270; HASWELL-O3-NEXT:    retq7271entry:7272  load volatile i64, ptr @foo, align 87273  %x = atomicrmw nand ptr %a, i32 42 acquire, align 4, !pcsections !07274  store volatile i64 1, ptr @foo, align 87275  ret void7276}7277 7278define void @atomic32_xchg_release(ptr %a) {7279; O0-LABEL: atomic32_xchg_release:7280; O0:       # %bb.0: # %entry7281; O0-NEXT:    movq foo(%rip), %rax7282; O0-NEXT:    movl $42, %eax7283; O0-NEXT:  .Lpcsection242:7284; O0-NEXT:    xchgl %eax, (%rdi)7285; O0-NEXT:    movq $1, foo7286; O0-NEXT:    retq7287;7288; O1-LABEL: atomic32_xchg_release:7289; O1:       # %bb.0: # %entry7290; O1-NEXT:    movq foo(%rip), %rax7291; O1-NEXT:    movl $42, %eax7292; O1-NEXT:  .Lpcsection213:7293; O1-NEXT:    xchgl %eax, (%rdi)7294; O1-NEXT:    movq $1, foo(%rip)7295; O1-NEXT:    retq7296;7297; O2-LABEL: atomic32_xchg_release:7298; O2:       # %bb.0: # %entry7299; O2-NEXT:    movq foo(%rip), %rax7300; O2-NEXT:    movl $42, %eax7301; O2-NEXT:  .Lpcsection213:7302; O2-NEXT:    xchgl %eax, (%rdi)7303; O2-NEXT:    movq $1, foo(%rip)7304; O2-NEXT:    retq7305;7306; O3-LABEL: atomic32_xchg_release:7307; O3:       # %bb.0: # %entry7308; O3-NEXT:    movq foo(%rip), %rax7309; O3-NEXT:    movl $42, %eax7310; O3-NEXT:  .Lpcsection213:7311; O3-NEXT:    xchgl %eax, (%rdi)7312; O3-NEXT:    movq $1, foo(%rip)7313; O3-NEXT:    retq7314;7315; HASWELL-O3-LABEL: atomic32_xchg_release:7316; HASWELL-O3:       # %bb.0: # %entry7317; HASWELL-O3-NEXT:    movq foo(%rip), %rax7318; HASWELL-O3-NEXT:    movl $42, %eax7319; HASWELL-O3-NEXT:  .Lpcsection213:7320; HASWELL-O3-NEXT:    xchgl %eax, (%rdi)7321; HASWELL-O3-NEXT:    movq $1, foo(%rip)7322; HASWELL-O3-NEXT:    retq7323entry:7324  load volatile i64, ptr @foo, align 87325  %x = atomicrmw xchg ptr %a, i32 42 release, align 4, !pcsections !07326  store volatile i64 1, ptr @foo, align 87327  ret void7328}7329 7330define void @atomic32_add_release(ptr %a) {7331; O0-LABEL: atomic32_add_release:7332; O0:       # %bb.0: # %entry7333; O0-NEXT:    movq foo(%rip), %rax7334; O0-NEXT:  .Lpcsection243:7335; O0-NEXT:    lock addl $42, (%rdi)7336; O0-NEXT:    movq $1, foo7337; O0-NEXT:    retq7338;7339; O1-LABEL: atomic32_add_release:7340; O1:       # %bb.0: # %entry7341; O1-NEXT:    movq foo(%rip), %rax7342; O1-NEXT:  .Lpcsection214:7343; O1-NEXT:    lock addl $42, (%rdi)7344; O1-NEXT:    movq $1, foo(%rip)7345; O1-NEXT:    retq7346;7347; O2-LABEL: atomic32_add_release:7348; O2:       # %bb.0: # %entry7349; O2-NEXT:    movq foo(%rip), %rax7350; O2-NEXT:  .Lpcsection214:7351; O2-NEXT:    lock addl $42, (%rdi)7352; O2-NEXT:    movq $1, foo(%rip)7353; O2-NEXT:    retq7354;7355; O3-LABEL: atomic32_add_release:7356; O3:       # %bb.0: # %entry7357; O3-NEXT:    movq foo(%rip), %rax7358; O3-NEXT:  .Lpcsection214:7359; O3-NEXT:    lock addl $42, (%rdi)7360; O3-NEXT:    movq $1, foo(%rip)7361; O3-NEXT:    retq7362;7363; HASWELL-O3-LABEL: atomic32_add_release:7364; HASWELL-O3:       # %bb.0: # %entry7365; HASWELL-O3-NEXT:    movq foo(%rip), %rax7366; HASWELL-O3-NEXT:  .Lpcsection214:7367; HASWELL-O3-NEXT:    lock addl $42, (%rdi)7368; HASWELL-O3-NEXT:    movq $1, foo(%rip)7369; HASWELL-O3-NEXT:    retq7370entry:7371  load volatile i64, ptr @foo, align 87372  %x = atomicrmw add ptr %a, i32 42 release, align 4, !pcsections !07373  store volatile i64 1, ptr @foo, align 87374  ret void7375}7376 7377define void @atomic32_sub_release(ptr %a) {7378; O0-LABEL: atomic32_sub_release:7379; O0:       # %bb.0: # %entry7380; O0-NEXT:    movq foo(%rip), %rax7381; O0-NEXT:  .Lpcsection244:7382; O0-NEXT:    lock subl $42, (%rdi)7383; O0-NEXT:    movq $1, foo7384; O0-NEXT:    retq7385;7386; O1-LABEL: atomic32_sub_release:7387; O1:       # %bb.0: # %entry7388; O1-NEXT:    movq foo(%rip), %rax7389; O1-NEXT:  .Lpcsection215:7390; O1-NEXT:    lock subl $42, (%rdi)7391; O1-NEXT:    movq $1, foo(%rip)7392; O1-NEXT:    retq7393;7394; O2-LABEL: atomic32_sub_release:7395; O2:       # %bb.0: # %entry7396; O2-NEXT:    movq foo(%rip), %rax7397; O2-NEXT:  .Lpcsection215:7398; O2-NEXT:    lock subl $42, (%rdi)7399; O2-NEXT:    movq $1, foo(%rip)7400; O2-NEXT:    retq7401;7402; O3-LABEL: atomic32_sub_release:7403; O3:       # %bb.0: # %entry7404; O3-NEXT:    movq foo(%rip), %rax7405; O3-NEXT:  .Lpcsection215:7406; O3-NEXT:    lock subl $42, (%rdi)7407; O3-NEXT:    movq $1, foo(%rip)7408; O3-NEXT:    retq7409;7410; HASWELL-O3-LABEL: atomic32_sub_release:7411; HASWELL-O3:       # %bb.0: # %entry7412; HASWELL-O3-NEXT:    movq foo(%rip), %rax7413; HASWELL-O3-NEXT:  .Lpcsection215:7414; HASWELL-O3-NEXT:    lock subl $42, (%rdi)7415; HASWELL-O3-NEXT:    movq $1, foo(%rip)7416; HASWELL-O3-NEXT:    retq7417entry:7418  load volatile i64, ptr @foo, align 87419  %x = atomicrmw sub ptr %a, i32 42 release, align 4, !pcsections !07420  store volatile i64 1, ptr @foo, align 87421  ret void7422}7423 7424define void @atomic32_and_release(ptr %a) {7425; O0-LABEL: atomic32_and_release:7426; O0:       # %bb.0: # %entry7427; O0-NEXT:    movq foo(%rip), %rax7428; O0-NEXT:  .Lpcsection245:7429; O0-NEXT:    lock andl $42, (%rdi)7430; O0-NEXT:    movq $1, foo7431; O0-NEXT:    retq7432;7433; O1-LABEL: atomic32_and_release:7434; O1:       # %bb.0: # %entry7435; O1-NEXT:    movq foo(%rip), %rax7436; O1-NEXT:  .Lpcsection216:7437; O1-NEXT:    lock andl $42, (%rdi)7438; O1-NEXT:    movq $1, foo(%rip)7439; O1-NEXT:    retq7440;7441; O2-LABEL: atomic32_and_release:7442; O2:       # %bb.0: # %entry7443; O2-NEXT:    movq foo(%rip), %rax7444; O2-NEXT:  .Lpcsection216:7445; O2-NEXT:    lock andl $42, (%rdi)7446; O2-NEXT:    movq $1, foo(%rip)7447; O2-NEXT:    retq7448;7449; O3-LABEL: atomic32_and_release:7450; O3:       # %bb.0: # %entry7451; O3-NEXT:    movq foo(%rip), %rax7452; O3-NEXT:  .Lpcsection216:7453; O3-NEXT:    lock andl $42, (%rdi)7454; O3-NEXT:    movq $1, foo(%rip)7455; O3-NEXT:    retq7456;7457; HASWELL-O3-LABEL: atomic32_and_release:7458; HASWELL-O3:       # %bb.0: # %entry7459; HASWELL-O3-NEXT:    movq foo(%rip), %rax7460; HASWELL-O3-NEXT:  .Lpcsection216:7461; HASWELL-O3-NEXT:    lock andl $42, (%rdi)7462; HASWELL-O3-NEXT:    movq $1, foo(%rip)7463; HASWELL-O3-NEXT:    retq7464entry:7465  load volatile i64, ptr @foo, align 87466  %x = atomicrmw and ptr %a, i32 42 release, align 4, !pcsections !07467  store volatile i64 1, ptr @foo, align 87468  ret void7469}7470 7471define void @atomic32_or_release(ptr %a) {7472; O0-LABEL: atomic32_or_release:7473; O0:       # %bb.0: # %entry7474; O0-NEXT:    movq foo(%rip), %rax7475; O0-NEXT:  .Lpcsection246:7476; O0-NEXT:    lock orl $42, (%rdi)7477; O0-NEXT:    movq $1, foo7478; O0-NEXT:    retq7479;7480; O1-LABEL: atomic32_or_release:7481; O1:       # %bb.0: # %entry7482; O1-NEXT:    movq foo(%rip), %rax7483; O1-NEXT:  .Lpcsection217:7484; O1-NEXT:    lock orl $42, (%rdi)7485; O1-NEXT:    movq $1, foo(%rip)7486; O1-NEXT:    retq7487;7488; O2-LABEL: atomic32_or_release:7489; O2:       # %bb.0: # %entry7490; O2-NEXT:    movq foo(%rip), %rax7491; O2-NEXT:  .Lpcsection217:7492; O2-NEXT:    lock orl $42, (%rdi)7493; O2-NEXT:    movq $1, foo(%rip)7494; O2-NEXT:    retq7495;7496; O3-LABEL: atomic32_or_release:7497; O3:       # %bb.0: # %entry7498; O3-NEXT:    movq foo(%rip), %rax7499; O3-NEXT:  .Lpcsection217:7500; O3-NEXT:    lock orl $42, (%rdi)7501; O3-NEXT:    movq $1, foo(%rip)7502; O3-NEXT:    retq7503;7504; HASWELL-O3-LABEL: atomic32_or_release:7505; HASWELL-O3:       # %bb.0: # %entry7506; HASWELL-O3-NEXT:    movq foo(%rip), %rax7507; HASWELL-O3-NEXT:  .Lpcsection217:7508; HASWELL-O3-NEXT:    lock orl $42, (%rdi)7509; HASWELL-O3-NEXT:    movq $1, foo(%rip)7510; HASWELL-O3-NEXT:    retq7511entry:7512  load volatile i64, ptr @foo, align 87513  %x = atomicrmw or ptr %a, i32 42 release, align 4, !pcsections !07514  store volatile i64 1, ptr @foo, align 87515  ret void7516}7517 7518define void @atomic32_xor_release(ptr %a) {7519; O0-LABEL: atomic32_xor_release:7520; O0:       # %bb.0: # %entry7521; O0-NEXT:    movq foo(%rip), %rax7522; O0-NEXT:  .Lpcsection247:7523; O0-NEXT:    lock xorl $42, (%rdi)7524; O0-NEXT:    movq $1, foo7525; O0-NEXT:    retq7526;7527; O1-LABEL: atomic32_xor_release:7528; O1:       # %bb.0: # %entry7529; O1-NEXT:    movq foo(%rip), %rax7530; O1-NEXT:  .Lpcsection218:7531; O1-NEXT:    lock xorl $42, (%rdi)7532; O1-NEXT:    movq $1, foo(%rip)7533; O1-NEXT:    retq7534;7535; O2-LABEL: atomic32_xor_release:7536; O2:       # %bb.0: # %entry7537; O2-NEXT:    movq foo(%rip), %rax7538; O2-NEXT:  .Lpcsection218:7539; O2-NEXT:    lock xorl $42, (%rdi)7540; O2-NEXT:    movq $1, foo(%rip)7541; O2-NEXT:    retq7542;7543; O3-LABEL: atomic32_xor_release:7544; O3:       # %bb.0: # %entry7545; O3-NEXT:    movq foo(%rip), %rax7546; O3-NEXT:  .Lpcsection218:7547; O3-NEXT:    lock xorl $42, (%rdi)7548; O3-NEXT:    movq $1, foo(%rip)7549; O3-NEXT:    retq7550;7551; HASWELL-O3-LABEL: atomic32_xor_release:7552; HASWELL-O3:       # %bb.0: # %entry7553; HASWELL-O3-NEXT:    movq foo(%rip), %rax7554; HASWELL-O3-NEXT:  .Lpcsection218:7555; HASWELL-O3-NEXT:    lock xorl $42, (%rdi)7556; HASWELL-O3-NEXT:    movq $1, foo(%rip)7557; HASWELL-O3-NEXT:    retq7558entry:7559  load volatile i64, ptr @foo, align 87560  %x = atomicrmw xor ptr %a, i32 42 release, align 4, !pcsections !07561  store volatile i64 1, ptr @foo, align 87562  ret void7563}7564 7565define void @atomic32_nand_release(ptr %a) {7566; O0-LABEL: atomic32_nand_release:7567; O0:       # %bb.0: # %entry7568; O0-NEXT:    movq %rdi, {{[-0-9]+}}(%r{{[sb]}}p) # 8-byte Spill7569; O0-NEXT:    movq foo, %rax7570; O0-NEXT:  .Lpcsection248:7571; O0-NEXT:    movl (%rdi), %eax7572; O0-NEXT:    movl %eax, {{[-0-9]+}}(%r{{[sb]}}p) # 4-byte Spill7573; O0-NEXT:  .LBB126_1: # %atomicrmw.start7574; O0-NEXT:    # =>This Inner Loop Header: Depth=17575; O0-NEXT:    movl {{[-0-9]+}}(%r{{[sb]}}p), %eax # 4-byte Reload7576; O0-NEXT:    movq {{[-0-9]+}}(%r{{[sb]}}p), %rcx # 8-byte Reload7577; O0-NEXT:    movl %eax, %edx7578; O0-NEXT:  .Lpcsection249:7579; O0-NEXT:    notl %edx7580; O0-NEXT:  .Lpcsection250:7581; O0-NEXT:    orl $-43, %edx7582; O0-NEXT:  .Lpcsection251:7583; O0-NEXT:    lock cmpxchgl %edx, (%rcx)7584; O0-NEXT:  .Lpcsection252:7585; O0-NEXT:    sete %cl7586; O0-NEXT:  .Lpcsection253:7587; O0-NEXT:    testb $1, %cl7588; O0-NEXT:    movl %eax, {{[-0-9]+}}(%r{{[sb]}}p) # 4-byte Spill7589; O0-NEXT:  .Lpcsection254:7590; O0-NEXT:    jne .LBB126_27591; O0-NEXT:    jmp .LBB126_17592; O0-NEXT:  .LBB126_2: # %atomicrmw.end7593; O0-NEXT:    movq $1, foo7594; O0-NEXT:    retq7595;7596; O1-LABEL: atomic32_nand_release:7597; O1:       # %bb.0: # %entry7598; O1-NEXT:    movq foo(%rip), %rax7599; O1-NEXT:  .Lpcsection219:7600; O1-NEXT:    movl (%rdi), %eax7601; O1-NEXT:    .p2align 47602; O1-NEXT:  .LBB126_1: # %atomicrmw.start7603; O1-NEXT:    # =>This Inner Loop Header: Depth=17604; O1-NEXT:    movl %eax, %ecx7605; O1-NEXT:  .Lpcsection220:7606; O1-NEXT:    notl %ecx7607; O1-NEXT:  .Lpcsection221:7608; O1-NEXT:    orl $-43, %ecx7609; O1-NEXT:  .Lpcsection222:7610; O1-NEXT:    lock cmpxchgl %ecx, (%rdi)7611; O1-NEXT:  .Lpcsection223:7612; O1-NEXT:    jne .LBB126_17613; O1-NEXT:  # %bb.2: # %atomicrmw.end7614; O1-NEXT:    movq $1, foo(%rip)7615; O1-NEXT:    retq7616;7617; O2-LABEL: atomic32_nand_release:7618; O2:       # %bb.0: # %entry7619; O2-NEXT:    movq foo(%rip), %rax7620; O2-NEXT:  .Lpcsection219:7621; O2-NEXT:    movl (%rdi), %eax7622; O2-NEXT:    .p2align 47623; O2-NEXT:  .LBB126_1: # %atomicrmw.start7624; O2-NEXT:    # =>This Inner Loop Header: Depth=17625; O2-NEXT:    movl %eax, %ecx7626; O2-NEXT:  .Lpcsection220:7627; O2-NEXT:    notl %ecx7628; O2-NEXT:  .Lpcsection221:7629; O2-NEXT:    orl $-43, %ecx7630; O2-NEXT:  .Lpcsection222:7631; O2-NEXT:    lock cmpxchgl %ecx, (%rdi)7632; O2-NEXT:  .Lpcsection223:7633; O2-NEXT:    jne .LBB126_17634; O2-NEXT:  # %bb.2: # %atomicrmw.end7635; O2-NEXT:    movq $1, foo(%rip)7636; O2-NEXT:    retq7637;7638; O3-LABEL: atomic32_nand_release:7639; O3:       # %bb.0: # %entry7640; O3-NEXT:    movq foo(%rip), %rax7641; O3-NEXT:  .Lpcsection219:7642; O3-NEXT:    movl (%rdi), %eax7643; O3-NEXT:    .p2align 47644; O3-NEXT:  .LBB126_1: # %atomicrmw.start7645; O3-NEXT:    # =>This Inner Loop Header: Depth=17646; O3-NEXT:    movl %eax, %ecx7647; O3-NEXT:  .Lpcsection220:7648; O3-NEXT:    notl %ecx7649; O3-NEXT:  .Lpcsection221:7650; O3-NEXT:    orl $-43, %ecx7651; O3-NEXT:  .Lpcsection222:7652; O3-NEXT:    lock cmpxchgl %ecx, (%rdi)7653; O3-NEXT:  .Lpcsection223:7654; O3-NEXT:    jne .LBB126_17655; O3-NEXT:  # %bb.2: # %atomicrmw.end7656; O3-NEXT:    movq $1, foo(%rip)7657; O3-NEXT:    retq7658;7659; HASWELL-O3-LABEL: atomic32_nand_release:7660; HASWELL-O3:       # %bb.0: # %entry7661; HASWELL-O3-NEXT:    movq foo(%rip), %rax7662; HASWELL-O3-NEXT:  .Lpcsection219:7663; HASWELL-O3-NEXT:    movl (%rdi), %eax7664; HASWELL-O3-NEXT:    .p2align 47665; HASWELL-O3-NEXT:  .LBB126_1: # %atomicrmw.start7666; HASWELL-O3-NEXT:    # =>This Inner Loop Header: Depth=17667; HASWELL-O3-NEXT:    movl %eax, %ecx7668; HASWELL-O3-NEXT:  .Lpcsection220:7669; HASWELL-O3-NEXT:    notl %ecx7670; HASWELL-O3-NEXT:  .Lpcsection221:7671; HASWELL-O3-NEXT:    orl $-43, %ecx7672; HASWELL-O3-NEXT:  .Lpcsection222:7673; HASWELL-O3-NEXT:    lock cmpxchgl %ecx, (%rdi)7674; HASWELL-O3-NEXT:  .Lpcsection223:7675; HASWELL-O3-NEXT:    jne .LBB126_17676; HASWELL-O3-NEXT:  # %bb.2: # %atomicrmw.end7677; HASWELL-O3-NEXT:    movq $1, foo(%rip)7678; HASWELL-O3-NEXT:    retq7679entry:7680  load volatile i64, ptr @foo, align 87681  %x = atomicrmw nand ptr %a, i32 42 release, align 4, !pcsections !07682  store volatile i64 1, ptr @foo, align 87683  ret void7684}7685 7686define void @atomic32_xchg_acq_rel(ptr %a) {7687; O0-LABEL: atomic32_xchg_acq_rel:7688; O0:       # %bb.0: # %entry7689; O0-NEXT:    movq foo(%rip), %rax7690; O0-NEXT:    movl $42, %eax7691; O0-NEXT:  .Lpcsection255:7692; O0-NEXT:    xchgl %eax, (%rdi)7693; O0-NEXT:    movq $1, foo7694; O0-NEXT:    retq7695;7696; O1-LABEL: atomic32_xchg_acq_rel:7697; O1:       # %bb.0: # %entry7698; O1-NEXT:    movq foo(%rip), %rax7699; O1-NEXT:    movl $42, %eax7700; O1-NEXT:  .Lpcsection224:7701; O1-NEXT:    xchgl %eax, (%rdi)7702; O1-NEXT:    movq $1, foo(%rip)7703; O1-NEXT:    retq7704;7705; O2-LABEL: atomic32_xchg_acq_rel:7706; O2:       # %bb.0: # %entry7707; O2-NEXT:    movq foo(%rip), %rax7708; O2-NEXT:    movl $42, %eax7709; O2-NEXT:  .Lpcsection224:7710; O2-NEXT:    xchgl %eax, (%rdi)7711; O2-NEXT:    movq $1, foo(%rip)7712; O2-NEXT:    retq7713;7714; O3-LABEL: atomic32_xchg_acq_rel:7715; O3:       # %bb.0: # %entry7716; O3-NEXT:    movq foo(%rip), %rax7717; O3-NEXT:    movl $42, %eax7718; O3-NEXT:  .Lpcsection224:7719; O3-NEXT:    xchgl %eax, (%rdi)7720; O3-NEXT:    movq $1, foo(%rip)7721; O3-NEXT:    retq7722;7723; HASWELL-O3-LABEL: atomic32_xchg_acq_rel:7724; HASWELL-O3:       # %bb.0: # %entry7725; HASWELL-O3-NEXT:    movq foo(%rip), %rax7726; HASWELL-O3-NEXT:    movl $42, %eax7727; HASWELL-O3-NEXT:  .Lpcsection224:7728; HASWELL-O3-NEXT:    xchgl %eax, (%rdi)7729; HASWELL-O3-NEXT:    movq $1, foo(%rip)7730; HASWELL-O3-NEXT:    retq7731entry:7732  load volatile i64, ptr @foo, align 87733  %x = atomicrmw xchg ptr %a, i32 42 acq_rel, align 4, !pcsections !07734  store volatile i64 1, ptr @foo, align 87735  ret void7736}7737 7738define void @atomic32_add_acq_rel(ptr %a) {7739; O0-LABEL: atomic32_add_acq_rel:7740; O0:       # %bb.0: # %entry7741; O0-NEXT:    movq foo(%rip), %rax7742; O0-NEXT:  .Lpcsection256:7743; O0-NEXT:    lock addl $42, (%rdi)7744; O0-NEXT:    movq $1, foo7745; O0-NEXT:    retq7746;7747; O1-LABEL: atomic32_add_acq_rel:7748; O1:       # %bb.0: # %entry7749; O1-NEXT:    movq foo(%rip), %rax7750; O1-NEXT:  .Lpcsection225:7751; O1-NEXT:    lock addl $42, (%rdi)7752; O1-NEXT:    movq $1, foo(%rip)7753; O1-NEXT:    retq7754;7755; O2-LABEL: atomic32_add_acq_rel:7756; O2:       # %bb.0: # %entry7757; O2-NEXT:    movq foo(%rip), %rax7758; O2-NEXT:  .Lpcsection225:7759; O2-NEXT:    lock addl $42, (%rdi)7760; O2-NEXT:    movq $1, foo(%rip)7761; O2-NEXT:    retq7762;7763; O3-LABEL: atomic32_add_acq_rel:7764; O3:       # %bb.0: # %entry7765; O3-NEXT:    movq foo(%rip), %rax7766; O3-NEXT:  .Lpcsection225:7767; O3-NEXT:    lock addl $42, (%rdi)7768; O3-NEXT:    movq $1, foo(%rip)7769; O3-NEXT:    retq7770;7771; HASWELL-O3-LABEL: atomic32_add_acq_rel:7772; HASWELL-O3:       # %bb.0: # %entry7773; HASWELL-O3-NEXT:    movq foo(%rip), %rax7774; HASWELL-O3-NEXT:  .Lpcsection225:7775; HASWELL-O3-NEXT:    lock addl $42, (%rdi)7776; HASWELL-O3-NEXT:    movq $1, foo(%rip)7777; HASWELL-O3-NEXT:    retq7778entry:7779  load volatile i64, ptr @foo, align 87780  %x = atomicrmw add ptr %a, i32 42 acq_rel, align 4, !pcsections !07781  store volatile i64 1, ptr @foo, align 87782  ret void7783}7784 7785define void @atomic32_sub_acq_rel(ptr %a) {7786; O0-LABEL: atomic32_sub_acq_rel:7787; O0:       # %bb.0: # %entry7788; O0-NEXT:    movq foo(%rip), %rax7789; O0-NEXT:  .Lpcsection257:7790; O0-NEXT:    lock subl $42, (%rdi)7791; O0-NEXT:    movq $1, foo7792; O0-NEXT:    retq7793;7794; O1-LABEL: atomic32_sub_acq_rel:7795; O1:       # %bb.0: # %entry7796; O1-NEXT:    movq foo(%rip), %rax7797; O1-NEXT:  .Lpcsection226:7798; O1-NEXT:    lock subl $42, (%rdi)7799; O1-NEXT:    movq $1, foo(%rip)7800; O1-NEXT:    retq7801;7802; O2-LABEL: atomic32_sub_acq_rel:7803; O2:       # %bb.0: # %entry7804; O2-NEXT:    movq foo(%rip), %rax7805; O2-NEXT:  .Lpcsection226:7806; O2-NEXT:    lock subl $42, (%rdi)7807; O2-NEXT:    movq $1, foo(%rip)7808; O2-NEXT:    retq7809;7810; O3-LABEL: atomic32_sub_acq_rel:7811; O3:       # %bb.0: # %entry7812; O3-NEXT:    movq foo(%rip), %rax7813; O3-NEXT:  .Lpcsection226:7814; O3-NEXT:    lock subl $42, (%rdi)7815; O3-NEXT:    movq $1, foo(%rip)7816; O3-NEXT:    retq7817;7818; HASWELL-O3-LABEL: atomic32_sub_acq_rel:7819; HASWELL-O3:       # %bb.0: # %entry7820; HASWELL-O3-NEXT:    movq foo(%rip), %rax7821; HASWELL-O3-NEXT:  .Lpcsection226:7822; HASWELL-O3-NEXT:    lock subl $42, (%rdi)7823; HASWELL-O3-NEXT:    movq $1, foo(%rip)7824; HASWELL-O3-NEXT:    retq7825entry:7826  load volatile i64, ptr @foo, align 87827  %x = atomicrmw sub ptr %a, i32 42 acq_rel, align 4, !pcsections !07828  store volatile i64 1, ptr @foo, align 87829  ret void7830}7831 7832define void @atomic32_and_acq_rel(ptr %a) {7833; O0-LABEL: atomic32_and_acq_rel:7834; O0:       # %bb.0: # %entry7835; O0-NEXT:    movq foo(%rip), %rax7836; O0-NEXT:  .Lpcsection258:7837; O0-NEXT:    lock andl $42, (%rdi)7838; O0-NEXT:    movq $1, foo7839; O0-NEXT:    retq7840;7841; O1-LABEL: atomic32_and_acq_rel:7842; O1:       # %bb.0: # %entry7843; O1-NEXT:    movq foo(%rip), %rax7844; O1-NEXT:  .Lpcsection227:7845; O1-NEXT:    lock andl $42, (%rdi)7846; O1-NEXT:    movq $1, foo(%rip)7847; O1-NEXT:    retq7848;7849; O2-LABEL: atomic32_and_acq_rel:7850; O2:       # %bb.0: # %entry7851; O2-NEXT:    movq foo(%rip), %rax7852; O2-NEXT:  .Lpcsection227:7853; O2-NEXT:    lock andl $42, (%rdi)7854; O2-NEXT:    movq $1, foo(%rip)7855; O2-NEXT:    retq7856;7857; O3-LABEL: atomic32_and_acq_rel:7858; O3:       # %bb.0: # %entry7859; O3-NEXT:    movq foo(%rip), %rax7860; O3-NEXT:  .Lpcsection227:7861; O3-NEXT:    lock andl $42, (%rdi)7862; O3-NEXT:    movq $1, foo(%rip)7863; O3-NEXT:    retq7864;7865; HASWELL-O3-LABEL: atomic32_and_acq_rel:7866; HASWELL-O3:       # %bb.0: # %entry7867; HASWELL-O3-NEXT:    movq foo(%rip), %rax7868; HASWELL-O3-NEXT:  .Lpcsection227:7869; HASWELL-O3-NEXT:    lock andl $42, (%rdi)7870; HASWELL-O3-NEXT:    movq $1, foo(%rip)7871; HASWELL-O3-NEXT:    retq7872entry:7873  load volatile i64, ptr @foo, align 87874  %x = atomicrmw and ptr %a, i32 42 acq_rel, align 4, !pcsections !07875  store volatile i64 1, ptr @foo, align 87876  ret void7877}7878 7879define void @atomic32_or_acq_rel(ptr %a) {7880; O0-LABEL: atomic32_or_acq_rel:7881; O0:       # %bb.0: # %entry7882; O0-NEXT:    movq foo(%rip), %rax7883; O0-NEXT:  .Lpcsection259:7884; O0-NEXT:    lock orl $42, (%rdi)7885; O0-NEXT:    movq $1, foo7886; O0-NEXT:    retq7887;7888; O1-LABEL: atomic32_or_acq_rel:7889; O1:       # %bb.0: # %entry7890; O1-NEXT:    movq foo(%rip), %rax7891; O1-NEXT:  .Lpcsection228:7892; O1-NEXT:    lock orl $42, (%rdi)7893; O1-NEXT:    movq $1, foo(%rip)7894; O1-NEXT:    retq7895;7896; O2-LABEL: atomic32_or_acq_rel:7897; O2:       # %bb.0: # %entry7898; O2-NEXT:    movq foo(%rip), %rax7899; O2-NEXT:  .Lpcsection228:7900; O2-NEXT:    lock orl $42, (%rdi)7901; O2-NEXT:    movq $1, foo(%rip)7902; O2-NEXT:    retq7903;7904; O3-LABEL: atomic32_or_acq_rel:7905; O3:       # %bb.0: # %entry7906; O3-NEXT:    movq foo(%rip), %rax7907; O3-NEXT:  .Lpcsection228:7908; O3-NEXT:    lock orl $42, (%rdi)7909; O3-NEXT:    movq $1, foo(%rip)7910; O3-NEXT:    retq7911;7912; HASWELL-O3-LABEL: atomic32_or_acq_rel:7913; HASWELL-O3:       # %bb.0: # %entry7914; HASWELL-O3-NEXT:    movq foo(%rip), %rax7915; HASWELL-O3-NEXT:  .Lpcsection228:7916; HASWELL-O3-NEXT:    lock orl $42, (%rdi)7917; HASWELL-O3-NEXT:    movq $1, foo(%rip)7918; HASWELL-O3-NEXT:    retq7919entry:7920  load volatile i64, ptr @foo, align 87921  %x = atomicrmw or ptr %a, i32 42 acq_rel, align 4, !pcsections !07922  store volatile i64 1, ptr @foo, align 87923  ret void7924}7925 7926define void @atomic32_xor_acq_rel(ptr %a) {7927; O0-LABEL: atomic32_xor_acq_rel:7928; O0:       # %bb.0: # %entry7929; O0-NEXT:    movq foo(%rip), %rax7930; O0-NEXT:  .Lpcsection260:7931; O0-NEXT:    lock xorl $42, (%rdi)7932; O0-NEXT:    movq $1, foo7933; O0-NEXT:    retq7934;7935; O1-LABEL: atomic32_xor_acq_rel:7936; O1:       # %bb.0: # %entry7937; O1-NEXT:    movq foo(%rip), %rax7938; O1-NEXT:  .Lpcsection229:7939; O1-NEXT:    lock xorl $42, (%rdi)7940; O1-NEXT:    movq $1, foo(%rip)7941; O1-NEXT:    retq7942;7943; O2-LABEL: atomic32_xor_acq_rel:7944; O2:       # %bb.0: # %entry7945; O2-NEXT:    movq foo(%rip), %rax7946; O2-NEXT:  .Lpcsection229:7947; O2-NEXT:    lock xorl $42, (%rdi)7948; O2-NEXT:    movq $1, foo(%rip)7949; O2-NEXT:    retq7950;7951; O3-LABEL: atomic32_xor_acq_rel:7952; O3:       # %bb.0: # %entry7953; O3-NEXT:    movq foo(%rip), %rax7954; O3-NEXT:  .Lpcsection229:7955; O3-NEXT:    lock xorl $42, (%rdi)7956; O3-NEXT:    movq $1, foo(%rip)7957; O3-NEXT:    retq7958;7959; HASWELL-O3-LABEL: atomic32_xor_acq_rel:7960; HASWELL-O3:       # %bb.0: # %entry7961; HASWELL-O3-NEXT:    movq foo(%rip), %rax7962; HASWELL-O3-NEXT:  .Lpcsection229:7963; HASWELL-O3-NEXT:    lock xorl $42, (%rdi)7964; HASWELL-O3-NEXT:    movq $1, foo(%rip)7965; HASWELL-O3-NEXT:    retq7966entry:7967  load volatile i64, ptr @foo, align 87968  %x = atomicrmw xor ptr %a, i32 42 acq_rel, align 4, !pcsections !07969  store volatile i64 1, ptr @foo, align 87970  ret void7971}7972 7973define void @atomic32_nand_acq_rel(ptr %a) {7974; O0-LABEL: atomic32_nand_acq_rel:7975; O0:       # %bb.0: # %entry7976; O0-NEXT:    movq %rdi, {{[-0-9]+}}(%r{{[sb]}}p) # 8-byte Spill7977; O0-NEXT:    movq foo, %rax7978; O0-NEXT:  .Lpcsection261:7979; O0-NEXT:    movl (%rdi), %eax7980; O0-NEXT:    movl %eax, {{[-0-9]+}}(%r{{[sb]}}p) # 4-byte Spill7981; O0-NEXT:  .LBB133_1: # %atomicrmw.start7982; O0-NEXT:    # =>This Inner Loop Header: Depth=17983; O0-NEXT:    movl {{[-0-9]+}}(%r{{[sb]}}p), %eax # 4-byte Reload7984; O0-NEXT:    movq {{[-0-9]+}}(%r{{[sb]}}p), %rcx # 8-byte Reload7985; O0-NEXT:    movl %eax, %edx7986; O0-NEXT:  .Lpcsection262:7987; O0-NEXT:    notl %edx7988; O0-NEXT:  .Lpcsection263:7989; O0-NEXT:    orl $-43, %edx7990; O0-NEXT:  .Lpcsection264:7991; O0-NEXT:    lock cmpxchgl %edx, (%rcx)7992; O0-NEXT:  .Lpcsection265:7993; O0-NEXT:    sete %cl7994; O0-NEXT:  .Lpcsection266:7995; O0-NEXT:    testb $1, %cl7996; O0-NEXT:    movl %eax, {{[-0-9]+}}(%r{{[sb]}}p) # 4-byte Spill7997; O0-NEXT:  .Lpcsection267:7998; O0-NEXT:    jne .LBB133_27999; O0-NEXT:    jmp .LBB133_18000; O0-NEXT:  .LBB133_2: # %atomicrmw.end8001; O0-NEXT:    movq $1, foo8002; O0-NEXT:    retq8003;8004; O1-LABEL: atomic32_nand_acq_rel:8005; O1:       # %bb.0: # %entry8006; O1-NEXT:    movq foo(%rip), %rax8007; O1-NEXT:  .Lpcsection230:8008; O1-NEXT:    movl (%rdi), %eax8009; O1-NEXT:    .p2align 48010; O1-NEXT:  .LBB133_1: # %atomicrmw.start8011; O1-NEXT:    # =>This Inner Loop Header: Depth=18012; O1-NEXT:    movl %eax, %ecx8013; O1-NEXT:  .Lpcsection231:8014; O1-NEXT:    notl %ecx8015; O1-NEXT:  .Lpcsection232:8016; O1-NEXT:    orl $-43, %ecx8017; O1-NEXT:  .Lpcsection233:8018; O1-NEXT:    lock cmpxchgl %ecx, (%rdi)8019; O1-NEXT:  .Lpcsection234:8020; O1-NEXT:    jne .LBB133_18021; O1-NEXT:  # %bb.2: # %atomicrmw.end8022; O1-NEXT:    movq $1, foo(%rip)8023; O1-NEXT:    retq8024;8025; O2-LABEL: atomic32_nand_acq_rel:8026; O2:       # %bb.0: # %entry8027; O2-NEXT:    movq foo(%rip), %rax8028; O2-NEXT:  .Lpcsection230:8029; O2-NEXT:    movl (%rdi), %eax8030; O2-NEXT:    .p2align 48031; O2-NEXT:  .LBB133_1: # %atomicrmw.start8032; O2-NEXT:    # =>This Inner Loop Header: Depth=18033; O2-NEXT:    movl %eax, %ecx8034; O2-NEXT:  .Lpcsection231:8035; O2-NEXT:    notl %ecx8036; O2-NEXT:  .Lpcsection232:8037; O2-NEXT:    orl $-43, %ecx8038; O2-NEXT:  .Lpcsection233:8039; O2-NEXT:    lock cmpxchgl %ecx, (%rdi)8040; O2-NEXT:  .Lpcsection234:8041; O2-NEXT:    jne .LBB133_18042; O2-NEXT:  # %bb.2: # %atomicrmw.end8043; O2-NEXT:    movq $1, foo(%rip)8044; O2-NEXT:    retq8045;8046; O3-LABEL: atomic32_nand_acq_rel:8047; O3:       # %bb.0: # %entry8048; O3-NEXT:    movq foo(%rip), %rax8049; O3-NEXT:  .Lpcsection230:8050; O3-NEXT:    movl (%rdi), %eax8051; O3-NEXT:    .p2align 48052; O3-NEXT:  .LBB133_1: # %atomicrmw.start8053; O3-NEXT:    # =>This Inner Loop Header: Depth=18054; O3-NEXT:    movl %eax, %ecx8055; O3-NEXT:  .Lpcsection231:8056; O3-NEXT:    notl %ecx8057; O3-NEXT:  .Lpcsection232:8058; O3-NEXT:    orl $-43, %ecx8059; O3-NEXT:  .Lpcsection233:8060; O3-NEXT:    lock cmpxchgl %ecx, (%rdi)8061; O3-NEXT:  .Lpcsection234:8062; O3-NEXT:    jne .LBB133_18063; O3-NEXT:  # %bb.2: # %atomicrmw.end8064; O3-NEXT:    movq $1, foo(%rip)8065; O3-NEXT:    retq8066;8067; HASWELL-O3-LABEL: atomic32_nand_acq_rel:8068; HASWELL-O3:       # %bb.0: # %entry8069; HASWELL-O3-NEXT:    movq foo(%rip), %rax8070; HASWELL-O3-NEXT:  .Lpcsection230:8071; HASWELL-O3-NEXT:    movl (%rdi), %eax8072; HASWELL-O3-NEXT:    .p2align 48073; HASWELL-O3-NEXT:  .LBB133_1: # %atomicrmw.start8074; HASWELL-O3-NEXT:    # =>This Inner Loop Header: Depth=18075; HASWELL-O3-NEXT:    movl %eax, %ecx8076; HASWELL-O3-NEXT:  .Lpcsection231:8077; HASWELL-O3-NEXT:    notl %ecx8078; HASWELL-O3-NEXT:  .Lpcsection232:8079; HASWELL-O3-NEXT:    orl $-43, %ecx8080; HASWELL-O3-NEXT:  .Lpcsection233:8081; HASWELL-O3-NEXT:    lock cmpxchgl %ecx, (%rdi)8082; HASWELL-O3-NEXT:  .Lpcsection234:8083; HASWELL-O3-NEXT:    jne .LBB133_18084; HASWELL-O3-NEXT:  # %bb.2: # %atomicrmw.end8085; HASWELL-O3-NEXT:    movq $1, foo(%rip)8086; HASWELL-O3-NEXT:    retq8087entry:8088  load volatile i64, ptr @foo, align 88089  %x = atomicrmw nand ptr %a, i32 42 acq_rel, align 4, !pcsections !08090  store volatile i64 1, ptr @foo, align 88091  ret void8092}8093 8094define void @atomic32_xchg_seq_cst(ptr %a) {8095; O0-LABEL: atomic32_xchg_seq_cst:8096; O0:       # %bb.0: # %entry8097; O0-NEXT:    movq foo(%rip), %rax8098; O0-NEXT:    movl $42, %eax8099; O0-NEXT:  .Lpcsection268:8100; O0-NEXT:    xchgl %eax, (%rdi)8101; O0-NEXT:    movq $1, foo8102; O0-NEXT:    retq8103;8104; O1-LABEL: atomic32_xchg_seq_cst:8105; O1:       # %bb.0: # %entry8106; O1-NEXT:    movq foo(%rip), %rax8107; O1-NEXT:    movl $42, %eax8108; O1-NEXT:  .Lpcsection235:8109; O1-NEXT:    xchgl %eax, (%rdi)8110; O1-NEXT:    movq $1, foo(%rip)8111; O1-NEXT:    retq8112;8113; O2-LABEL: atomic32_xchg_seq_cst:8114; O2:       # %bb.0: # %entry8115; O2-NEXT:    movq foo(%rip), %rax8116; O2-NEXT:    movl $42, %eax8117; O2-NEXT:  .Lpcsection235:8118; O2-NEXT:    xchgl %eax, (%rdi)8119; O2-NEXT:    movq $1, foo(%rip)8120; O2-NEXT:    retq8121;8122; O3-LABEL: atomic32_xchg_seq_cst:8123; O3:       # %bb.0: # %entry8124; O3-NEXT:    movq foo(%rip), %rax8125; O3-NEXT:    movl $42, %eax8126; O3-NEXT:  .Lpcsection235:8127; O3-NEXT:    xchgl %eax, (%rdi)8128; O3-NEXT:    movq $1, foo(%rip)8129; O3-NEXT:    retq8130;8131; HASWELL-O3-LABEL: atomic32_xchg_seq_cst:8132; HASWELL-O3:       # %bb.0: # %entry8133; HASWELL-O3-NEXT:    movq foo(%rip), %rax8134; HASWELL-O3-NEXT:    movl $42, %eax8135; HASWELL-O3-NEXT:  .Lpcsection235:8136; HASWELL-O3-NEXT:    xchgl %eax, (%rdi)8137; HASWELL-O3-NEXT:    movq $1, foo(%rip)8138; HASWELL-O3-NEXT:    retq8139entry:8140  load volatile i64, ptr @foo, align 88141  %x = atomicrmw xchg ptr %a, i32 42 seq_cst, align 4, !pcsections !08142  store volatile i64 1, ptr @foo, align 88143  ret void8144}8145 8146define void @atomic32_add_seq_cst(ptr %a) {8147; O0-LABEL: atomic32_add_seq_cst:8148; O0:       # %bb.0: # %entry8149; O0-NEXT:    movq foo(%rip), %rax8150; O0-NEXT:  .Lpcsection269:8151; O0-NEXT:    lock addl $42, (%rdi)8152; O0-NEXT:    movq $1, foo8153; O0-NEXT:    retq8154;8155; O1-LABEL: atomic32_add_seq_cst:8156; O1:       # %bb.0: # %entry8157; O1-NEXT:    movq foo(%rip), %rax8158; O1-NEXT:  .Lpcsection236:8159; O1-NEXT:    lock addl $42, (%rdi)8160; O1-NEXT:    movq $1, foo(%rip)8161; O1-NEXT:    retq8162;8163; O2-LABEL: atomic32_add_seq_cst:8164; O2:       # %bb.0: # %entry8165; O2-NEXT:    movq foo(%rip), %rax8166; O2-NEXT:  .Lpcsection236:8167; O2-NEXT:    lock addl $42, (%rdi)8168; O2-NEXT:    movq $1, foo(%rip)8169; O2-NEXT:    retq8170;8171; O3-LABEL: atomic32_add_seq_cst:8172; O3:       # %bb.0: # %entry8173; O3-NEXT:    movq foo(%rip), %rax8174; O3-NEXT:  .Lpcsection236:8175; O3-NEXT:    lock addl $42, (%rdi)8176; O3-NEXT:    movq $1, foo(%rip)8177; O3-NEXT:    retq8178;8179; HASWELL-O3-LABEL: atomic32_add_seq_cst:8180; HASWELL-O3:       # %bb.0: # %entry8181; HASWELL-O3-NEXT:    movq foo(%rip), %rax8182; HASWELL-O3-NEXT:  .Lpcsection236:8183; HASWELL-O3-NEXT:    lock addl $42, (%rdi)8184; HASWELL-O3-NEXT:    movq $1, foo(%rip)8185; HASWELL-O3-NEXT:    retq8186entry:8187  load volatile i64, ptr @foo, align 88188  %x = atomicrmw add ptr %a, i32 42 seq_cst, align 4, !pcsections !08189  store volatile i64 1, ptr @foo, align 88190  ret void8191}8192 8193define void @atomic32_sub_seq_cst(ptr %a) {8194; O0-LABEL: atomic32_sub_seq_cst:8195; O0:       # %bb.0: # %entry8196; O0-NEXT:    movq foo(%rip), %rax8197; O0-NEXT:  .Lpcsection270:8198; O0-NEXT:    lock subl $42, (%rdi)8199; O0-NEXT:    movq $1, foo8200; O0-NEXT:    retq8201;8202; O1-LABEL: atomic32_sub_seq_cst:8203; O1:       # %bb.0: # %entry8204; O1-NEXT:    movq foo(%rip), %rax8205; O1-NEXT:  .Lpcsection237:8206; O1-NEXT:    lock subl $42, (%rdi)8207; O1-NEXT:    movq $1, foo(%rip)8208; O1-NEXT:    retq8209;8210; O2-LABEL: atomic32_sub_seq_cst:8211; O2:       # %bb.0: # %entry8212; O2-NEXT:    movq foo(%rip), %rax8213; O2-NEXT:  .Lpcsection237:8214; O2-NEXT:    lock subl $42, (%rdi)8215; O2-NEXT:    movq $1, foo(%rip)8216; O2-NEXT:    retq8217;8218; O3-LABEL: atomic32_sub_seq_cst:8219; O3:       # %bb.0: # %entry8220; O3-NEXT:    movq foo(%rip), %rax8221; O3-NEXT:  .Lpcsection237:8222; O3-NEXT:    lock subl $42, (%rdi)8223; O3-NEXT:    movq $1, foo(%rip)8224; O3-NEXT:    retq8225;8226; HASWELL-O3-LABEL: atomic32_sub_seq_cst:8227; HASWELL-O3:       # %bb.0: # %entry8228; HASWELL-O3-NEXT:    movq foo(%rip), %rax8229; HASWELL-O3-NEXT:  .Lpcsection237:8230; HASWELL-O3-NEXT:    lock subl $42, (%rdi)8231; HASWELL-O3-NEXT:    movq $1, foo(%rip)8232; HASWELL-O3-NEXT:    retq8233entry:8234  load volatile i64, ptr @foo, align 88235  %x = atomicrmw sub ptr %a, i32 42 seq_cst, align 4, !pcsections !08236  store volatile i64 1, ptr @foo, align 88237  ret void8238}8239 8240define void @atomic32_and_seq_cst(ptr %a) {8241; O0-LABEL: atomic32_and_seq_cst:8242; O0:       # %bb.0: # %entry8243; O0-NEXT:    movq foo(%rip), %rax8244; O0-NEXT:  .Lpcsection271:8245; O0-NEXT:    lock andl $42, (%rdi)8246; O0-NEXT:    movq $1, foo8247; O0-NEXT:    retq8248;8249; O1-LABEL: atomic32_and_seq_cst:8250; O1:       # %bb.0: # %entry8251; O1-NEXT:    movq foo(%rip), %rax8252; O1-NEXT:  .Lpcsection238:8253; O1-NEXT:    lock andl $42, (%rdi)8254; O1-NEXT:    movq $1, foo(%rip)8255; O1-NEXT:    retq8256;8257; O2-LABEL: atomic32_and_seq_cst:8258; O2:       # %bb.0: # %entry8259; O2-NEXT:    movq foo(%rip), %rax8260; O2-NEXT:  .Lpcsection238:8261; O2-NEXT:    lock andl $42, (%rdi)8262; O2-NEXT:    movq $1, foo(%rip)8263; O2-NEXT:    retq8264;8265; O3-LABEL: atomic32_and_seq_cst:8266; O3:       # %bb.0: # %entry8267; O3-NEXT:    movq foo(%rip), %rax8268; O3-NEXT:  .Lpcsection238:8269; O3-NEXT:    lock andl $42, (%rdi)8270; O3-NEXT:    movq $1, foo(%rip)8271; O3-NEXT:    retq8272;8273; HASWELL-O3-LABEL: atomic32_and_seq_cst:8274; HASWELL-O3:       # %bb.0: # %entry8275; HASWELL-O3-NEXT:    movq foo(%rip), %rax8276; HASWELL-O3-NEXT:  .Lpcsection238:8277; HASWELL-O3-NEXT:    lock andl $42, (%rdi)8278; HASWELL-O3-NEXT:    movq $1, foo(%rip)8279; HASWELL-O3-NEXT:    retq8280entry:8281  load volatile i64, ptr @foo, align 88282  %x = atomicrmw and ptr %a, i32 42 seq_cst, align 4, !pcsections !08283  store volatile i64 1, ptr @foo, align 88284  ret void8285}8286 8287define void @atomic32_or_seq_cst(ptr %a) {8288; O0-LABEL: atomic32_or_seq_cst:8289; O0:       # %bb.0: # %entry8290; O0-NEXT:    movq foo(%rip), %rax8291; O0-NEXT:  .Lpcsection272:8292; O0-NEXT:    lock orl $42, (%rdi)8293; O0-NEXT:    movq $1, foo8294; O0-NEXT:    retq8295;8296; O1-LABEL: atomic32_or_seq_cst:8297; O1:       # %bb.0: # %entry8298; O1-NEXT:    movq foo(%rip), %rax8299; O1-NEXT:  .Lpcsection239:8300; O1-NEXT:    lock orl $42, (%rdi)8301; O1-NEXT:    movq $1, foo(%rip)8302; O1-NEXT:    retq8303;8304; O2-LABEL: atomic32_or_seq_cst:8305; O2:       # %bb.0: # %entry8306; O2-NEXT:    movq foo(%rip), %rax8307; O2-NEXT:  .Lpcsection239:8308; O2-NEXT:    lock orl $42, (%rdi)8309; O2-NEXT:    movq $1, foo(%rip)8310; O2-NEXT:    retq8311;8312; O3-LABEL: atomic32_or_seq_cst:8313; O3:       # %bb.0: # %entry8314; O3-NEXT:    movq foo(%rip), %rax8315; O3-NEXT:  .Lpcsection239:8316; O3-NEXT:    lock orl $42, (%rdi)8317; O3-NEXT:    movq $1, foo(%rip)8318; O3-NEXT:    retq8319;8320; HASWELL-O3-LABEL: atomic32_or_seq_cst:8321; HASWELL-O3:       # %bb.0: # %entry8322; HASWELL-O3-NEXT:    movq foo(%rip), %rax8323; HASWELL-O3-NEXT:  .Lpcsection239:8324; HASWELL-O3-NEXT:    lock orl $42, (%rdi)8325; HASWELL-O3-NEXT:    movq $1, foo(%rip)8326; HASWELL-O3-NEXT:    retq8327entry:8328  load volatile i64, ptr @foo, align 88329  %x = atomicrmw or ptr %a, i32 42 seq_cst, align 4, !pcsections !08330  store volatile i64 1, ptr @foo, align 88331  ret void8332}8333 8334define void @atomic32_xor_seq_cst(ptr %a) {8335; O0-LABEL: atomic32_xor_seq_cst:8336; O0:       # %bb.0: # %entry8337; O0-NEXT:    movq foo(%rip), %rax8338; O0-NEXT:  .Lpcsection273:8339; O0-NEXT:    lock xorl $42, (%rdi)8340; O0-NEXT:    movq $1, foo8341; O0-NEXT:    retq8342;8343; O1-LABEL: atomic32_xor_seq_cst:8344; O1:       # %bb.0: # %entry8345; O1-NEXT:    movq foo(%rip), %rax8346; O1-NEXT:  .Lpcsection240:8347; O1-NEXT:    lock xorl $42, (%rdi)8348; O1-NEXT:    movq $1, foo(%rip)8349; O1-NEXT:    retq8350;8351; O2-LABEL: atomic32_xor_seq_cst:8352; O2:       # %bb.0: # %entry8353; O2-NEXT:    movq foo(%rip), %rax8354; O2-NEXT:  .Lpcsection240:8355; O2-NEXT:    lock xorl $42, (%rdi)8356; O2-NEXT:    movq $1, foo(%rip)8357; O2-NEXT:    retq8358;8359; O3-LABEL: atomic32_xor_seq_cst:8360; O3:       # %bb.0: # %entry8361; O3-NEXT:    movq foo(%rip), %rax8362; O3-NEXT:  .Lpcsection240:8363; O3-NEXT:    lock xorl $42, (%rdi)8364; O3-NEXT:    movq $1, foo(%rip)8365; O3-NEXT:    retq8366;8367; HASWELL-O3-LABEL: atomic32_xor_seq_cst:8368; HASWELL-O3:       # %bb.0: # %entry8369; HASWELL-O3-NEXT:    movq foo(%rip), %rax8370; HASWELL-O3-NEXT:  .Lpcsection240:8371; HASWELL-O3-NEXT:    lock xorl $42, (%rdi)8372; HASWELL-O3-NEXT:    movq $1, foo(%rip)8373; HASWELL-O3-NEXT:    retq8374entry:8375  load volatile i64, ptr @foo, align 88376  %x = atomicrmw xor ptr %a, i32 42 seq_cst, align 4, !pcsections !08377  store volatile i64 1, ptr @foo, align 88378  ret void8379}8380 8381define void @atomic32_nand_seq_cst(ptr %a) {8382; O0-LABEL: atomic32_nand_seq_cst:8383; O0:       # %bb.0: # %entry8384; O0-NEXT:    movq %rdi, {{[-0-9]+}}(%r{{[sb]}}p) # 8-byte Spill8385; O0-NEXT:    movq foo, %rax8386; O0-NEXT:  .Lpcsection274:8387; O0-NEXT:    movl (%rdi), %eax8388; O0-NEXT:    movl %eax, {{[-0-9]+}}(%r{{[sb]}}p) # 4-byte Spill8389; O0-NEXT:  .LBB140_1: # %atomicrmw.start8390; O0-NEXT:    # =>This Inner Loop Header: Depth=18391; O0-NEXT:    movl {{[-0-9]+}}(%r{{[sb]}}p), %eax # 4-byte Reload8392; O0-NEXT:    movq {{[-0-9]+}}(%r{{[sb]}}p), %rcx # 8-byte Reload8393; O0-NEXT:    movl %eax, %edx8394; O0-NEXT:  .Lpcsection275:8395; O0-NEXT:    notl %edx8396; O0-NEXT:  .Lpcsection276:8397; O0-NEXT:    orl $-43, %edx8398; O0-NEXT:  .Lpcsection277:8399; O0-NEXT:    lock cmpxchgl %edx, (%rcx)8400; O0-NEXT:  .Lpcsection278:8401; O0-NEXT:    sete %cl8402; O0-NEXT:  .Lpcsection279:8403; O0-NEXT:    testb $1, %cl8404; O0-NEXT:    movl %eax, {{[-0-9]+}}(%r{{[sb]}}p) # 4-byte Spill8405; O0-NEXT:  .Lpcsection280:8406; O0-NEXT:    jne .LBB140_28407; O0-NEXT:    jmp .LBB140_18408; O0-NEXT:  .LBB140_2: # %atomicrmw.end8409; O0-NEXT:    movq $1, foo8410; O0-NEXT:    retq8411;8412; O1-LABEL: atomic32_nand_seq_cst:8413; O1:       # %bb.0: # %entry8414; O1-NEXT:    movq foo(%rip), %rax8415; O1-NEXT:  .Lpcsection241:8416; O1-NEXT:    movl (%rdi), %eax8417; O1-NEXT:    .p2align 48418; O1-NEXT:  .LBB140_1: # %atomicrmw.start8419; O1-NEXT:    # =>This Inner Loop Header: Depth=18420; O1-NEXT:    movl %eax, %ecx8421; O1-NEXT:  .Lpcsection242:8422; O1-NEXT:    notl %ecx8423; O1-NEXT:  .Lpcsection243:8424; O1-NEXT:    orl $-43, %ecx8425; O1-NEXT:  .Lpcsection244:8426; O1-NEXT:    lock cmpxchgl %ecx, (%rdi)8427; O1-NEXT:  .Lpcsection245:8428; O1-NEXT:    jne .LBB140_18429; O1-NEXT:  # %bb.2: # %atomicrmw.end8430; O1-NEXT:    movq $1, foo(%rip)8431; O1-NEXT:    retq8432;8433; O2-LABEL: atomic32_nand_seq_cst:8434; O2:       # %bb.0: # %entry8435; O2-NEXT:    movq foo(%rip), %rax8436; O2-NEXT:  .Lpcsection241:8437; O2-NEXT:    movl (%rdi), %eax8438; O2-NEXT:    .p2align 48439; O2-NEXT:  .LBB140_1: # %atomicrmw.start8440; O2-NEXT:    # =>This Inner Loop Header: Depth=18441; O2-NEXT:    movl %eax, %ecx8442; O2-NEXT:  .Lpcsection242:8443; O2-NEXT:    notl %ecx8444; O2-NEXT:  .Lpcsection243:8445; O2-NEXT:    orl $-43, %ecx8446; O2-NEXT:  .Lpcsection244:8447; O2-NEXT:    lock cmpxchgl %ecx, (%rdi)8448; O2-NEXT:  .Lpcsection245:8449; O2-NEXT:    jne .LBB140_18450; O2-NEXT:  # %bb.2: # %atomicrmw.end8451; O2-NEXT:    movq $1, foo(%rip)8452; O2-NEXT:    retq8453;8454; O3-LABEL: atomic32_nand_seq_cst:8455; O3:       # %bb.0: # %entry8456; O3-NEXT:    movq foo(%rip), %rax8457; O3-NEXT:  .Lpcsection241:8458; O3-NEXT:    movl (%rdi), %eax8459; O3-NEXT:    .p2align 48460; O3-NEXT:  .LBB140_1: # %atomicrmw.start8461; O3-NEXT:    # =>This Inner Loop Header: Depth=18462; O3-NEXT:    movl %eax, %ecx8463; O3-NEXT:  .Lpcsection242:8464; O3-NEXT:    notl %ecx8465; O3-NEXT:  .Lpcsection243:8466; O3-NEXT:    orl $-43, %ecx8467; O3-NEXT:  .Lpcsection244:8468; O3-NEXT:    lock cmpxchgl %ecx, (%rdi)8469; O3-NEXT:  .Lpcsection245:8470; O3-NEXT:    jne .LBB140_18471; O3-NEXT:  # %bb.2: # %atomicrmw.end8472; O3-NEXT:    movq $1, foo(%rip)8473; O3-NEXT:    retq8474;8475; HASWELL-O3-LABEL: atomic32_nand_seq_cst:8476; HASWELL-O3:       # %bb.0: # %entry8477; HASWELL-O3-NEXT:    movq foo(%rip), %rax8478; HASWELL-O3-NEXT:  .Lpcsection241:8479; HASWELL-O3-NEXT:    movl (%rdi), %eax8480; HASWELL-O3-NEXT:    .p2align 48481; HASWELL-O3-NEXT:  .LBB140_1: # %atomicrmw.start8482; HASWELL-O3-NEXT:    # =>This Inner Loop Header: Depth=18483; HASWELL-O3-NEXT:    movl %eax, %ecx8484; HASWELL-O3-NEXT:  .Lpcsection242:8485; HASWELL-O3-NEXT:    notl %ecx8486; HASWELL-O3-NEXT:  .Lpcsection243:8487; HASWELL-O3-NEXT:    orl $-43, %ecx8488; HASWELL-O3-NEXT:  .Lpcsection244:8489; HASWELL-O3-NEXT:    lock cmpxchgl %ecx, (%rdi)8490; HASWELL-O3-NEXT:  .Lpcsection245:8491; HASWELL-O3-NEXT:    jne .LBB140_18492; HASWELL-O3-NEXT:  # %bb.2: # %atomicrmw.end8493; HASWELL-O3-NEXT:    movq $1, foo(%rip)8494; HASWELL-O3-NEXT:    retq8495entry:8496  load volatile i64, ptr @foo, align 88497  %x = atomicrmw nand ptr %a, i32 42 seq_cst, align 4, !pcsections !08498  store volatile i64 1, ptr @foo, align 88499  ret void8500}8501 8502define void @atomic32_cas_monotonic(ptr %a) {8503; O0-LABEL: atomic32_cas_monotonic:8504; O0:       # %bb.0: # %entry8505; O0-NEXT:    movq foo(%rip), %rax8506; O0-NEXT:    movl $42, %eax8507; O0-NEXT:    movl %eax, {{[-0-9]+}}(%r{{[sb]}}p) # 4-byte Spill8508; O0-NEXT:    movl $1, %ecx8509; O0-NEXT:  .Lpcsection281:8510; O0-NEXT:    lock cmpxchgl %ecx, (%rdi)8511; O0-NEXT:  .Lpcsection282:8512; O0-NEXT:    # kill: def $edx killed $eax8513; O0-NEXT:    movl {{[-0-9]+}}(%r{{[sb]}}p), %eax # 4-byte Reload8514; O0-NEXT:  .Lpcsection283:8515; O0-NEXT:    lock cmpxchgl %ecx, (%rdi)8516; O0-NEXT:  .Lpcsection284:8517; O0-NEXT:    # kill: def $edx killed $eax8518; O0-NEXT:    movl {{[-0-9]+}}(%r{{[sb]}}p), %eax # 4-byte Reload8519; O0-NEXT:  .Lpcsection285:8520; O0-NEXT:    lock cmpxchgl %ecx, (%rdi)8521; O0-NEXT:    movq $1, foo8522; O0-NEXT:    retq8523;8524; O1-LABEL: atomic32_cas_monotonic:8525; O1:       # %bb.0: # %entry8526; O1-NEXT:    movq foo(%rip), %rax8527; O1-NEXT:    movl $1, %ecx8528; O1-NEXT:  .Lpcsection246:8529; O1-NEXT:    movl $42, %eax8530; O1-NEXT:  .Lpcsection247:8531; O1-NEXT:    lock cmpxchgl %ecx, (%rdi)8532; O1-NEXT:  .Lpcsection248:8533; O1-NEXT:    movl $42, %eax8534; O1-NEXT:  .Lpcsection249:8535; O1-NEXT:    lock cmpxchgl %ecx, (%rdi)8536; O1-NEXT:  .Lpcsection250:8537; O1-NEXT:    movl $42, %eax8538; O1-NEXT:  .Lpcsection251:8539; O1-NEXT:    lock cmpxchgl %ecx, (%rdi)8540; O1-NEXT:    movq $1, foo(%rip)8541; O1-NEXT:    retq8542;8543; O2-LABEL: atomic32_cas_monotonic:8544; O2:       # %bb.0: # %entry8545; O2-NEXT:    movq foo(%rip), %rax8546; O2-NEXT:    movl $1, %ecx8547; O2-NEXT:  .Lpcsection246:8548; O2-NEXT:    movl $42, %eax8549; O2-NEXT:  .Lpcsection247:8550; O2-NEXT:    lock cmpxchgl %ecx, (%rdi)8551; O2-NEXT:  .Lpcsection248:8552; O2-NEXT:    movl $42, %eax8553; O2-NEXT:  .Lpcsection249:8554; O2-NEXT:    lock cmpxchgl %ecx, (%rdi)8555; O2-NEXT:  .Lpcsection250:8556; O2-NEXT:    movl $42, %eax8557; O2-NEXT:  .Lpcsection251:8558; O2-NEXT:    lock cmpxchgl %ecx, (%rdi)8559; O2-NEXT:    movq $1, foo(%rip)8560; O2-NEXT:    retq8561;8562; O3-LABEL: atomic32_cas_monotonic:8563; O3:       # %bb.0: # %entry8564; O3-NEXT:    movq foo(%rip), %rax8565; O3-NEXT:    movl $1, %ecx8566; O3-NEXT:  .Lpcsection246:8567; O3-NEXT:    movl $42, %eax8568; O3-NEXT:  .Lpcsection247:8569; O3-NEXT:    lock cmpxchgl %ecx, (%rdi)8570; O3-NEXT:  .Lpcsection248:8571; O3-NEXT:    movl $42, %eax8572; O3-NEXT:  .Lpcsection249:8573; O3-NEXT:    lock cmpxchgl %ecx, (%rdi)8574; O3-NEXT:  .Lpcsection250:8575; O3-NEXT:    movl $42, %eax8576; O3-NEXT:  .Lpcsection251:8577; O3-NEXT:    lock cmpxchgl %ecx, (%rdi)8578; O3-NEXT:    movq $1, foo(%rip)8579; O3-NEXT:    retq8580;8581; HASWELL-O3-LABEL: atomic32_cas_monotonic:8582; HASWELL-O3:       # %bb.0: # %entry8583; HASWELL-O3-NEXT:    movq foo(%rip), %rax8584; HASWELL-O3-NEXT:    movl $1, %ecx8585; HASWELL-O3-NEXT:  .Lpcsection246:8586; HASWELL-O3-NEXT:    movl $42, %eax8587; HASWELL-O3-NEXT:  .Lpcsection247:8588; HASWELL-O3-NEXT:    lock cmpxchgl %ecx, (%rdi)8589; HASWELL-O3-NEXT:  .Lpcsection248:8590; HASWELL-O3-NEXT:    movl $42, %eax8591; HASWELL-O3-NEXT:  .Lpcsection249:8592; HASWELL-O3-NEXT:    lock cmpxchgl %ecx, (%rdi)8593; HASWELL-O3-NEXT:  .Lpcsection250:8594; HASWELL-O3-NEXT:    movl $42, %eax8595; HASWELL-O3-NEXT:  .Lpcsection251:8596; HASWELL-O3-NEXT:    lock cmpxchgl %ecx, (%rdi)8597; HASWELL-O3-NEXT:    movq $1, foo(%rip)8598; HASWELL-O3-NEXT:    retq8599entry:8600  load volatile i64, ptr @foo, align 88601  %x = cmpxchg ptr %a, i32 42, i32 1 monotonic monotonic, align 4, !pcsections !08602  %y = cmpxchg ptr %a, i32 42, i32 1 monotonic acquire, align 4, !pcsections !08603  %z = cmpxchg ptr %a, i32 42, i32 1 monotonic seq_cst, align 4, !pcsections !08604  store volatile i64 1, ptr @foo, align 88605  ret void8606}8607 8608define void @atomic32_cas_acquire(ptr %a) {8609; O0-LABEL: atomic32_cas_acquire:8610; O0:       # %bb.0: # %entry8611; O0-NEXT:    movq foo(%rip), %rax8612; O0-NEXT:    movl $42, %eax8613; O0-NEXT:    movl %eax, {{[-0-9]+}}(%r{{[sb]}}p) # 4-byte Spill8614; O0-NEXT:    movl $1, %ecx8615; O0-NEXT:  .Lpcsection286:8616; O0-NEXT:    lock cmpxchgl %ecx, (%rdi)8617; O0-NEXT:  .Lpcsection287:8618; O0-NEXT:    # kill: def $edx killed $eax8619; O0-NEXT:    movl {{[-0-9]+}}(%r{{[sb]}}p), %eax # 4-byte Reload8620; O0-NEXT:  .Lpcsection288:8621; O0-NEXT:    lock cmpxchgl %ecx, (%rdi)8622; O0-NEXT:  .Lpcsection289:8623; O0-NEXT:    # kill: def $edx killed $eax8624; O0-NEXT:    movl {{[-0-9]+}}(%r{{[sb]}}p), %eax # 4-byte Reload8625; O0-NEXT:  .Lpcsection290:8626; O0-NEXT:    lock cmpxchgl %ecx, (%rdi)8627; O0-NEXT:    movq $1, foo8628; O0-NEXT:    retq8629;8630; O1-LABEL: atomic32_cas_acquire:8631; O1:       # %bb.0: # %entry8632; O1-NEXT:    movq foo(%rip), %rax8633; O1-NEXT:    movl $1, %ecx8634; O1-NEXT:  .Lpcsection252:8635; O1-NEXT:    movl $42, %eax8636; O1-NEXT:  .Lpcsection253:8637; O1-NEXT:    lock cmpxchgl %ecx, (%rdi)8638; O1-NEXT:  .Lpcsection254:8639; O1-NEXT:    movl $42, %eax8640; O1-NEXT:  .Lpcsection255:8641; O1-NEXT:    lock cmpxchgl %ecx, (%rdi)8642; O1-NEXT:  .Lpcsection256:8643; O1-NEXT:    movl $42, %eax8644; O1-NEXT:  .Lpcsection257:8645; O1-NEXT:    lock cmpxchgl %ecx, (%rdi)8646; O1-NEXT:    movq $1, foo(%rip)8647; O1-NEXT:    retq8648;8649; O2-LABEL: atomic32_cas_acquire:8650; O2:       # %bb.0: # %entry8651; O2-NEXT:    movq foo(%rip), %rax8652; O2-NEXT:    movl $1, %ecx8653; O2-NEXT:  .Lpcsection252:8654; O2-NEXT:    movl $42, %eax8655; O2-NEXT:  .Lpcsection253:8656; O2-NEXT:    lock cmpxchgl %ecx, (%rdi)8657; O2-NEXT:  .Lpcsection254:8658; O2-NEXT:    movl $42, %eax8659; O2-NEXT:  .Lpcsection255:8660; O2-NEXT:    lock cmpxchgl %ecx, (%rdi)8661; O2-NEXT:  .Lpcsection256:8662; O2-NEXT:    movl $42, %eax8663; O2-NEXT:  .Lpcsection257:8664; O2-NEXT:    lock cmpxchgl %ecx, (%rdi)8665; O2-NEXT:    movq $1, foo(%rip)8666; O2-NEXT:    retq8667;8668; O3-LABEL: atomic32_cas_acquire:8669; O3:       # %bb.0: # %entry8670; O3-NEXT:    movq foo(%rip), %rax8671; O3-NEXT:    movl $1, %ecx8672; O3-NEXT:  .Lpcsection252:8673; O3-NEXT:    movl $42, %eax8674; O3-NEXT:  .Lpcsection253:8675; O3-NEXT:    lock cmpxchgl %ecx, (%rdi)8676; O3-NEXT:  .Lpcsection254:8677; O3-NEXT:    movl $42, %eax8678; O3-NEXT:  .Lpcsection255:8679; O3-NEXT:    lock cmpxchgl %ecx, (%rdi)8680; O3-NEXT:  .Lpcsection256:8681; O3-NEXT:    movl $42, %eax8682; O3-NEXT:  .Lpcsection257:8683; O3-NEXT:    lock cmpxchgl %ecx, (%rdi)8684; O3-NEXT:    movq $1, foo(%rip)8685; O3-NEXT:    retq8686;8687; HASWELL-O3-LABEL: atomic32_cas_acquire:8688; HASWELL-O3:       # %bb.0: # %entry8689; HASWELL-O3-NEXT:    movq foo(%rip), %rax8690; HASWELL-O3-NEXT:    movl $1, %ecx8691; HASWELL-O3-NEXT:  .Lpcsection252:8692; HASWELL-O3-NEXT:    movl $42, %eax8693; HASWELL-O3-NEXT:  .Lpcsection253:8694; HASWELL-O3-NEXT:    lock cmpxchgl %ecx, (%rdi)8695; HASWELL-O3-NEXT:  .Lpcsection254:8696; HASWELL-O3-NEXT:    movl $42, %eax8697; HASWELL-O3-NEXT:  .Lpcsection255:8698; HASWELL-O3-NEXT:    lock cmpxchgl %ecx, (%rdi)8699; HASWELL-O3-NEXT:  .Lpcsection256:8700; HASWELL-O3-NEXT:    movl $42, %eax8701; HASWELL-O3-NEXT:  .Lpcsection257:8702; HASWELL-O3-NEXT:    lock cmpxchgl %ecx, (%rdi)8703; HASWELL-O3-NEXT:    movq $1, foo(%rip)8704; HASWELL-O3-NEXT:    retq8705entry:8706  load volatile i64, ptr @foo, align 88707  %x = cmpxchg ptr %a, i32 42, i32 1 acquire monotonic, align 4, !pcsections !08708  %y = cmpxchg ptr %a, i32 42, i32 1 acquire acquire, align 4, !pcsections !08709  %z = cmpxchg ptr %a, i32 42, i32 1 acquire seq_cst, align 4, !pcsections !08710  store volatile i64 1, ptr @foo, align 88711  ret void8712}8713 8714define void @atomic32_cas_release(ptr %a) {8715; O0-LABEL: atomic32_cas_release:8716; O0:       # %bb.0: # %entry8717; O0-NEXT:    movq foo(%rip), %rax8718; O0-NEXT:    movl $42, %eax8719; O0-NEXT:    movl %eax, {{[-0-9]+}}(%r{{[sb]}}p) # 4-byte Spill8720; O0-NEXT:    movl $1, %ecx8721; O0-NEXT:  .Lpcsection291:8722; O0-NEXT:    lock cmpxchgl %ecx, (%rdi)8723; O0-NEXT:  .Lpcsection292:8724; O0-NEXT:    # kill: def $edx killed $eax8725; O0-NEXT:    movl {{[-0-9]+}}(%r{{[sb]}}p), %eax # 4-byte Reload8726; O0-NEXT:  .Lpcsection293:8727; O0-NEXT:    lock cmpxchgl %ecx, (%rdi)8728; O0-NEXT:  .Lpcsection294:8729; O0-NEXT:    # kill: def $edx killed $eax8730; O0-NEXT:    movl {{[-0-9]+}}(%r{{[sb]}}p), %eax # 4-byte Reload8731; O0-NEXT:  .Lpcsection295:8732; O0-NEXT:    lock cmpxchgl %ecx, (%rdi)8733; O0-NEXT:    movq $1, foo8734; O0-NEXT:    retq8735;8736; O1-LABEL: atomic32_cas_release:8737; O1:       # %bb.0: # %entry8738; O1-NEXT:    movq foo(%rip), %rax8739; O1-NEXT:    movl $1, %ecx8740; O1-NEXT:  .Lpcsection258:8741; O1-NEXT:    movl $42, %eax8742; O1-NEXT:  .Lpcsection259:8743; O1-NEXT:    lock cmpxchgl %ecx, (%rdi)8744; O1-NEXT:  .Lpcsection260:8745; O1-NEXT:    movl $42, %eax8746; O1-NEXT:  .Lpcsection261:8747; O1-NEXT:    lock cmpxchgl %ecx, (%rdi)8748; O1-NEXT:  .Lpcsection262:8749; O1-NEXT:    movl $42, %eax8750; O1-NEXT:  .Lpcsection263:8751; O1-NEXT:    lock cmpxchgl %ecx, (%rdi)8752; O1-NEXT:    movq $1, foo(%rip)8753; O1-NEXT:    retq8754;8755; O2-LABEL: atomic32_cas_release:8756; O2:       # %bb.0: # %entry8757; O2-NEXT:    movq foo(%rip), %rax8758; O2-NEXT:    movl $1, %ecx8759; O2-NEXT:  .Lpcsection258:8760; O2-NEXT:    movl $42, %eax8761; O2-NEXT:  .Lpcsection259:8762; O2-NEXT:    lock cmpxchgl %ecx, (%rdi)8763; O2-NEXT:  .Lpcsection260:8764; O2-NEXT:    movl $42, %eax8765; O2-NEXT:  .Lpcsection261:8766; O2-NEXT:    lock cmpxchgl %ecx, (%rdi)8767; O2-NEXT:  .Lpcsection262:8768; O2-NEXT:    movl $42, %eax8769; O2-NEXT:  .Lpcsection263:8770; O2-NEXT:    lock cmpxchgl %ecx, (%rdi)8771; O2-NEXT:    movq $1, foo(%rip)8772; O2-NEXT:    retq8773;8774; O3-LABEL: atomic32_cas_release:8775; O3:       # %bb.0: # %entry8776; O3-NEXT:    movq foo(%rip), %rax8777; O3-NEXT:    movl $1, %ecx8778; O3-NEXT:  .Lpcsection258:8779; O3-NEXT:    movl $42, %eax8780; O3-NEXT:  .Lpcsection259:8781; O3-NEXT:    lock cmpxchgl %ecx, (%rdi)8782; O3-NEXT:  .Lpcsection260:8783; O3-NEXT:    movl $42, %eax8784; O3-NEXT:  .Lpcsection261:8785; O3-NEXT:    lock cmpxchgl %ecx, (%rdi)8786; O3-NEXT:  .Lpcsection262:8787; O3-NEXT:    movl $42, %eax8788; O3-NEXT:  .Lpcsection263:8789; O3-NEXT:    lock cmpxchgl %ecx, (%rdi)8790; O3-NEXT:    movq $1, foo(%rip)8791; O3-NEXT:    retq8792;8793; HASWELL-O3-LABEL: atomic32_cas_release:8794; HASWELL-O3:       # %bb.0: # %entry8795; HASWELL-O3-NEXT:    movq foo(%rip), %rax8796; HASWELL-O3-NEXT:    movl $1, %ecx8797; HASWELL-O3-NEXT:  .Lpcsection258:8798; HASWELL-O3-NEXT:    movl $42, %eax8799; HASWELL-O3-NEXT:  .Lpcsection259:8800; HASWELL-O3-NEXT:    lock cmpxchgl %ecx, (%rdi)8801; HASWELL-O3-NEXT:  .Lpcsection260:8802; HASWELL-O3-NEXT:    movl $42, %eax8803; HASWELL-O3-NEXT:  .Lpcsection261:8804; HASWELL-O3-NEXT:    lock cmpxchgl %ecx, (%rdi)8805; HASWELL-O3-NEXT:  .Lpcsection262:8806; HASWELL-O3-NEXT:    movl $42, %eax8807; HASWELL-O3-NEXT:  .Lpcsection263:8808; HASWELL-O3-NEXT:    lock cmpxchgl %ecx, (%rdi)8809; HASWELL-O3-NEXT:    movq $1, foo(%rip)8810; HASWELL-O3-NEXT:    retq8811entry:8812  load volatile i64, ptr @foo, align 88813  %x = cmpxchg ptr %a, i32 42, i32 1 release monotonic, align 4, !pcsections !08814  %y = cmpxchg ptr %a, i32 42, i32 1 release acquire, align 4, !pcsections !08815  %z = cmpxchg ptr %a, i32 42, i32 1 release seq_cst, align 4, !pcsections !08816  store volatile i64 1, ptr @foo, align 88817  ret void8818}8819 8820define void @atomic32_cas_acq_rel(ptr %a) {8821; O0-LABEL: atomic32_cas_acq_rel:8822; O0:       # %bb.0: # %entry8823; O0-NEXT:    movq foo(%rip), %rax8824; O0-NEXT:    movl $42, %eax8825; O0-NEXT:    movl %eax, {{[-0-9]+}}(%r{{[sb]}}p) # 4-byte Spill8826; O0-NEXT:    movl $1, %ecx8827; O0-NEXT:  .Lpcsection296:8828; O0-NEXT:    lock cmpxchgl %ecx, (%rdi)8829; O0-NEXT:  .Lpcsection297:8830; O0-NEXT:    # kill: def $edx killed $eax8831; O0-NEXT:    movl {{[-0-9]+}}(%r{{[sb]}}p), %eax # 4-byte Reload8832; O0-NEXT:  .Lpcsection298:8833; O0-NEXT:    lock cmpxchgl %ecx, (%rdi)8834; O0-NEXT:  .Lpcsection299:8835; O0-NEXT:    # kill: def $edx killed $eax8836; O0-NEXT:    movl {{[-0-9]+}}(%r{{[sb]}}p), %eax # 4-byte Reload8837; O0-NEXT:  .Lpcsection300:8838; O0-NEXT:    lock cmpxchgl %ecx, (%rdi)8839; O0-NEXT:    movq $1, foo8840; O0-NEXT:    retq8841;8842; O1-LABEL: atomic32_cas_acq_rel:8843; O1:       # %bb.0: # %entry8844; O1-NEXT:    movq foo(%rip), %rax8845; O1-NEXT:    movl $1, %ecx8846; O1-NEXT:  .Lpcsection264:8847; O1-NEXT:    movl $42, %eax8848; O1-NEXT:  .Lpcsection265:8849; O1-NEXT:    lock cmpxchgl %ecx, (%rdi)8850; O1-NEXT:  .Lpcsection266:8851; O1-NEXT:    movl $42, %eax8852; O1-NEXT:  .Lpcsection267:8853; O1-NEXT:    lock cmpxchgl %ecx, (%rdi)8854; O1-NEXT:  .Lpcsection268:8855; O1-NEXT:    movl $42, %eax8856; O1-NEXT:  .Lpcsection269:8857; O1-NEXT:    lock cmpxchgl %ecx, (%rdi)8858; O1-NEXT:    movq $1, foo(%rip)8859; O1-NEXT:    retq8860;8861; O2-LABEL: atomic32_cas_acq_rel:8862; O2:       # %bb.0: # %entry8863; O2-NEXT:    movq foo(%rip), %rax8864; O2-NEXT:    movl $1, %ecx8865; O2-NEXT:  .Lpcsection264:8866; O2-NEXT:    movl $42, %eax8867; O2-NEXT:  .Lpcsection265:8868; O2-NEXT:    lock cmpxchgl %ecx, (%rdi)8869; O2-NEXT:  .Lpcsection266:8870; O2-NEXT:    movl $42, %eax8871; O2-NEXT:  .Lpcsection267:8872; O2-NEXT:    lock cmpxchgl %ecx, (%rdi)8873; O2-NEXT:  .Lpcsection268:8874; O2-NEXT:    movl $42, %eax8875; O2-NEXT:  .Lpcsection269:8876; O2-NEXT:    lock cmpxchgl %ecx, (%rdi)8877; O2-NEXT:    movq $1, foo(%rip)8878; O2-NEXT:    retq8879;8880; O3-LABEL: atomic32_cas_acq_rel:8881; O3:       # %bb.0: # %entry8882; O3-NEXT:    movq foo(%rip), %rax8883; O3-NEXT:    movl $1, %ecx8884; O3-NEXT:  .Lpcsection264:8885; O3-NEXT:    movl $42, %eax8886; O3-NEXT:  .Lpcsection265:8887; O3-NEXT:    lock cmpxchgl %ecx, (%rdi)8888; O3-NEXT:  .Lpcsection266:8889; O3-NEXT:    movl $42, %eax8890; O3-NEXT:  .Lpcsection267:8891; O3-NEXT:    lock cmpxchgl %ecx, (%rdi)8892; O3-NEXT:  .Lpcsection268:8893; O3-NEXT:    movl $42, %eax8894; O3-NEXT:  .Lpcsection269:8895; O3-NEXT:    lock cmpxchgl %ecx, (%rdi)8896; O3-NEXT:    movq $1, foo(%rip)8897; O3-NEXT:    retq8898;8899; HASWELL-O3-LABEL: atomic32_cas_acq_rel:8900; HASWELL-O3:       # %bb.0: # %entry8901; HASWELL-O3-NEXT:    movq foo(%rip), %rax8902; HASWELL-O3-NEXT:    movl $1, %ecx8903; HASWELL-O3-NEXT:  .Lpcsection264:8904; HASWELL-O3-NEXT:    movl $42, %eax8905; HASWELL-O3-NEXT:  .Lpcsection265:8906; HASWELL-O3-NEXT:    lock cmpxchgl %ecx, (%rdi)8907; HASWELL-O3-NEXT:  .Lpcsection266:8908; HASWELL-O3-NEXT:    movl $42, %eax8909; HASWELL-O3-NEXT:  .Lpcsection267:8910; HASWELL-O3-NEXT:    lock cmpxchgl %ecx, (%rdi)8911; HASWELL-O3-NEXT:  .Lpcsection268:8912; HASWELL-O3-NEXT:    movl $42, %eax8913; HASWELL-O3-NEXT:  .Lpcsection269:8914; HASWELL-O3-NEXT:    lock cmpxchgl %ecx, (%rdi)8915; HASWELL-O3-NEXT:    movq $1, foo(%rip)8916; HASWELL-O3-NEXT:    retq8917entry:8918  load volatile i64, ptr @foo, align 88919  %x = cmpxchg ptr %a, i32 42, i32 1 acq_rel monotonic, align 4, !pcsections !08920  %y = cmpxchg ptr %a, i32 42, i32 1 acq_rel acquire, align 4, !pcsections !08921  %z = cmpxchg ptr %a, i32 42, i32 1 acq_rel seq_cst, align 4, !pcsections !08922  store volatile i64 1, ptr @foo, align 88923  ret void8924}8925 8926define void @atomic32_cas_seq_cst(ptr %a) {8927; O0-LABEL: atomic32_cas_seq_cst:8928; O0:       # %bb.0: # %entry8929; O0-NEXT:    movq foo(%rip), %rax8930; O0-NEXT:    movl $42, %eax8931; O0-NEXT:    movl %eax, {{[-0-9]+}}(%r{{[sb]}}p) # 4-byte Spill8932; O0-NEXT:    movl $1, %ecx8933; O0-NEXT:  .Lpcsection301:8934; O0-NEXT:    lock cmpxchgl %ecx, (%rdi)8935; O0-NEXT:  .Lpcsection302:8936; O0-NEXT:    # kill: def $edx killed $eax8937; O0-NEXT:    movl {{[-0-9]+}}(%r{{[sb]}}p), %eax # 4-byte Reload8938; O0-NEXT:  .Lpcsection303:8939; O0-NEXT:    lock cmpxchgl %ecx, (%rdi)8940; O0-NEXT:  .Lpcsection304:8941; O0-NEXT:    # kill: def $edx killed $eax8942; O0-NEXT:    movl {{[-0-9]+}}(%r{{[sb]}}p), %eax # 4-byte Reload8943; O0-NEXT:  .Lpcsection305:8944; O0-NEXT:    lock cmpxchgl %ecx, (%rdi)8945; O0-NEXT:    movq $1, foo8946; O0-NEXT:    retq8947;8948; O1-LABEL: atomic32_cas_seq_cst:8949; O1:       # %bb.0: # %entry8950; O1-NEXT:    movq foo(%rip), %rax8951; O1-NEXT:    movl $1, %ecx8952; O1-NEXT:  .Lpcsection270:8953; O1-NEXT:    movl $42, %eax8954; O1-NEXT:  .Lpcsection271:8955; O1-NEXT:    lock cmpxchgl %ecx, (%rdi)8956; O1-NEXT:  .Lpcsection272:8957; O1-NEXT:    movl $42, %eax8958; O1-NEXT:  .Lpcsection273:8959; O1-NEXT:    lock cmpxchgl %ecx, (%rdi)8960; O1-NEXT:  .Lpcsection274:8961; O1-NEXT:    movl $42, %eax8962; O1-NEXT:  .Lpcsection275:8963; O1-NEXT:    lock cmpxchgl %ecx, (%rdi)8964; O1-NEXT:    movq $1, foo(%rip)8965; O1-NEXT:    retq8966;8967; O2-LABEL: atomic32_cas_seq_cst:8968; O2:       # %bb.0: # %entry8969; O2-NEXT:    movq foo(%rip), %rax8970; O2-NEXT:    movl $1, %ecx8971; O2-NEXT:  .Lpcsection270:8972; O2-NEXT:    movl $42, %eax8973; O2-NEXT:  .Lpcsection271:8974; O2-NEXT:    lock cmpxchgl %ecx, (%rdi)8975; O2-NEXT:  .Lpcsection272:8976; O2-NEXT:    movl $42, %eax8977; O2-NEXT:  .Lpcsection273:8978; O2-NEXT:    lock cmpxchgl %ecx, (%rdi)8979; O2-NEXT:  .Lpcsection274:8980; O2-NEXT:    movl $42, %eax8981; O2-NEXT:  .Lpcsection275:8982; O2-NEXT:    lock cmpxchgl %ecx, (%rdi)8983; O2-NEXT:    movq $1, foo(%rip)8984; O2-NEXT:    retq8985;8986; O3-LABEL: atomic32_cas_seq_cst:8987; O3:       # %bb.0: # %entry8988; O3-NEXT:    movq foo(%rip), %rax8989; O3-NEXT:    movl $1, %ecx8990; O3-NEXT:  .Lpcsection270:8991; O3-NEXT:    movl $42, %eax8992; O3-NEXT:  .Lpcsection271:8993; O3-NEXT:    lock cmpxchgl %ecx, (%rdi)8994; O3-NEXT:  .Lpcsection272:8995; O3-NEXT:    movl $42, %eax8996; O3-NEXT:  .Lpcsection273:8997; O3-NEXT:    lock cmpxchgl %ecx, (%rdi)8998; O3-NEXT:  .Lpcsection274:8999; O3-NEXT:    movl $42, %eax9000; O3-NEXT:  .Lpcsection275:9001; O3-NEXT:    lock cmpxchgl %ecx, (%rdi)9002; O3-NEXT:    movq $1, foo(%rip)9003; O3-NEXT:    retq9004;9005; HASWELL-O3-LABEL: atomic32_cas_seq_cst:9006; HASWELL-O3:       # %bb.0: # %entry9007; HASWELL-O3-NEXT:    movq foo(%rip), %rax9008; HASWELL-O3-NEXT:    movl $1, %ecx9009; HASWELL-O3-NEXT:  .Lpcsection270:9010; HASWELL-O3-NEXT:    movl $42, %eax9011; HASWELL-O3-NEXT:  .Lpcsection271:9012; HASWELL-O3-NEXT:    lock cmpxchgl %ecx, (%rdi)9013; HASWELL-O3-NEXT:  .Lpcsection272:9014; HASWELL-O3-NEXT:    movl $42, %eax9015; HASWELL-O3-NEXT:  .Lpcsection273:9016; HASWELL-O3-NEXT:    lock cmpxchgl %ecx, (%rdi)9017; HASWELL-O3-NEXT:  .Lpcsection274:9018; HASWELL-O3-NEXT:    movl $42, %eax9019; HASWELL-O3-NEXT:  .Lpcsection275:9020; HASWELL-O3-NEXT:    lock cmpxchgl %ecx, (%rdi)9021; HASWELL-O3-NEXT:    movq $1, foo(%rip)9022; HASWELL-O3-NEXT:    retq9023entry:9024  load volatile i64, ptr @foo, align 89025  %x = cmpxchg ptr %a, i32 42, i32 1 seq_cst monotonic, align 4, !pcsections !09026  %y = cmpxchg ptr %a, i32 42, i32 1 seq_cst acquire, align 4, !pcsections !09027  %z = cmpxchg ptr %a, i32 42, i32 1 seq_cst seq_cst, align 4, !pcsections !09028  store volatile i64 1, ptr @foo, align 89029  ret void9030}9031 9032define i64 @atomic64_load_unordered(ptr %a) {9033; O0-LABEL: atomic64_load_unordered:9034; O0:       # %bb.0: # %entry9035; O0-NEXT:    movq foo(%rip), %rax9036; O0-NEXT:  .Lpcsection306:9037; O0-NEXT:    movq (%rdi), %rax9038; O0-NEXT:    movq $1, foo9039; O0-NEXT:    retq9040;9041; O1-LABEL: atomic64_load_unordered:9042; O1:       # %bb.0: # %entry9043; O1-NEXT:    movq foo(%rip), %rax9044; O1-NEXT:  .Lpcsection276:9045; O1-NEXT:    movq (%rdi), %rax9046; O1-NEXT:    movq $1, foo(%rip)9047; O1-NEXT:    retq9048;9049; O2-LABEL: atomic64_load_unordered:9050; O2:       # %bb.0: # %entry9051; O2-NEXT:    movq foo(%rip), %rax9052; O2-NEXT:  .Lpcsection276:9053; O2-NEXT:    movq (%rdi), %rax9054; O2-NEXT:    movq $1, foo(%rip)9055; O2-NEXT:    retq9056;9057; O3-LABEL: atomic64_load_unordered:9058; O3:       # %bb.0: # %entry9059; O3-NEXT:    movq foo(%rip), %rax9060; O3-NEXT:  .Lpcsection276:9061; O3-NEXT:    movq (%rdi), %rax9062; O3-NEXT:    movq $1, foo(%rip)9063; O3-NEXT:    retq9064;9065; HASWELL-O3-LABEL: atomic64_load_unordered:9066; HASWELL-O3:       # %bb.0: # %entry9067; HASWELL-O3-NEXT:    movq foo(%rip), %rax9068; HASWELL-O3-NEXT:  .Lpcsection276:9069; HASWELL-O3-NEXT:    movq (%rdi), %rax9070; HASWELL-O3-NEXT:    movq $1, foo(%rip)9071; HASWELL-O3-NEXT:    retq9072entry:9073  load volatile i64, ptr @foo, align 89074  %x = load atomic i64, ptr %a unordered, align 8, !pcsections !09075  store volatile i64 1, ptr @foo, align 89076  ret i64 %x9077}9078 9079define i64 @atomic64_load_monotonic(ptr %a) {9080; O0-LABEL: atomic64_load_monotonic:9081; O0:       # %bb.0: # %entry9082; O0-NEXT:    movq foo(%rip), %rax9083; O0-NEXT:  .Lpcsection307:9084; O0-NEXT:    movq (%rdi), %rax9085; O0-NEXT:    movq $1, foo9086; O0-NEXT:    retq9087;9088; O1-LABEL: atomic64_load_monotonic:9089; O1:       # %bb.0: # %entry9090; O1-NEXT:    movq foo(%rip), %rax9091; O1-NEXT:  .Lpcsection277:9092; O1-NEXT:    movq (%rdi), %rax9093; O1-NEXT:    movq $1, foo(%rip)9094; O1-NEXT:    retq9095;9096; O2-LABEL: atomic64_load_monotonic:9097; O2:       # %bb.0: # %entry9098; O2-NEXT:    movq foo(%rip), %rax9099; O2-NEXT:  .Lpcsection277:9100; O2-NEXT:    movq (%rdi), %rax9101; O2-NEXT:    movq $1, foo(%rip)9102; O2-NEXT:    retq9103;9104; O3-LABEL: atomic64_load_monotonic:9105; O3:       # %bb.0: # %entry9106; O3-NEXT:    movq foo(%rip), %rax9107; O3-NEXT:  .Lpcsection277:9108; O3-NEXT:    movq (%rdi), %rax9109; O3-NEXT:    movq $1, foo(%rip)9110; O3-NEXT:    retq9111;9112; HASWELL-O3-LABEL: atomic64_load_monotonic:9113; HASWELL-O3:       # %bb.0: # %entry9114; HASWELL-O3-NEXT:    movq foo(%rip), %rax9115; HASWELL-O3-NEXT:  .Lpcsection277:9116; HASWELL-O3-NEXT:    movq (%rdi), %rax9117; HASWELL-O3-NEXT:    movq $1, foo(%rip)9118; HASWELL-O3-NEXT:    retq9119entry:9120  load volatile i64, ptr @foo, align 89121  %x = load atomic i64, ptr %a monotonic, align 8, !pcsections !09122  store volatile i64 1, ptr @foo, align 89123  ret i64 %x9124}9125 9126define i64 @atomic64_load_acquire(ptr %a) {9127; O0-LABEL: atomic64_load_acquire:9128; O0:       # %bb.0: # %entry9129; O0-NEXT:    movq foo(%rip), %rax9130; O0-NEXT:  .Lpcsection308:9131; O0-NEXT:    movq (%rdi), %rax9132; O0-NEXT:    movq $1, foo9133; O0-NEXT:    retq9134;9135; O1-LABEL: atomic64_load_acquire:9136; O1:       # %bb.0: # %entry9137; O1-NEXT:    movq foo(%rip), %rax9138; O1-NEXT:  .Lpcsection278:9139; O1-NEXT:    movq (%rdi), %rax9140; O1-NEXT:    movq $1, foo(%rip)9141; O1-NEXT:    retq9142;9143; O2-LABEL: atomic64_load_acquire:9144; O2:       # %bb.0: # %entry9145; O2-NEXT:    movq foo(%rip), %rax9146; O2-NEXT:  .Lpcsection278:9147; O2-NEXT:    movq (%rdi), %rax9148; O2-NEXT:    movq $1, foo(%rip)9149; O2-NEXT:    retq9150;9151; O3-LABEL: atomic64_load_acquire:9152; O3:       # %bb.0: # %entry9153; O3-NEXT:    movq foo(%rip), %rax9154; O3-NEXT:  .Lpcsection278:9155; O3-NEXT:    movq (%rdi), %rax9156; O3-NEXT:    movq $1, foo(%rip)9157; O3-NEXT:    retq9158;9159; HASWELL-O3-LABEL: atomic64_load_acquire:9160; HASWELL-O3:       # %bb.0: # %entry9161; HASWELL-O3-NEXT:    movq foo(%rip), %rax9162; HASWELL-O3-NEXT:  .Lpcsection278:9163; HASWELL-O3-NEXT:    movq (%rdi), %rax9164; HASWELL-O3-NEXT:    movq $1, foo(%rip)9165; HASWELL-O3-NEXT:    retq9166entry:9167  load volatile i64, ptr @foo, align 89168  %x = load atomic i64, ptr %a acquire, align 8, !pcsections !09169  store volatile i64 1, ptr @foo, align 89170  ret i64 %x9171}9172 9173define i64 @atomic64_load_seq_cst(ptr %a) {9174; O0-LABEL: atomic64_load_seq_cst:9175; O0:       # %bb.0: # %entry9176; O0-NEXT:    movq foo(%rip), %rax9177; O0-NEXT:  .Lpcsection309:9178; O0-NEXT:    movq (%rdi), %rax9179; O0-NEXT:    movq $1, foo9180; O0-NEXT:    retq9181;9182; O1-LABEL: atomic64_load_seq_cst:9183; O1:       # %bb.0: # %entry9184; O1-NEXT:    movq foo(%rip), %rax9185; O1-NEXT:  .Lpcsection279:9186; O1-NEXT:    movq (%rdi), %rax9187; O1-NEXT:    movq $1, foo(%rip)9188; O1-NEXT:    retq9189;9190; O2-LABEL: atomic64_load_seq_cst:9191; O2:       # %bb.0: # %entry9192; O2-NEXT:    movq foo(%rip), %rax9193; O2-NEXT:  .Lpcsection279:9194; O2-NEXT:    movq (%rdi), %rax9195; O2-NEXT:    movq $1, foo(%rip)9196; O2-NEXT:    retq9197;9198; O3-LABEL: atomic64_load_seq_cst:9199; O3:       # %bb.0: # %entry9200; O3-NEXT:    movq foo(%rip), %rax9201; O3-NEXT:  .Lpcsection279:9202; O3-NEXT:    movq (%rdi), %rax9203; O3-NEXT:    movq $1, foo(%rip)9204; O3-NEXT:    retq9205;9206; HASWELL-O3-LABEL: atomic64_load_seq_cst:9207; HASWELL-O3:       # %bb.0: # %entry9208; HASWELL-O3-NEXT:    movq foo(%rip), %rax9209; HASWELL-O3-NEXT:  .Lpcsection279:9210; HASWELL-O3-NEXT:    movq (%rdi), %rax9211; HASWELL-O3-NEXT:    movq $1, foo(%rip)9212; HASWELL-O3-NEXT:    retq9213entry:9214  load volatile i64, ptr @foo, align 89215  %x = load atomic i64, ptr %a seq_cst, align 8, !pcsections !09216  store volatile i64 1, ptr @foo, align 89217  ret i64 %x9218}9219 9220define ptr @atomic64_load_seq_cst_ptr_ty(ptr %a) {9221; O0-LABEL: atomic64_load_seq_cst_ptr_ty:9222; O0:       # %bb.0: # %entry9223; O0-NEXT:    movq foo(%rip), %rax9224; O0-NEXT:  .Lpcsection310:9225; O0-NEXT:    movq (%rdi), %rax9226; O0-NEXT:    movq $1, foo9227; O0-NEXT:    retq9228;9229; O1-LABEL: atomic64_load_seq_cst_ptr_ty:9230; O1:       # %bb.0: # %entry9231; O1-NEXT:    movq foo(%rip), %rax9232; O1-NEXT:  .Lpcsection280:9233; O1-NEXT:    movq (%rdi), %rax9234; O1-NEXT:    movq $1, foo(%rip)9235; O1-NEXT:    retq9236;9237; O2-LABEL: atomic64_load_seq_cst_ptr_ty:9238; O2:       # %bb.0: # %entry9239; O2-NEXT:    movq foo(%rip), %rax9240; O2-NEXT:  .Lpcsection280:9241; O2-NEXT:    movq (%rdi), %rax9242; O2-NEXT:    movq $1, foo(%rip)9243; O2-NEXT:    retq9244;9245; O3-LABEL: atomic64_load_seq_cst_ptr_ty:9246; O3:       # %bb.0: # %entry9247; O3-NEXT:    movq foo(%rip), %rax9248; O3-NEXT:  .Lpcsection280:9249; O3-NEXT:    movq (%rdi), %rax9250; O3-NEXT:    movq $1, foo(%rip)9251; O3-NEXT:    retq9252;9253; HASWELL-O3-LABEL: atomic64_load_seq_cst_ptr_ty:9254; HASWELL-O3:       # %bb.0: # %entry9255; HASWELL-O3-NEXT:    movq foo(%rip), %rax9256; HASWELL-O3-NEXT:  .Lpcsection280:9257; HASWELL-O3-NEXT:    movq (%rdi), %rax9258; HASWELL-O3-NEXT:    movq $1, foo(%rip)9259; HASWELL-O3-NEXT:    retq9260entry:9261  load volatile i64, ptr @foo, align 89262  %x = load atomic ptr, ptr %a seq_cst, align 8, !pcsections !09263  store volatile i64 1, ptr @foo, align 89264  ret ptr %x9265}9266 9267define void @atomic64_store_unordered(ptr %a) {9268; O0-LABEL: atomic64_store_unordered:9269; O0:       # %bb.0: # %entry9270; O0-NEXT:    movq foo(%rip), %rax9271; O0-NEXT:  .Lpcsection311:9272; O0-NEXT:    movq $42, (%rdi)9273; O0-NEXT:    movq $1, foo9274; O0-NEXT:    retq9275;9276; O1-LABEL: atomic64_store_unordered:9277; O1:       # %bb.0: # %entry9278; O1-NEXT:    movq foo(%rip), %rax9279; O1-NEXT:  .Lpcsection281:9280; O1-NEXT:    movq $42, (%rdi)9281; O1-NEXT:    movq $1, foo(%rip)9282; O1-NEXT:    retq9283;9284; O2-LABEL: atomic64_store_unordered:9285; O2:       # %bb.0: # %entry9286; O2-NEXT:    movq foo(%rip), %rax9287; O2-NEXT:  .Lpcsection281:9288; O2-NEXT:    movq $42, (%rdi)9289; O2-NEXT:    movq $1, foo(%rip)9290; O2-NEXT:    retq9291;9292; O3-LABEL: atomic64_store_unordered:9293; O3:       # %bb.0: # %entry9294; O3-NEXT:    movq foo(%rip), %rax9295; O3-NEXT:  .Lpcsection281:9296; O3-NEXT:    movq $42, (%rdi)9297; O3-NEXT:    movq $1, foo(%rip)9298; O3-NEXT:    retq9299;9300; HASWELL-O3-LABEL: atomic64_store_unordered:9301; HASWELL-O3:       # %bb.0: # %entry9302; HASWELL-O3-NEXT:    movq foo(%rip), %rax9303; HASWELL-O3-NEXT:  .Lpcsection281:9304; HASWELL-O3-NEXT:    movq $42, (%rdi)9305; HASWELL-O3-NEXT:    movq $1, foo(%rip)9306; HASWELL-O3-NEXT:    retq9307entry:9308  load volatile i64, ptr @foo, align 89309  store atomic i64 42, ptr %a unordered, align 8, !pcsections !09310  store volatile i64 1, ptr @foo, align 89311  ret void9312}9313 9314define void @atomic64_store_monotonic(ptr %a) {9315; O0-LABEL: atomic64_store_monotonic:9316; O0:       # %bb.0: # %entry9317; O0-NEXT:    movq foo(%rip), %rax9318; O0-NEXT:  .Lpcsection312:9319; O0-NEXT:    movq $42, (%rdi)9320; O0-NEXT:    movq $1, foo9321; O0-NEXT:    retq9322;9323; O1-LABEL: atomic64_store_monotonic:9324; O1:       # %bb.0: # %entry9325; O1-NEXT:    movq foo(%rip), %rax9326; O1-NEXT:  .Lpcsection282:9327; O1-NEXT:    movq $42, (%rdi)9328; O1-NEXT:    movq $1, foo(%rip)9329; O1-NEXT:    retq9330;9331; O2-LABEL: atomic64_store_monotonic:9332; O2:       # %bb.0: # %entry9333; O2-NEXT:    movq foo(%rip), %rax9334; O2-NEXT:  .Lpcsection282:9335; O2-NEXT:    movq $42, (%rdi)9336; O2-NEXT:    movq $1, foo(%rip)9337; O2-NEXT:    retq9338;9339; O3-LABEL: atomic64_store_monotonic:9340; O3:       # %bb.0: # %entry9341; O3-NEXT:    movq foo(%rip), %rax9342; O3-NEXT:  .Lpcsection282:9343; O3-NEXT:    movq $42, (%rdi)9344; O3-NEXT:    movq $1, foo(%rip)9345; O3-NEXT:    retq9346;9347; HASWELL-O3-LABEL: atomic64_store_monotonic:9348; HASWELL-O3:       # %bb.0: # %entry9349; HASWELL-O3-NEXT:    movq foo(%rip), %rax9350; HASWELL-O3-NEXT:  .Lpcsection282:9351; HASWELL-O3-NEXT:    movq $42, (%rdi)9352; HASWELL-O3-NEXT:    movq $1, foo(%rip)9353; HASWELL-O3-NEXT:    retq9354entry:9355  load volatile i64, ptr @foo, align 89356  store atomic i64 42, ptr %a monotonic, align 8, !pcsections !09357  store volatile i64 1, ptr @foo, align 89358  ret void9359}9360 9361define void @atomic64_store_release(ptr %a) {9362; O0-LABEL: atomic64_store_release:9363; O0:       # %bb.0: # %entry9364; O0-NEXT:    movq foo(%rip), %rax9365; O0-NEXT:  .Lpcsection313:9366; O0-NEXT:    movq $42, (%rdi)9367; O0-NEXT:    movq $1, foo9368; O0-NEXT:    retq9369;9370; O1-LABEL: atomic64_store_release:9371; O1:       # %bb.0: # %entry9372; O1-NEXT:    movq foo(%rip), %rax9373; O1-NEXT:  .Lpcsection283:9374; O1-NEXT:    movq $42, (%rdi)9375; O1-NEXT:    movq $1, foo(%rip)9376; O1-NEXT:    retq9377;9378; O2-LABEL: atomic64_store_release:9379; O2:       # %bb.0: # %entry9380; O2-NEXT:    movq foo(%rip), %rax9381; O2-NEXT:  .Lpcsection283:9382; O2-NEXT:    movq $42, (%rdi)9383; O2-NEXT:    movq $1, foo(%rip)9384; O2-NEXT:    retq9385;9386; O3-LABEL: atomic64_store_release:9387; O3:       # %bb.0: # %entry9388; O3-NEXT:    movq foo(%rip), %rax9389; O3-NEXT:  .Lpcsection283:9390; O3-NEXT:    movq $42, (%rdi)9391; O3-NEXT:    movq $1, foo(%rip)9392; O3-NEXT:    retq9393;9394; HASWELL-O3-LABEL: atomic64_store_release:9395; HASWELL-O3:       # %bb.0: # %entry9396; HASWELL-O3-NEXT:    movq foo(%rip), %rax9397; HASWELL-O3-NEXT:  .Lpcsection283:9398; HASWELL-O3-NEXT:    movq $42, (%rdi)9399; HASWELL-O3-NEXT:    movq $1, foo(%rip)9400; HASWELL-O3-NEXT:    retq9401entry:9402  load volatile i64, ptr @foo, align 89403  store atomic i64 42, ptr %a release, align 8, !pcsections !09404  store volatile i64 1, ptr @foo, align 89405  ret void9406}9407 9408define void @atomic64_store_seq_cst(ptr %a) {9409; O0-LABEL: atomic64_store_seq_cst:9410; O0:       # %bb.0: # %entry9411; O0-NEXT:    movq foo(%rip), %rax9412; O0-NEXT:    movl $42, %eax9413; O0-NEXT:  .Lpcsection314:9414; O0-NEXT:    xchgq %rax, (%rdi)9415; O0-NEXT:    movq $1, foo9416; O0-NEXT:    retq9417;9418; O1-LABEL: atomic64_store_seq_cst:9419; O1:       # %bb.0: # %entry9420; O1-NEXT:    movq foo(%rip), %rax9421; O1-NEXT:    movl $42, %eax9422; O1-NEXT:  .Lpcsection284:9423; O1-NEXT:    xchgq %rax, (%rdi)9424; O1-NEXT:    movq $1, foo(%rip)9425; O1-NEXT:    retq9426;9427; O2-LABEL: atomic64_store_seq_cst:9428; O2:       # %bb.0: # %entry9429; O2-NEXT:    movq foo(%rip), %rax9430; O2-NEXT:    movl $42, %eax9431; O2-NEXT:  .Lpcsection284:9432; O2-NEXT:    xchgq %rax, (%rdi)9433; O2-NEXT:    movq $1, foo(%rip)9434; O2-NEXT:    retq9435;9436; O3-LABEL: atomic64_store_seq_cst:9437; O3:       # %bb.0: # %entry9438; O3-NEXT:    movq foo(%rip), %rax9439; O3-NEXT:    movl $42, %eax9440; O3-NEXT:  .Lpcsection284:9441; O3-NEXT:    xchgq %rax, (%rdi)9442; O3-NEXT:    movq $1, foo(%rip)9443; O3-NEXT:    retq9444;9445; HASWELL-O3-LABEL: atomic64_store_seq_cst:9446; HASWELL-O3:       # %bb.0: # %entry9447; HASWELL-O3-NEXT:    movq foo(%rip), %rax9448; HASWELL-O3-NEXT:    movl $42, %eax9449; HASWELL-O3-NEXT:  .Lpcsection284:9450; HASWELL-O3-NEXT:    xchgq %rax, (%rdi)9451; HASWELL-O3-NEXT:    movq $1, foo(%rip)9452; HASWELL-O3-NEXT:    retq9453entry:9454  load volatile i64, ptr @foo, align 89455  store atomic i64 42, ptr %a seq_cst, align 8, !pcsections !09456  store volatile i64 1, ptr @foo, align 89457  ret void9458}9459 9460define void @atomic64_store_seq_cst_ptr_ty(ptr %a, ptr %v) {9461; O0-LABEL: atomic64_store_seq_cst_ptr_ty:9462; O0:       # %bb.0: # %entry9463; O0-NEXT:    movq foo(%rip), %rax9464; O0-NEXT:  .Lpcsection315:9465; O0-NEXT:    xchgq %rsi, (%rdi)9466; O0-NEXT:    movq $1, foo9467; O0-NEXT:    retq9468;9469; O1-LABEL: atomic64_store_seq_cst_ptr_ty:9470; O1:       # %bb.0: # %entry9471; O1-NEXT:    movq foo(%rip), %rax9472; O1-NEXT:  .Lpcsection285:9473; O1-NEXT:    xchgq %rsi, (%rdi)9474; O1-NEXT:    movq $1, foo(%rip)9475; O1-NEXT:    retq9476;9477; O2-LABEL: atomic64_store_seq_cst_ptr_ty:9478; O2:       # %bb.0: # %entry9479; O2-NEXT:    movq foo(%rip), %rax9480; O2-NEXT:  .Lpcsection285:9481; O2-NEXT:    xchgq %rsi, (%rdi)9482; O2-NEXT:    movq $1, foo(%rip)9483; O2-NEXT:    retq9484;9485; O3-LABEL: atomic64_store_seq_cst_ptr_ty:9486; O3:       # %bb.0: # %entry9487; O3-NEXT:    movq foo(%rip), %rax9488; O3-NEXT:  .Lpcsection285:9489; O3-NEXT:    xchgq %rsi, (%rdi)9490; O3-NEXT:    movq $1, foo(%rip)9491; O3-NEXT:    retq9492;9493; HASWELL-O3-LABEL: atomic64_store_seq_cst_ptr_ty:9494; HASWELL-O3:       # %bb.0: # %entry9495; HASWELL-O3-NEXT:    movq foo(%rip), %rax9496; HASWELL-O3-NEXT:  .Lpcsection285:9497; HASWELL-O3-NEXT:    xchgq %rsi, (%rdi)9498; HASWELL-O3-NEXT:    movq $1, foo(%rip)9499; HASWELL-O3-NEXT:    retq9500entry:9501  load volatile i64, ptr @foo, align 89502  store atomic ptr %v, ptr %a seq_cst, align 8, !pcsections !09503  store volatile i64 1, ptr @foo, align 89504  ret void9505}9506 9507define void @atomic64_xchg_monotonic(ptr %a) {9508; O0-LABEL: atomic64_xchg_monotonic:9509; O0:       # %bb.0: # %entry9510; O0-NEXT:    movq foo(%rip), %rax9511; O0-NEXT:    movl $42, %eax9512; O0-NEXT:  .Lpcsection316:9513; O0-NEXT:    xchgq %rax, (%rdi)9514; O0-NEXT:    movq $1, foo9515; O0-NEXT:    retq9516;9517; O1-LABEL: atomic64_xchg_monotonic:9518; O1:       # %bb.0: # %entry9519; O1-NEXT:    movq foo(%rip), %rax9520; O1-NEXT:    movl $42, %eax9521; O1-NEXT:  .Lpcsection286:9522; O1-NEXT:    xchgq %rax, (%rdi)9523; O1-NEXT:    movq $1, foo(%rip)9524; O1-NEXT:    retq9525;9526; O2-LABEL: atomic64_xchg_monotonic:9527; O2:       # %bb.0: # %entry9528; O2-NEXT:    movq foo(%rip), %rax9529; O2-NEXT:    movl $42, %eax9530; O2-NEXT:  .Lpcsection286:9531; O2-NEXT:    xchgq %rax, (%rdi)9532; O2-NEXT:    movq $1, foo(%rip)9533; O2-NEXT:    retq9534;9535; O3-LABEL: atomic64_xchg_monotonic:9536; O3:       # %bb.0: # %entry9537; O3-NEXT:    movq foo(%rip), %rax9538; O3-NEXT:    movl $42, %eax9539; O3-NEXT:  .Lpcsection286:9540; O3-NEXT:    xchgq %rax, (%rdi)9541; O3-NEXT:    movq $1, foo(%rip)9542; O3-NEXT:    retq9543;9544; HASWELL-O3-LABEL: atomic64_xchg_monotonic:9545; HASWELL-O3:       # %bb.0: # %entry9546; HASWELL-O3-NEXT:    movq foo(%rip), %rax9547; HASWELL-O3-NEXT:    movl $42, %eax9548; HASWELL-O3-NEXT:  .Lpcsection286:9549; HASWELL-O3-NEXT:    xchgq %rax, (%rdi)9550; HASWELL-O3-NEXT:    movq $1, foo(%rip)9551; HASWELL-O3-NEXT:    retq9552entry:9553  load volatile i64, ptr @foo, align 89554  %x = atomicrmw xchg ptr %a, i64 42 monotonic, align 8, !pcsections !09555  store volatile i64 1, ptr @foo, align 89556  ret void9557}9558 9559define void @atomic64_add_monotonic(ptr %a) {9560; O0-LABEL: atomic64_add_monotonic:9561; O0:       # %bb.0: # %entry9562; O0-NEXT:    movq foo(%rip), %rax9563; O0-NEXT:  .Lpcsection317:9564; O0-NEXT:    lock addq $42, (%rdi)9565; O0-NEXT:    movq $1, foo9566; O0-NEXT:    retq9567;9568; O1-LABEL: atomic64_add_monotonic:9569; O1:       # %bb.0: # %entry9570; O1-NEXT:    movq foo(%rip), %rax9571; O1-NEXT:  .Lpcsection287:9572; O1-NEXT:    lock addq $42, (%rdi)9573; O1-NEXT:    movq $1, foo(%rip)9574; O1-NEXT:    retq9575;9576; O2-LABEL: atomic64_add_monotonic:9577; O2:       # %bb.0: # %entry9578; O2-NEXT:    movq foo(%rip), %rax9579; O2-NEXT:  .Lpcsection287:9580; O2-NEXT:    lock addq $42, (%rdi)9581; O2-NEXT:    movq $1, foo(%rip)9582; O2-NEXT:    retq9583;9584; O3-LABEL: atomic64_add_monotonic:9585; O3:       # %bb.0: # %entry9586; O3-NEXT:    movq foo(%rip), %rax9587; O3-NEXT:  .Lpcsection287:9588; O3-NEXT:    lock addq $42, (%rdi)9589; O3-NEXT:    movq $1, foo(%rip)9590; O3-NEXT:    retq9591;9592; HASWELL-O3-LABEL: atomic64_add_monotonic:9593; HASWELL-O3:       # %bb.0: # %entry9594; HASWELL-O3-NEXT:    movq foo(%rip), %rax9595; HASWELL-O3-NEXT:  .Lpcsection287:9596; HASWELL-O3-NEXT:    lock addq $42, (%rdi)9597; HASWELL-O3-NEXT:    movq $1, foo(%rip)9598; HASWELL-O3-NEXT:    retq9599entry:9600  load volatile i64, ptr @foo, align 89601  %x = atomicrmw add ptr %a, i64 42 monotonic, align 8, !pcsections !09602  store volatile i64 1, ptr @foo, align 89603  ret void9604}9605 9606define void @atomic64_sub_monotonic(ptr %a) {9607; O0-LABEL: atomic64_sub_monotonic:9608; O0:       # %bb.0: # %entry9609; O0-NEXT:    movq foo(%rip), %rax9610; O0-NEXT:  .Lpcsection318:9611; O0-NEXT:    lock subq $42, (%rdi)9612; O0-NEXT:    movq $1, foo9613; O0-NEXT:    retq9614;9615; O1-LABEL: atomic64_sub_monotonic:9616; O1:       # %bb.0: # %entry9617; O1-NEXT:    movq foo(%rip), %rax9618; O1-NEXT:  .Lpcsection288:9619; O1-NEXT:    lock subq $42, (%rdi)9620; O1-NEXT:    movq $1, foo(%rip)9621; O1-NEXT:    retq9622;9623; O2-LABEL: atomic64_sub_monotonic:9624; O2:       # %bb.0: # %entry9625; O2-NEXT:    movq foo(%rip), %rax9626; O2-NEXT:  .Lpcsection288:9627; O2-NEXT:    lock subq $42, (%rdi)9628; O2-NEXT:    movq $1, foo(%rip)9629; O2-NEXT:    retq9630;9631; O3-LABEL: atomic64_sub_monotonic:9632; O3:       # %bb.0: # %entry9633; O3-NEXT:    movq foo(%rip), %rax9634; O3-NEXT:  .Lpcsection288:9635; O3-NEXT:    lock subq $42, (%rdi)9636; O3-NEXT:    movq $1, foo(%rip)9637; O3-NEXT:    retq9638;9639; HASWELL-O3-LABEL: atomic64_sub_monotonic:9640; HASWELL-O3:       # %bb.0: # %entry9641; HASWELL-O3-NEXT:    movq foo(%rip), %rax9642; HASWELL-O3-NEXT:  .Lpcsection288:9643; HASWELL-O3-NEXT:    lock subq $42, (%rdi)9644; HASWELL-O3-NEXT:    movq $1, foo(%rip)9645; HASWELL-O3-NEXT:    retq9646entry:9647  load volatile i64, ptr @foo, align 89648  %x = atomicrmw sub ptr %a, i64 42 monotonic, align 8, !pcsections !09649  store volatile i64 1, ptr @foo, align 89650  ret void9651}9652 9653define void @atomic64_and_monotonic(ptr %a) {9654; O0-LABEL: atomic64_and_monotonic:9655; O0:       # %bb.0: # %entry9656; O0-NEXT:    movq foo(%rip), %rax9657; O0-NEXT:  .Lpcsection319:9658; O0-NEXT:    lock andq $42, (%rdi)9659; O0-NEXT:    movq $1, foo9660; O0-NEXT:    retq9661;9662; O1-LABEL: atomic64_and_monotonic:9663; O1:       # %bb.0: # %entry9664; O1-NEXT:    movq foo(%rip), %rax9665; O1-NEXT:  .Lpcsection289:9666; O1-NEXT:    lock andq $42, (%rdi)9667; O1-NEXT:    movq $1, foo(%rip)9668; O1-NEXT:    retq9669;9670; O2-LABEL: atomic64_and_monotonic:9671; O2:       # %bb.0: # %entry9672; O2-NEXT:    movq foo(%rip), %rax9673; O2-NEXT:  .Lpcsection289:9674; O2-NEXT:    lock andq $42, (%rdi)9675; O2-NEXT:    movq $1, foo(%rip)9676; O2-NEXT:    retq9677;9678; O3-LABEL: atomic64_and_monotonic:9679; O3:       # %bb.0: # %entry9680; O3-NEXT:    movq foo(%rip), %rax9681; O3-NEXT:  .Lpcsection289:9682; O3-NEXT:    lock andq $42, (%rdi)9683; O3-NEXT:    movq $1, foo(%rip)9684; O3-NEXT:    retq9685;9686; HASWELL-O3-LABEL: atomic64_and_monotonic:9687; HASWELL-O3:       # %bb.0: # %entry9688; HASWELL-O3-NEXT:    movq foo(%rip), %rax9689; HASWELL-O3-NEXT:  .Lpcsection289:9690; HASWELL-O3-NEXT:    lock andq $42, (%rdi)9691; HASWELL-O3-NEXT:    movq $1, foo(%rip)9692; HASWELL-O3-NEXT:    retq9693entry:9694  load volatile i64, ptr @foo, align 89695  %x = atomicrmw and ptr %a, i64 42 monotonic, align 8, !pcsections !09696  store volatile i64 1, ptr @foo, align 89697  ret void9698}9699 9700define void @atomic64_or_monotonic(ptr %a) {9701; O0-LABEL: atomic64_or_monotonic:9702; O0:       # %bb.0: # %entry9703; O0-NEXT:    movq foo(%rip), %rax9704; O0-NEXT:  .Lpcsection320:9705; O0-NEXT:    lock orq $42, (%rdi)9706; O0-NEXT:    movq $1, foo9707; O0-NEXT:    retq9708;9709; O1-LABEL: atomic64_or_monotonic:9710; O1:       # %bb.0: # %entry9711; O1-NEXT:    movq foo(%rip), %rax9712; O1-NEXT:  .Lpcsection290:9713; O1-NEXT:    lock orq $42, (%rdi)9714; O1-NEXT:    movq $1, foo(%rip)9715; O1-NEXT:    retq9716;9717; O2-LABEL: atomic64_or_monotonic:9718; O2:       # %bb.0: # %entry9719; O2-NEXT:    movq foo(%rip), %rax9720; O2-NEXT:  .Lpcsection290:9721; O2-NEXT:    lock orq $42, (%rdi)9722; O2-NEXT:    movq $1, foo(%rip)9723; O2-NEXT:    retq9724;9725; O3-LABEL: atomic64_or_monotonic:9726; O3:       # %bb.0: # %entry9727; O3-NEXT:    movq foo(%rip), %rax9728; O3-NEXT:  .Lpcsection290:9729; O3-NEXT:    lock orq $42, (%rdi)9730; O3-NEXT:    movq $1, foo(%rip)9731; O3-NEXT:    retq9732;9733; HASWELL-O3-LABEL: atomic64_or_monotonic:9734; HASWELL-O3:       # %bb.0: # %entry9735; HASWELL-O3-NEXT:    movq foo(%rip), %rax9736; HASWELL-O3-NEXT:  .Lpcsection290:9737; HASWELL-O3-NEXT:    lock orq $42, (%rdi)9738; HASWELL-O3-NEXT:    movq $1, foo(%rip)9739; HASWELL-O3-NEXT:    retq9740entry:9741  load volatile i64, ptr @foo, align 89742  %x = atomicrmw or ptr %a, i64 42 monotonic, align 8, !pcsections !09743  store volatile i64 1, ptr @foo, align 89744  ret void9745}9746 9747define void @atomic64_xor_monotonic(ptr %a) {9748; O0-LABEL: atomic64_xor_monotonic:9749; O0:       # %bb.0: # %entry9750; O0-NEXT:    movq foo(%rip), %rax9751; O0-NEXT:  .Lpcsection321:9752; O0-NEXT:    lock xorq $42, (%rdi)9753; O0-NEXT:    movq $1, foo9754; O0-NEXT:    retq9755;9756; O1-LABEL: atomic64_xor_monotonic:9757; O1:       # %bb.0: # %entry9758; O1-NEXT:    movq foo(%rip), %rax9759; O1-NEXT:  .Lpcsection291:9760; O1-NEXT:    lock xorq $42, (%rdi)9761; O1-NEXT:    movq $1, foo(%rip)9762; O1-NEXT:    retq9763;9764; O2-LABEL: atomic64_xor_monotonic:9765; O2:       # %bb.0: # %entry9766; O2-NEXT:    movq foo(%rip), %rax9767; O2-NEXT:  .Lpcsection291:9768; O2-NEXT:    lock xorq $42, (%rdi)9769; O2-NEXT:    movq $1, foo(%rip)9770; O2-NEXT:    retq9771;9772; O3-LABEL: atomic64_xor_monotonic:9773; O3:       # %bb.0: # %entry9774; O3-NEXT:    movq foo(%rip), %rax9775; O3-NEXT:  .Lpcsection291:9776; O3-NEXT:    lock xorq $42, (%rdi)9777; O3-NEXT:    movq $1, foo(%rip)9778; O3-NEXT:    retq9779;9780; HASWELL-O3-LABEL: atomic64_xor_monotonic:9781; HASWELL-O3:       # %bb.0: # %entry9782; HASWELL-O3-NEXT:    movq foo(%rip), %rax9783; HASWELL-O3-NEXT:  .Lpcsection291:9784; HASWELL-O3-NEXT:    lock xorq $42, (%rdi)9785; HASWELL-O3-NEXT:    movq $1, foo(%rip)9786; HASWELL-O3-NEXT:    retq9787entry:9788  load volatile i64, ptr @foo, align 89789  %x = atomicrmw xor ptr %a, i64 42 monotonic, align 8, !pcsections !09790  store volatile i64 1, ptr @foo, align 89791  ret void9792}9793 9794define void @atomic64_nand_monotonic(ptr %a) {9795; O0-LABEL: atomic64_nand_monotonic:9796; O0:       # %bb.0: # %entry9797; O0-NEXT:    movq %rdi, {{[-0-9]+}}(%r{{[sb]}}p) # 8-byte Spill9798; O0-NEXT:    movq foo, %rax9799; O0-NEXT:  .Lpcsection322:9800; O0-NEXT:    movq (%rdi), %rax9801; O0-NEXT:    movq %rax, {{[-0-9]+}}(%r{{[sb]}}p) # 8-byte Spill9802; O0-NEXT:  .LBB162_1: # %atomicrmw.start9803; O0-NEXT:    # =>This Inner Loop Header: Depth=19804; O0-NEXT:    movq {{[-0-9]+}}(%r{{[sb]}}p), %rax # 8-byte Reload9805; O0-NEXT:    movq {{[-0-9]+}}(%r{{[sb]}}p), %rcx # 8-byte Reload9806; O0-NEXT:    movl %eax, %esi9807; O0-NEXT:  .Lpcsection323:9808; O0-NEXT:    notl %esi9809; O0-NEXT:  .Lpcsection324:9810; O0-NEXT:    # implicit-def: $rdx9811; O0-NEXT:    movl %esi, %edx9812; O0-NEXT:  .Lpcsection325:9813; O0-NEXT:    orq $-43, %rdx9814; O0-NEXT:  .Lpcsection326:9815; O0-NEXT:    lock cmpxchgq %rdx, (%rcx)9816; O0-NEXT:  .Lpcsection327:9817; O0-NEXT:    sete %cl9818; O0-NEXT:  .Lpcsection328:9819; O0-NEXT:    testb $1, %cl9820; O0-NEXT:    movq %rax, {{[-0-9]+}}(%r{{[sb]}}p) # 8-byte Spill9821; O0-NEXT:  .Lpcsection329:9822; O0-NEXT:    jne .LBB162_29823; O0-NEXT:    jmp .LBB162_19824; O0-NEXT:  .LBB162_2: # %atomicrmw.end9825; O0-NEXT:    movq $1, foo9826; O0-NEXT:    retq9827;9828; O1-LABEL: atomic64_nand_monotonic:9829; O1:       # %bb.0: # %entry9830; O1-NEXT:    movq foo(%rip), %rax9831; O1-NEXT:  .Lpcsection292:9832; O1-NEXT:    movq (%rdi), %rax9833; O1-NEXT:    .p2align 49834; O1-NEXT:  .LBB162_1: # %atomicrmw.start9835; O1-NEXT:    # =>This Inner Loop Header: Depth=19836; O1-NEXT:    movl %eax, %ecx9837; O1-NEXT:  .Lpcsection293:9838; O1-NEXT:    notl %ecx9839; O1-NEXT:  .Lpcsection294:9840; O1-NEXT:    orq $-43, %rcx9841; O1-NEXT:  .Lpcsection295:9842; O1-NEXT:    lock cmpxchgq %rcx, (%rdi)9843; O1-NEXT:  .Lpcsection296:9844; O1-NEXT:    jne .LBB162_19845; O1-NEXT:  # %bb.2: # %atomicrmw.end9846; O1-NEXT:    movq $1, foo(%rip)9847; O1-NEXT:    retq9848;9849; O2-LABEL: atomic64_nand_monotonic:9850; O2:       # %bb.0: # %entry9851; O2-NEXT:    movq foo(%rip), %rax9852; O2-NEXT:  .Lpcsection292:9853; O2-NEXT:    movq (%rdi), %rax9854; O2-NEXT:    .p2align 49855; O2-NEXT:  .LBB162_1: # %atomicrmw.start9856; O2-NEXT:    # =>This Inner Loop Header: Depth=19857; O2-NEXT:    movl %eax, %ecx9858; O2-NEXT:  .Lpcsection293:9859; O2-NEXT:    notl %ecx9860; O2-NEXT:  .Lpcsection294:9861; O2-NEXT:    orq $-43, %rcx9862; O2-NEXT:  .Lpcsection295:9863; O2-NEXT:    lock cmpxchgq %rcx, (%rdi)9864; O2-NEXT:  .Lpcsection296:9865; O2-NEXT:    jne .LBB162_19866; O2-NEXT:  # %bb.2: # %atomicrmw.end9867; O2-NEXT:    movq $1, foo(%rip)9868; O2-NEXT:    retq9869;9870; O3-LABEL: atomic64_nand_monotonic:9871; O3:       # %bb.0: # %entry9872; O3-NEXT:    movq foo(%rip), %rax9873; O3-NEXT:  .Lpcsection292:9874; O3-NEXT:    movq (%rdi), %rax9875; O3-NEXT:    .p2align 49876; O3-NEXT:  .LBB162_1: # %atomicrmw.start9877; O3-NEXT:    # =>This Inner Loop Header: Depth=19878; O3-NEXT:    movl %eax, %ecx9879; O3-NEXT:  .Lpcsection293:9880; O3-NEXT:    notl %ecx9881; O3-NEXT:  .Lpcsection294:9882; O3-NEXT:    orq $-43, %rcx9883; O3-NEXT:  .Lpcsection295:9884; O3-NEXT:    lock cmpxchgq %rcx, (%rdi)9885; O3-NEXT:  .Lpcsection296:9886; O3-NEXT:    jne .LBB162_19887; O3-NEXT:  # %bb.2: # %atomicrmw.end9888; O3-NEXT:    movq $1, foo(%rip)9889; O3-NEXT:    retq9890;9891; HASWELL-O3-LABEL: atomic64_nand_monotonic:9892; HASWELL-O3:       # %bb.0: # %entry9893; HASWELL-O3-NEXT:    movq foo(%rip), %rax9894; HASWELL-O3-NEXT:  .Lpcsection292:9895; HASWELL-O3-NEXT:    movq (%rdi), %rax9896; HASWELL-O3-NEXT:    .p2align 49897; HASWELL-O3-NEXT:  .LBB162_1: # %atomicrmw.start9898; HASWELL-O3-NEXT:    # =>This Inner Loop Header: Depth=19899; HASWELL-O3-NEXT:    movl %eax, %ecx9900; HASWELL-O3-NEXT:  .Lpcsection293:9901; HASWELL-O3-NEXT:    notl %ecx9902; HASWELL-O3-NEXT:  .Lpcsection294:9903; HASWELL-O3-NEXT:    orq $-43, %rcx9904; HASWELL-O3-NEXT:  .Lpcsection295:9905; HASWELL-O3-NEXT:    lock cmpxchgq %rcx, (%rdi)9906; HASWELL-O3-NEXT:  .Lpcsection296:9907; HASWELL-O3-NEXT:    jne .LBB162_19908; HASWELL-O3-NEXT:  # %bb.2: # %atomicrmw.end9909; HASWELL-O3-NEXT:    movq $1, foo(%rip)9910; HASWELL-O3-NEXT:    retq9911entry:9912  load volatile i64, ptr @foo, align 89913  %x = atomicrmw nand ptr %a, i64 42 monotonic, align 8, !pcsections !09914  store volatile i64 1, ptr @foo, align 89915  ret void9916}9917 9918define void @atomic64_xchg_acquire(ptr %a) {9919; O0-LABEL: atomic64_xchg_acquire:9920; O0:       # %bb.0: # %entry9921; O0-NEXT:    movq foo(%rip), %rax9922; O0-NEXT:    movl $42, %eax9923; O0-NEXT:  .Lpcsection330:9924; O0-NEXT:    xchgq %rax, (%rdi)9925; O0-NEXT:    movq $1, foo9926; O0-NEXT:    retq9927;9928; O1-LABEL: atomic64_xchg_acquire:9929; O1:       # %bb.0: # %entry9930; O1-NEXT:    movq foo(%rip), %rax9931; O1-NEXT:    movl $42, %eax9932; O1-NEXT:  .Lpcsection297:9933; O1-NEXT:    xchgq %rax, (%rdi)9934; O1-NEXT:    movq $1, foo(%rip)9935; O1-NEXT:    retq9936;9937; O2-LABEL: atomic64_xchg_acquire:9938; O2:       # %bb.0: # %entry9939; O2-NEXT:    movq foo(%rip), %rax9940; O2-NEXT:    movl $42, %eax9941; O2-NEXT:  .Lpcsection297:9942; O2-NEXT:    xchgq %rax, (%rdi)9943; O2-NEXT:    movq $1, foo(%rip)9944; O2-NEXT:    retq9945;9946; O3-LABEL: atomic64_xchg_acquire:9947; O3:       # %bb.0: # %entry9948; O3-NEXT:    movq foo(%rip), %rax9949; O3-NEXT:    movl $42, %eax9950; O3-NEXT:  .Lpcsection297:9951; O3-NEXT:    xchgq %rax, (%rdi)9952; O3-NEXT:    movq $1, foo(%rip)9953; O3-NEXT:    retq9954;9955; HASWELL-O3-LABEL: atomic64_xchg_acquire:9956; HASWELL-O3:       # %bb.0: # %entry9957; HASWELL-O3-NEXT:    movq foo(%rip), %rax9958; HASWELL-O3-NEXT:    movl $42, %eax9959; HASWELL-O3-NEXT:  .Lpcsection297:9960; HASWELL-O3-NEXT:    xchgq %rax, (%rdi)9961; HASWELL-O3-NEXT:    movq $1, foo(%rip)9962; HASWELL-O3-NEXT:    retq9963entry:9964  load volatile i64, ptr @foo, align 89965  %x = atomicrmw xchg ptr %a, i64 42 acquire, align 8, !pcsections !09966  store volatile i64 1, ptr @foo, align 89967  ret void9968}9969 9970define void @atomic64_add_acquire(ptr %a) {9971; O0-LABEL: atomic64_add_acquire:9972; O0:       # %bb.0: # %entry9973; O0-NEXT:    movq foo(%rip), %rax9974; O0-NEXT:  .Lpcsection331:9975; O0-NEXT:    lock addq $42, (%rdi)9976; O0-NEXT:    movq $1, foo9977; O0-NEXT:    retq9978;9979; O1-LABEL: atomic64_add_acquire:9980; O1:       # %bb.0: # %entry9981; O1-NEXT:    movq foo(%rip), %rax9982; O1-NEXT:  .Lpcsection298:9983; O1-NEXT:    lock addq $42, (%rdi)9984; O1-NEXT:    movq $1, foo(%rip)9985; O1-NEXT:    retq9986;9987; O2-LABEL: atomic64_add_acquire:9988; O2:       # %bb.0: # %entry9989; O2-NEXT:    movq foo(%rip), %rax9990; O2-NEXT:  .Lpcsection298:9991; O2-NEXT:    lock addq $42, (%rdi)9992; O2-NEXT:    movq $1, foo(%rip)9993; O2-NEXT:    retq9994;9995; O3-LABEL: atomic64_add_acquire:9996; O3:       # %bb.0: # %entry9997; O3-NEXT:    movq foo(%rip), %rax9998; O3-NEXT:  .Lpcsection298:9999; O3-NEXT:    lock addq $42, (%rdi)10000; O3-NEXT:    movq $1, foo(%rip)10001; O3-NEXT:    retq10002;10003; HASWELL-O3-LABEL: atomic64_add_acquire:10004; HASWELL-O3:       # %bb.0: # %entry10005; HASWELL-O3-NEXT:    movq foo(%rip), %rax10006; HASWELL-O3-NEXT:  .Lpcsection298:10007; HASWELL-O3-NEXT:    lock addq $42, (%rdi)10008; HASWELL-O3-NEXT:    movq $1, foo(%rip)10009; HASWELL-O3-NEXT:    retq10010entry:10011  load volatile i64, ptr @foo, align 810012  %x = atomicrmw add ptr %a, i64 42 acquire, align 8, !pcsections !010013  store volatile i64 1, ptr @foo, align 810014  ret void10015}10016 10017define void @atomic64_sub_acquire(ptr %a) {10018; O0-LABEL: atomic64_sub_acquire:10019; O0:       # %bb.0: # %entry10020; O0-NEXT:    movq foo(%rip), %rax10021; O0-NEXT:  .Lpcsection332:10022; O0-NEXT:    lock subq $42, (%rdi)10023; O0-NEXT:    movq $1, foo10024; O0-NEXT:    retq10025;10026; O1-LABEL: atomic64_sub_acquire:10027; O1:       # %bb.0: # %entry10028; O1-NEXT:    movq foo(%rip), %rax10029; O1-NEXT:  .Lpcsection299:10030; O1-NEXT:    lock subq $42, (%rdi)10031; O1-NEXT:    movq $1, foo(%rip)10032; O1-NEXT:    retq10033;10034; O2-LABEL: atomic64_sub_acquire:10035; O2:       # %bb.0: # %entry10036; O2-NEXT:    movq foo(%rip), %rax10037; O2-NEXT:  .Lpcsection299:10038; O2-NEXT:    lock subq $42, (%rdi)10039; O2-NEXT:    movq $1, foo(%rip)10040; O2-NEXT:    retq10041;10042; O3-LABEL: atomic64_sub_acquire:10043; O3:       # %bb.0: # %entry10044; O3-NEXT:    movq foo(%rip), %rax10045; O3-NEXT:  .Lpcsection299:10046; O3-NEXT:    lock subq $42, (%rdi)10047; O3-NEXT:    movq $1, foo(%rip)10048; O3-NEXT:    retq10049;10050; HASWELL-O3-LABEL: atomic64_sub_acquire:10051; HASWELL-O3:       # %bb.0: # %entry10052; HASWELL-O3-NEXT:    movq foo(%rip), %rax10053; HASWELL-O3-NEXT:  .Lpcsection299:10054; HASWELL-O3-NEXT:    lock subq $42, (%rdi)10055; HASWELL-O3-NEXT:    movq $1, foo(%rip)10056; HASWELL-O3-NEXT:    retq10057entry:10058  load volatile i64, ptr @foo, align 810059  %x = atomicrmw sub ptr %a, i64 42 acquire, align 8, !pcsections !010060  store volatile i64 1, ptr @foo, align 810061  ret void10062}10063 10064define void @atomic64_and_acquire(ptr %a) {10065; O0-LABEL: atomic64_and_acquire:10066; O0:       # %bb.0: # %entry10067; O0-NEXT:    movq foo(%rip), %rax10068; O0-NEXT:  .Lpcsection333:10069; O0-NEXT:    lock andq $42, (%rdi)10070; O0-NEXT:    movq $1, foo10071; O0-NEXT:    retq10072;10073; O1-LABEL: atomic64_and_acquire:10074; O1:       # %bb.0: # %entry10075; O1-NEXT:    movq foo(%rip), %rax10076; O1-NEXT:  .Lpcsection300:10077; O1-NEXT:    lock andq $42, (%rdi)10078; O1-NEXT:    movq $1, foo(%rip)10079; O1-NEXT:    retq10080;10081; O2-LABEL: atomic64_and_acquire:10082; O2:       # %bb.0: # %entry10083; O2-NEXT:    movq foo(%rip), %rax10084; O2-NEXT:  .Lpcsection300:10085; O2-NEXT:    lock andq $42, (%rdi)10086; O2-NEXT:    movq $1, foo(%rip)10087; O2-NEXT:    retq10088;10089; O3-LABEL: atomic64_and_acquire:10090; O3:       # %bb.0: # %entry10091; O3-NEXT:    movq foo(%rip), %rax10092; O3-NEXT:  .Lpcsection300:10093; O3-NEXT:    lock andq $42, (%rdi)10094; O3-NEXT:    movq $1, foo(%rip)10095; O3-NEXT:    retq10096;10097; HASWELL-O3-LABEL: atomic64_and_acquire:10098; HASWELL-O3:       # %bb.0: # %entry10099; HASWELL-O3-NEXT:    movq foo(%rip), %rax10100; HASWELL-O3-NEXT:  .Lpcsection300:10101; HASWELL-O3-NEXT:    lock andq $42, (%rdi)10102; HASWELL-O3-NEXT:    movq $1, foo(%rip)10103; HASWELL-O3-NEXT:    retq10104entry:10105  load volatile i64, ptr @foo, align 810106  %x = atomicrmw and ptr %a, i64 42 acquire, align 8, !pcsections !010107  store volatile i64 1, ptr @foo, align 810108  ret void10109}10110 10111define void @atomic64_or_acquire(ptr %a) {10112; O0-LABEL: atomic64_or_acquire:10113; O0:       # %bb.0: # %entry10114; O0-NEXT:    movq foo(%rip), %rax10115; O0-NEXT:  .Lpcsection334:10116; O0-NEXT:    lock orq $42, (%rdi)10117; O0-NEXT:    movq $1, foo10118; O0-NEXT:    retq10119;10120; O1-LABEL: atomic64_or_acquire:10121; O1:       # %bb.0: # %entry10122; O1-NEXT:    movq foo(%rip), %rax10123; O1-NEXT:  .Lpcsection301:10124; O1-NEXT:    lock orq $42, (%rdi)10125; O1-NEXT:    movq $1, foo(%rip)10126; O1-NEXT:    retq10127;10128; O2-LABEL: atomic64_or_acquire:10129; O2:       # %bb.0: # %entry10130; O2-NEXT:    movq foo(%rip), %rax10131; O2-NEXT:  .Lpcsection301:10132; O2-NEXT:    lock orq $42, (%rdi)10133; O2-NEXT:    movq $1, foo(%rip)10134; O2-NEXT:    retq10135;10136; O3-LABEL: atomic64_or_acquire:10137; O3:       # %bb.0: # %entry10138; O3-NEXT:    movq foo(%rip), %rax10139; O3-NEXT:  .Lpcsection301:10140; O3-NEXT:    lock orq $42, (%rdi)10141; O3-NEXT:    movq $1, foo(%rip)10142; O3-NEXT:    retq10143;10144; HASWELL-O3-LABEL: atomic64_or_acquire:10145; HASWELL-O3:       # %bb.0: # %entry10146; HASWELL-O3-NEXT:    movq foo(%rip), %rax10147; HASWELL-O3-NEXT:  .Lpcsection301:10148; HASWELL-O3-NEXT:    lock orq $42, (%rdi)10149; HASWELL-O3-NEXT:    movq $1, foo(%rip)10150; HASWELL-O3-NEXT:    retq10151entry:10152  load volatile i64, ptr @foo, align 810153  %x = atomicrmw or ptr %a, i64 42 acquire, align 8, !pcsections !010154  store volatile i64 1, ptr @foo, align 810155  ret void10156}10157 10158define void @atomic64_xor_acquire(ptr %a) {10159; O0-LABEL: atomic64_xor_acquire:10160; O0:       # %bb.0: # %entry10161; O0-NEXT:    movq foo(%rip), %rax10162; O0-NEXT:  .Lpcsection335:10163; O0-NEXT:    lock xorq $42, (%rdi)10164; O0-NEXT:    movq $1, foo10165; O0-NEXT:    retq10166;10167; O1-LABEL: atomic64_xor_acquire:10168; O1:       # %bb.0: # %entry10169; O1-NEXT:    movq foo(%rip), %rax10170; O1-NEXT:  .Lpcsection302:10171; O1-NEXT:    lock xorq $42, (%rdi)10172; O1-NEXT:    movq $1, foo(%rip)10173; O1-NEXT:    retq10174;10175; O2-LABEL: atomic64_xor_acquire:10176; O2:       # %bb.0: # %entry10177; O2-NEXT:    movq foo(%rip), %rax10178; O2-NEXT:  .Lpcsection302:10179; O2-NEXT:    lock xorq $42, (%rdi)10180; O2-NEXT:    movq $1, foo(%rip)10181; O2-NEXT:    retq10182;10183; O3-LABEL: atomic64_xor_acquire:10184; O3:       # %bb.0: # %entry10185; O3-NEXT:    movq foo(%rip), %rax10186; O3-NEXT:  .Lpcsection302:10187; O3-NEXT:    lock xorq $42, (%rdi)10188; O3-NEXT:    movq $1, foo(%rip)10189; O3-NEXT:    retq10190;10191; HASWELL-O3-LABEL: atomic64_xor_acquire:10192; HASWELL-O3:       # %bb.0: # %entry10193; HASWELL-O3-NEXT:    movq foo(%rip), %rax10194; HASWELL-O3-NEXT:  .Lpcsection302:10195; HASWELL-O3-NEXT:    lock xorq $42, (%rdi)10196; HASWELL-O3-NEXT:    movq $1, foo(%rip)10197; HASWELL-O3-NEXT:    retq10198entry:10199  load volatile i64, ptr @foo, align 810200  %x = atomicrmw xor ptr %a, i64 42 acquire, align 8, !pcsections !010201  store volatile i64 1, ptr @foo, align 810202  ret void10203}10204 10205define void @atomic64_nand_acquire(ptr %a) {10206; O0-LABEL: atomic64_nand_acquire:10207; O0:       # %bb.0: # %entry10208; O0-NEXT:    movq %rdi, {{[-0-9]+}}(%r{{[sb]}}p) # 8-byte Spill10209; O0-NEXT:    movq foo, %rax10210; O0-NEXT:  .Lpcsection336:10211; O0-NEXT:    movq (%rdi), %rax10212; O0-NEXT:    movq %rax, {{[-0-9]+}}(%r{{[sb]}}p) # 8-byte Spill10213; O0-NEXT:  .LBB169_1: # %atomicrmw.start10214; O0-NEXT:    # =>This Inner Loop Header: Depth=110215; O0-NEXT:    movq {{[-0-9]+}}(%r{{[sb]}}p), %rax # 8-byte Reload10216; O0-NEXT:    movq {{[-0-9]+}}(%r{{[sb]}}p), %rcx # 8-byte Reload10217; O0-NEXT:    movl %eax, %esi10218; O0-NEXT:  .Lpcsection337:10219; O0-NEXT:    notl %esi10220; O0-NEXT:  .Lpcsection338:10221; O0-NEXT:    # implicit-def: $rdx10222; O0-NEXT:    movl %esi, %edx10223; O0-NEXT:  .Lpcsection339:10224; O0-NEXT:    orq $-43, %rdx10225; O0-NEXT:  .Lpcsection340:10226; O0-NEXT:    lock cmpxchgq %rdx, (%rcx)10227; O0-NEXT:  .Lpcsection341:10228; O0-NEXT:    sete %cl10229; O0-NEXT:  .Lpcsection342:10230; O0-NEXT:    testb $1, %cl10231; O0-NEXT:    movq %rax, {{[-0-9]+}}(%r{{[sb]}}p) # 8-byte Spill10232; O0-NEXT:  .Lpcsection343:10233; O0-NEXT:    jne .LBB169_210234; O0-NEXT:    jmp .LBB169_110235; O0-NEXT:  .LBB169_2: # %atomicrmw.end10236; O0-NEXT:    movq $1, foo10237; O0-NEXT:    retq10238;10239; O1-LABEL: atomic64_nand_acquire:10240; O1:       # %bb.0: # %entry10241; O1-NEXT:    movq foo(%rip), %rax10242; O1-NEXT:  .Lpcsection303:10243; O1-NEXT:    movq (%rdi), %rax10244; O1-NEXT:    .p2align 410245; O1-NEXT:  .LBB169_1: # %atomicrmw.start10246; O1-NEXT:    # =>This Inner Loop Header: Depth=110247; O1-NEXT:    movl %eax, %ecx10248; O1-NEXT:  .Lpcsection304:10249; O1-NEXT:    notl %ecx10250; O1-NEXT:  .Lpcsection305:10251; O1-NEXT:    orq $-43, %rcx10252; O1-NEXT:  .Lpcsection306:10253; O1-NEXT:    lock cmpxchgq %rcx, (%rdi)10254; O1-NEXT:  .Lpcsection307:10255; O1-NEXT:    jne .LBB169_110256; O1-NEXT:  # %bb.2: # %atomicrmw.end10257; O1-NEXT:    movq $1, foo(%rip)10258; O1-NEXT:    retq10259;10260; O2-LABEL: atomic64_nand_acquire:10261; O2:       # %bb.0: # %entry10262; O2-NEXT:    movq foo(%rip), %rax10263; O2-NEXT:  .Lpcsection303:10264; O2-NEXT:    movq (%rdi), %rax10265; O2-NEXT:    .p2align 410266; O2-NEXT:  .LBB169_1: # %atomicrmw.start10267; O2-NEXT:    # =>This Inner Loop Header: Depth=110268; O2-NEXT:    movl %eax, %ecx10269; O2-NEXT:  .Lpcsection304:10270; O2-NEXT:    notl %ecx10271; O2-NEXT:  .Lpcsection305:10272; O2-NEXT:    orq $-43, %rcx10273; O2-NEXT:  .Lpcsection306:10274; O2-NEXT:    lock cmpxchgq %rcx, (%rdi)10275; O2-NEXT:  .Lpcsection307:10276; O2-NEXT:    jne .LBB169_110277; O2-NEXT:  # %bb.2: # %atomicrmw.end10278; O2-NEXT:    movq $1, foo(%rip)10279; O2-NEXT:    retq10280;10281; O3-LABEL: atomic64_nand_acquire:10282; O3:       # %bb.0: # %entry10283; O3-NEXT:    movq foo(%rip), %rax10284; O3-NEXT:  .Lpcsection303:10285; O3-NEXT:    movq (%rdi), %rax10286; O3-NEXT:    .p2align 410287; O3-NEXT:  .LBB169_1: # %atomicrmw.start10288; O3-NEXT:    # =>This Inner Loop Header: Depth=110289; O3-NEXT:    movl %eax, %ecx10290; O3-NEXT:  .Lpcsection304:10291; O3-NEXT:    notl %ecx10292; O3-NEXT:  .Lpcsection305:10293; O3-NEXT:    orq $-43, %rcx10294; O3-NEXT:  .Lpcsection306:10295; O3-NEXT:    lock cmpxchgq %rcx, (%rdi)10296; O3-NEXT:  .Lpcsection307:10297; O3-NEXT:    jne .LBB169_110298; O3-NEXT:  # %bb.2: # %atomicrmw.end10299; O3-NEXT:    movq $1, foo(%rip)10300; O3-NEXT:    retq10301;10302; HASWELL-O3-LABEL: atomic64_nand_acquire:10303; HASWELL-O3:       # %bb.0: # %entry10304; HASWELL-O3-NEXT:    movq foo(%rip), %rax10305; HASWELL-O3-NEXT:  .Lpcsection303:10306; HASWELL-O3-NEXT:    movq (%rdi), %rax10307; HASWELL-O3-NEXT:    .p2align 410308; HASWELL-O3-NEXT:  .LBB169_1: # %atomicrmw.start10309; HASWELL-O3-NEXT:    # =>This Inner Loop Header: Depth=110310; HASWELL-O3-NEXT:    movl %eax, %ecx10311; HASWELL-O3-NEXT:  .Lpcsection304:10312; HASWELL-O3-NEXT:    notl %ecx10313; HASWELL-O3-NEXT:  .Lpcsection305:10314; HASWELL-O3-NEXT:    orq $-43, %rcx10315; HASWELL-O3-NEXT:  .Lpcsection306:10316; HASWELL-O3-NEXT:    lock cmpxchgq %rcx, (%rdi)10317; HASWELL-O3-NEXT:  .Lpcsection307:10318; HASWELL-O3-NEXT:    jne .LBB169_110319; HASWELL-O3-NEXT:  # %bb.2: # %atomicrmw.end10320; HASWELL-O3-NEXT:    movq $1, foo(%rip)10321; HASWELL-O3-NEXT:    retq10322entry:10323  load volatile i64, ptr @foo, align 810324  %x = atomicrmw nand ptr %a, i64 42 acquire, align 8, !pcsections !010325  store volatile i64 1, ptr @foo, align 810326  ret void10327}10328 10329define void @atomic64_xchg_release(ptr %a) {10330; O0-LABEL: atomic64_xchg_release:10331; O0:       # %bb.0: # %entry10332; O0-NEXT:    movq foo(%rip), %rax10333; O0-NEXT:    movl $42, %eax10334; O0-NEXT:  .Lpcsection344:10335; O0-NEXT:    xchgq %rax, (%rdi)10336; O0-NEXT:    movq $1, foo10337; O0-NEXT:    retq10338;10339; O1-LABEL: atomic64_xchg_release:10340; O1:       # %bb.0: # %entry10341; O1-NEXT:    movq foo(%rip), %rax10342; O1-NEXT:    movl $42, %eax10343; O1-NEXT:  .Lpcsection308:10344; O1-NEXT:    xchgq %rax, (%rdi)10345; O1-NEXT:    movq $1, foo(%rip)10346; O1-NEXT:    retq10347;10348; O2-LABEL: atomic64_xchg_release:10349; O2:       # %bb.0: # %entry10350; O2-NEXT:    movq foo(%rip), %rax10351; O2-NEXT:    movl $42, %eax10352; O2-NEXT:  .Lpcsection308:10353; O2-NEXT:    xchgq %rax, (%rdi)10354; O2-NEXT:    movq $1, foo(%rip)10355; O2-NEXT:    retq10356;10357; O3-LABEL: atomic64_xchg_release:10358; O3:       # %bb.0: # %entry10359; O3-NEXT:    movq foo(%rip), %rax10360; O3-NEXT:    movl $42, %eax10361; O3-NEXT:  .Lpcsection308:10362; O3-NEXT:    xchgq %rax, (%rdi)10363; O3-NEXT:    movq $1, foo(%rip)10364; O3-NEXT:    retq10365;10366; HASWELL-O3-LABEL: atomic64_xchg_release:10367; HASWELL-O3:       # %bb.0: # %entry10368; HASWELL-O3-NEXT:    movq foo(%rip), %rax10369; HASWELL-O3-NEXT:    movl $42, %eax10370; HASWELL-O3-NEXT:  .Lpcsection308:10371; HASWELL-O3-NEXT:    xchgq %rax, (%rdi)10372; HASWELL-O3-NEXT:    movq $1, foo(%rip)10373; HASWELL-O3-NEXT:    retq10374entry:10375  load volatile i64, ptr @foo, align 810376  %x = atomicrmw xchg ptr %a, i64 42 release, align 8, !pcsections !010377  store volatile i64 1, ptr @foo, align 810378  ret void10379}10380 10381define void @atomic64_add_release(ptr %a) {10382; O0-LABEL: atomic64_add_release:10383; O0:       # %bb.0: # %entry10384; O0-NEXT:    movq foo(%rip), %rax10385; O0-NEXT:  .Lpcsection345:10386; O0-NEXT:    lock addq $42, (%rdi)10387; O0-NEXT:    movq $1, foo10388; O0-NEXT:    retq10389;10390; O1-LABEL: atomic64_add_release:10391; O1:       # %bb.0: # %entry10392; O1-NEXT:    movq foo(%rip), %rax10393; O1-NEXT:  .Lpcsection309:10394; O1-NEXT:    lock addq $42, (%rdi)10395; O1-NEXT:    movq $1, foo(%rip)10396; O1-NEXT:    retq10397;10398; O2-LABEL: atomic64_add_release:10399; O2:       # %bb.0: # %entry10400; O2-NEXT:    movq foo(%rip), %rax10401; O2-NEXT:  .Lpcsection309:10402; O2-NEXT:    lock addq $42, (%rdi)10403; O2-NEXT:    movq $1, foo(%rip)10404; O2-NEXT:    retq10405;10406; O3-LABEL: atomic64_add_release:10407; O3:       # %bb.0: # %entry10408; O3-NEXT:    movq foo(%rip), %rax10409; O3-NEXT:  .Lpcsection309:10410; O3-NEXT:    lock addq $42, (%rdi)10411; O3-NEXT:    movq $1, foo(%rip)10412; O3-NEXT:    retq10413;10414; HASWELL-O3-LABEL: atomic64_add_release:10415; HASWELL-O3:       # %bb.0: # %entry10416; HASWELL-O3-NEXT:    movq foo(%rip), %rax10417; HASWELL-O3-NEXT:  .Lpcsection309:10418; HASWELL-O3-NEXT:    lock addq $42, (%rdi)10419; HASWELL-O3-NEXT:    movq $1, foo(%rip)10420; HASWELL-O3-NEXT:    retq10421entry:10422  load volatile i64, ptr @foo, align 810423  %x = atomicrmw add ptr %a, i64 42 release, align 8, !pcsections !010424  store volatile i64 1, ptr @foo, align 810425  ret void10426}10427 10428define void @atomic64_sub_release(ptr %a) {10429; O0-LABEL: atomic64_sub_release:10430; O0:       # %bb.0: # %entry10431; O0-NEXT:    movq foo(%rip), %rax10432; O0-NEXT:  .Lpcsection346:10433; O0-NEXT:    lock subq $42, (%rdi)10434; O0-NEXT:    movq $1, foo10435; O0-NEXT:    retq10436;10437; O1-LABEL: atomic64_sub_release:10438; O1:       # %bb.0: # %entry10439; O1-NEXT:    movq foo(%rip), %rax10440; O1-NEXT:  .Lpcsection310:10441; O1-NEXT:    lock subq $42, (%rdi)10442; O1-NEXT:    movq $1, foo(%rip)10443; O1-NEXT:    retq10444;10445; O2-LABEL: atomic64_sub_release:10446; O2:       # %bb.0: # %entry10447; O2-NEXT:    movq foo(%rip), %rax10448; O2-NEXT:  .Lpcsection310:10449; O2-NEXT:    lock subq $42, (%rdi)10450; O2-NEXT:    movq $1, foo(%rip)10451; O2-NEXT:    retq10452;10453; O3-LABEL: atomic64_sub_release:10454; O3:       # %bb.0: # %entry10455; O3-NEXT:    movq foo(%rip), %rax10456; O3-NEXT:  .Lpcsection310:10457; O3-NEXT:    lock subq $42, (%rdi)10458; O3-NEXT:    movq $1, foo(%rip)10459; O3-NEXT:    retq10460;10461; HASWELL-O3-LABEL: atomic64_sub_release:10462; HASWELL-O3:       # %bb.0: # %entry10463; HASWELL-O3-NEXT:    movq foo(%rip), %rax10464; HASWELL-O3-NEXT:  .Lpcsection310:10465; HASWELL-O3-NEXT:    lock subq $42, (%rdi)10466; HASWELL-O3-NEXT:    movq $1, foo(%rip)10467; HASWELL-O3-NEXT:    retq10468entry:10469  load volatile i64, ptr @foo, align 810470  %x = atomicrmw sub ptr %a, i64 42 release, align 8, !pcsections !010471  store volatile i64 1, ptr @foo, align 810472  ret void10473}10474 10475define void @atomic64_and_release(ptr %a) {10476; O0-LABEL: atomic64_and_release:10477; O0:       # %bb.0: # %entry10478; O0-NEXT:    movq foo(%rip), %rax10479; O0-NEXT:  .Lpcsection347:10480; O0-NEXT:    lock andq $42, (%rdi)10481; O0-NEXT:    movq $1, foo10482; O0-NEXT:    retq10483;10484; O1-LABEL: atomic64_and_release:10485; O1:       # %bb.0: # %entry10486; O1-NEXT:    movq foo(%rip), %rax10487; O1-NEXT:  .Lpcsection311:10488; O1-NEXT:    lock andq $42, (%rdi)10489; O1-NEXT:    movq $1, foo(%rip)10490; O1-NEXT:    retq10491;10492; O2-LABEL: atomic64_and_release:10493; O2:       # %bb.0: # %entry10494; O2-NEXT:    movq foo(%rip), %rax10495; O2-NEXT:  .Lpcsection311:10496; O2-NEXT:    lock andq $42, (%rdi)10497; O2-NEXT:    movq $1, foo(%rip)10498; O2-NEXT:    retq10499;10500; O3-LABEL: atomic64_and_release:10501; O3:       # %bb.0: # %entry10502; O3-NEXT:    movq foo(%rip), %rax10503; O3-NEXT:  .Lpcsection311:10504; O3-NEXT:    lock andq $42, (%rdi)10505; O3-NEXT:    movq $1, foo(%rip)10506; O3-NEXT:    retq10507;10508; HASWELL-O3-LABEL: atomic64_and_release:10509; HASWELL-O3:       # %bb.0: # %entry10510; HASWELL-O3-NEXT:    movq foo(%rip), %rax10511; HASWELL-O3-NEXT:  .Lpcsection311:10512; HASWELL-O3-NEXT:    lock andq $42, (%rdi)10513; HASWELL-O3-NEXT:    movq $1, foo(%rip)10514; HASWELL-O3-NEXT:    retq10515entry:10516  load volatile i64, ptr @foo, align 810517  %x = atomicrmw and ptr %a, i64 42 release, align 8, !pcsections !010518  store volatile i64 1, ptr @foo, align 810519  ret void10520}10521 10522define void @atomic64_or_release(ptr %a) {10523; O0-LABEL: atomic64_or_release:10524; O0:       # %bb.0: # %entry10525; O0-NEXT:    movq foo(%rip), %rax10526; O0-NEXT:  .Lpcsection348:10527; O0-NEXT:    lock orq $42, (%rdi)10528; O0-NEXT:    movq $1, foo10529; O0-NEXT:    retq10530;10531; O1-LABEL: atomic64_or_release:10532; O1:       # %bb.0: # %entry10533; O1-NEXT:    movq foo(%rip), %rax10534; O1-NEXT:  .Lpcsection312:10535; O1-NEXT:    lock orq $42, (%rdi)10536; O1-NEXT:    movq $1, foo(%rip)10537; O1-NEXT:    retq10538;10539; O2-LABEL: atomic64_or_release:10540; O2:       # %bb.0: # %entry10541; O2-NEXT:    movq foo(%rip), %rax10542; O2-NEXT:  .Lpcsection312:10543; O2-NEXT:    lock orq $42, (%rdi)10544; O2-NEXT:    movq $1, foo(%rip)10545; O2-NEXT:    retq10546;10547; O3-LABEL: atomic64_or_release:10548; O3:       # %bb.0: # %entry10549; O3-NEXT:    movq foo(%rip), %rax10550; O3-NEXT:  .Lpcsection312:10551; O3-NEXT:    lock orq $42, (%rdi)10552; O3-NEXT:    movq $1, foo(%rip)10553; O3-NEXT:    retq10554;10555; HASWELL-O3-LABEL: atomic64_or_release:10556; HASWELL-O3:       # %bb.0: # %entry10557; HASWELL-O3-NEXT:    movq foo(%rip), %rax10558; HASWELL-O3-NEXT:  .Lpcsection312:10559; HASWELL-O3-NEXT:    lock orq $42, (%rdi)10560; HASWELL-O3-NEXT:    movq $1, foo(%rip)10561; HASWELL-O3-NEXT:    retq10562entry:10563  load volatile i64, ptr @foo, align 810564  %x = atomicrmw or ptr %a, i64 42 release, align 8, !pcsections !010565  store volatile i64 1, ptr @foo, align 810566  ret void10567}10568 10569define void @atomic64_xor_release(ptr %a) {10570; O0-LABEL: atomic64_xor_release:10571; O0:       # %bb.0: # %entry10572; O0-NEXT:    movq foo(%rip), %rax10573; O0-NEXT:  .Lpcsection349:10574; O0-NEXT:    lock xorq $42, (%rdi)10575; O0-NEXT:    movq $1, foo10576; O0-NEXT:    retq10577;10578; O1-LABEL: atomic64_xor_release:10579; O1:       # %bb.0: # %entry10580; O1-NEXT:    movq foo(%rip), %rax10581; O1-NEXT:  .Lpcsection313:10582; O1-NEXT:    lock xorq $42, (%rdi)10583; O1-NEXT:    movq $1, foo(%rip)10584; O1-NEXT:    retq10585;10586; O2-LABEL: atomic64_xor_release:10587; O2:       # %bb.0: # %entry10588; O2-NEXT:    movq foo(%rip), %rax10589; O2-NEXT:  .Lpcsection313:10590; O2-NEXT:    lock xorq $42, (%rdi)10591; O2-NEXT:    movq $1, foo(%rip)10592; O2-NEXT:    retq10593;10594; O3-LABEL: atomic64_xor_release:10595; O3:       # %bb.0: # %entry10596; O3-NEXT:    movq foo(%rip), %rax10597; O3-NEXT:  .Lpcsection313:10598; O3-NEXT:    lock xorq $42, (%rdi)10599; O3-NEXT:    movq $1, foo(%rip)10600; O3-NEXT:    retq10601;10602; HASWELL-O3-LABEL: atomic64_xor_release:10603; HASWELL-O3:       # %bb.0: # %entry10604; HASWELL-O3-NEXT:    movq foo(%rip), %rax10605; HASWELL-O3-NEXT:  .Lpcsection313:10606; HASWELL-O3-NEXT:    lock xorq $42, (%rdi)10607; HASWELL-O3-NEXT:    movq $1, foo(%rip)10608; HASWELL-O3-NEXT:    retq10609entry:10610  load volatile i64, ptr @foo, align 810611  %x = atomicrmw xor ptr %a, i64 42 release, align 8, !pcsections !010612  store volatile i64 1, ptr @foo, align 810613  ret void10614}10615 10616define void @atomic64_nand_release(ptr %a) {10617; O0-LABEL: atomic64_nand_release:10618; O0:       # %bb.0: # %entry10619; O0-NEXT:    movq %rdi, {{[-0-9]+}}(%r{{[sb]}}p) # 8-byte Spill10620; O0-NEXT:    movq foo, %rax10621; O0-NEXT:  .Lpcsection350:10622; O0-NEXT:    movq (%rdi), %rax10623; O0-NEXT:    movq %rax, {{[-0-9]+}}(%r{{[sb]}}p) # 8-byte Spill10624; O0-NEXT:  .LBB176_1: # %atomicrmw.start10625; O0-NEXT:    # =>This Inner Loop Header: Depth=110626; O0-NEXT:    movq {{[-0-9]+}}(%r{{[sb]}}p), %rax # 8-byte Reload10627; O0-NEXT:    movq {{[-0-9]+}}(%r{{[sb]}}p), %rcx # 8-byte Reload10628; O0-NEXT:    movl %eax, %esi10629; O0-NEXT:  .Lpcsection351:10630; O0-NEXT:    notl %esi10631; O0-NEXT:  .Lpcsection352:10632; O0-NEXT:    # implicit-def: $rdx10633; O0-NEXT:    movl %esi, %edx10634; O0-NEXT:  .Lpcsection353:10635; O0-NEXT:    orq $-43, %rdx10636; O0-NEXT:  .Lpcsection354:10637; O0-NEXT:    lock cmpxchgq %rdx, (%rcx)10638; O0-NEXT:  .Lpcsection355:10639; O0-NEXT:    sete %cl10640; O0-NEXT:  .Lpcsection356:10641; O0-NEXT:    testb $1, %cl10642; O0-NEXT:    movq %rax, {{[-0-9]+}}(%r{{[sb]}}p) # 8-byte Spill10643; O0-NEXT:  .Lpcsection357:10644; O0-NEXT:    jne .LBB176_210645; O0-NEXT:    jmp .LBB176_110646; O0-NEXT:  .LBB176_2: # %atomicrmw.end10647; O0-NEXT:    movq $1, foo10648; O0-NEXT:    retq10649;10650; O1-LABEL: atomic64_nand_release:10651; O1:       # %bb.0: # %entry10652; O1-NEXT:    movq foo(%rip), %rax10653; O1-NEXT:  .Lpcsection314:10654; O1-NEXT:    movq (%rdi), %rax10655; O1-NEXT:    .p2align 410656; O1-NEXT:  .LBB176_1: # %atomicrmw.start10657; O1-NEXT:    # =>This Inner Loop Header: Depth=110658; O1-NEXT:    movl %eax, %ecx10659; O1-NEXT:  .Lpcsection315:10660; O1-NEXT:    notl %ecx10661; O1-NEXT:  .Lpcsection316:10662; O1-NEXT:    orq $-43, %rcx10663; O1-NEXT:  .Lpcsection317:10664; O1-NEXT:    lock cmpxchgq %rcx, (%rdi)10665; O1-NEXT:  .Lpcsection318:10666; O1-NEXT:    jne .LBB176_110667; O1-NEXT:  # %bb.2: # %atomicrmw.end10668; O1-NEXT:    movq $1, foo(%rip)10669; O1-NEXT:    retq10670;10671; O2-LABEL: atomic64_nand_release:10672; O2:       # %bb.0: # %entry10673; O2-NEXT:    movq foo(%rip), %rax10674; O2-NEXT:  .Lpcsection314:10675; O2-NEXT:    movq (%rdi), %rax10676; O2-NEXT:    .p2align 410677; O2-NEXT:  .LBB176_1: # %atomicrmw.start10678; O2-NEXT:    # =>This Inner Loop Header: Depth=110679; O2-NEXT:    movl %eax, %ecx10680; O2-NEXT:  .Lpcsection315:10681; O2-NEXT:    notl %ecx10682; O2-NEXT:  .Lpcsection316:10683; O2-NEXT:    orq $-43, %rcx10684; O2-NEXT:  .Lpcsection317:10685; O2-NEXT:    lock cmpxchgq %rcx, (%rdi)10686; O2-NEXT:  .Lpcsection318:10687; O2-NEXT:    jne .LBB176_110688; O2-NEXT:  # %bb.2: # %atomicrmw.end10689; O2-NEXT:    movq $1, foo(%rip)10690; O2-NEXT:    retq10691;10692; O3-LABEL: atomic64_nand_release:10693; O3:       # %bb.0: # %entry10694; O3-NEXT:    movq foo(%rip), %rax10695; O3-NEXT:  .Lpcsection314:10696; O3-NEXT:    movq (%rdi), %rax10697; O3-NEXT:    .p2align 410698; O3-NEXT:  .LBB176_1: # %atomicrmw.start10699; O3-NEXT:    # =>This Inner Loop Header: Depth=110700; O3-NEXT:    movl %eax, %ecx10701; O3-NEXT:  .Lpcsection315:10702; O3-NEXT:    notl %ecx10703; O3-NEXT:  .Lpcsection316:10704; O3-NEXT:    orq $-43, %rcx10705; O3-NEXT:  .Lpcsection317:10706; O3-NEXT:    lock cmpxchgq %rcx, (%rdi)10707; O3-NEXT:  .Lpcsection318:10708; O3-NEXT:    jne .LBB176_110709; O3-NEXT:  # %bb.2: # %atomicrmw.end10710; O3-NEXT:    movq $1, foo(%rip)10711; O3-NEXT:    retq10712;10713; HASWELL-O3-LABEL: atomic64_nand_release:10714; HASWELL-O3:       # %bb.0: # %entry10715; HASWELL-O3-NEXT:    movq foo(%rip), %rax10716; HASWELL-O3-NEXT:  .Lpcsection314:10717; HASWELL-O3-NEXT:    movq (%rdi), %rax10718; HASWELL-O3-NEXT:    .p2align 410719; HASWELL-O3-NEXT:  .LBB176_1: # %atomicrmw.start10720; HASWELL-O3-NEXT:    # =>This Inner Loop Header: Depth=110721; HASWELL-O3-NEXT:    movl %eax, %ecx10722; HASWELL-O3-NEXT:  .Lpcsection315:10723; HASWELL-O3-NEXT:    notl %ecx10724; HASWELL-O3-NEXT:  .Lpcsection316:10725; HASWELL-O3-NEXT:    orq $-43, %rcx10726; HASWELL-O3-NEXT:  .Lpcsection317:10727; HASWELL-O3-NEXT:    lock cmpxchgq %rcx, (%rdi)10728; HASWELL-O3-NEXT:  .Lpcsection318:10729; HASWELL-O3-NEXT:    jne .LBB176_110730; HASWELL-O3-NEXT:  # %bb.2: # %atomicrmw.end10731; HASWELL-O3-NEXT:    movq $1, foo(%rip)10732; HASWELL-O3-NEXT:    retq10733entry:10734  load volatile i64, ptr @foo, align 810735  %x = atomicrmw nand ptr %a, i64 42 release, align 8, !pcsections !010736  store volatile i64 1, ptr @foo, align 810737  ret void10738}10739 10740define void @atomic64_xchg_acq_rel(ptr %a) {10741; O0-LABEL: atomic64_xchg_acq_rel:10742; O0:       # %bb.0: # %entry10743; O0-NEXT:    movq foo(%rip), %rax10744; O0-NEXT:    movl $42, %eax10745; O0-NEXT:  .Lpcsection358:10746; O0-NEXT:    xchgq %rax, (%rdi)10747; O0-NEXT:    movq $1, foo10748; O0-NEXT:    retq10749;10750; O1-LABEL: atomic64_xchg_acq_rel:10751; O1:       # %bb.0: # %entry10752; O1-NEXT:    movq foo(%rip), %rax10753; O1-NEXT:    movl $42, %eax10754; O1-NEXT:  .Lpcsection319:10755; O1-NEXT:    xchgq %rax, (%rdi)10756; O1-NEXT:    movq $1, foo(%rip)10757; O1-NEXT:    retq10758;10759; O2-LABEL: atomic64_xchg_acq_rel:10760; O2:       # %bb.0: # %entry10761; O2-NEXT:    movq foo(%rip), %rax10762; O2-NEXT:    movl $42, %eax10763; O2-NEXT:  .Lpcsection319:10764; O2-NEXT:    xchgq %rax, (%rdi)10765; O2-NEXT:    movq $1, foo(%rip)10766; O2-NEXT:    retq10767;10768; O3-LABEL: atomic64_xchg_acq_rel:10769; O3:       # %bb.0: # %entry10770; O3-NEXT:    movq foo(%rip), %rax10771; O3-NEXT:    movl $42, %eax10772; O3-NEXT:  .Lpcsection319:10773; O3-NEXT:    xchgq %rax, (%rdi)10774; O3-NEXT:    movq $1, foo(%rip)10775; O3-NEXT:    retq10776;10777; HASWELL-O3-LABEL: atomic64_xchg_acq_rel:10778; HASWELL-O3:       # %bb.0: # %entry10779; HASWELL-O3-NEXT:    movq foo(%rip), %rax10780; HASWELL-O3-NEXT:    movl $42, %eax10781; HASWELL-O3-NEXT:  .Lpcsection319:10782; HASWELL-O3-NEXT:    xchgq %rax, (%rdi)10783; HASWELL-O3-NEXT:    movq $1, foo(%rip)10784; HASWELL-O3-NEXT:    retq10785entry:10786  load volatile i64, ptr @foo, align 810787  %x = atomicrmw xchg ptr %a, i64 42 acq_rel, align 8, !pcsections !010788  store volatile i64 1, ptr @foo, align 810789  ret void10790}10791 10792define void @atomic64_add_acq_rel(ptr %a) {10793; O0-LABEL: atomic64_add_acq_rel:10794; O0:       # %bb.0: # %entry10795; O0-NEXT:    movq foo(%rip), %rax10796; O0-NEXT:  .Lpcsection359:10797; O0-NEXT:    lock addq $42, (%rdi)10798; O0-NEXT:    movq $1, foo10799; O0-NEXT:    retq10800;10801; O1-LABEL: atomic64_add_acq_rel:10802; O1:       # %bb.0: # %entry10803; O1-NEXT:    movq foo(%rip), %rax10804; O1-NEXT:  .Lpcsection320:10805; O1-NEXT:    lock addq $42, (%rdi)10806; O1-NEXT:    movq $1, foo(%rip)10807; O1-NEXT:    retq10808;10809; O2-LABEL: atomic64_add_acq_rel:10810; O2:       # %bb.0: # %entry10811; O2-NEXT:    movq foo(%rip), %rax10812; O2-NEXT:  .Lpcsection320:10813; O2-NEXT:    lock addq $42, (%rdi)10814; O2-NEXT:    movq $1, foo(%rip)10815; O2-NEXT:    retq10816;10817; O3-LABEL: atomic64_add_acq_rel:10818; O3:       # %bb.0: # %entry10819; O3-NEXT:    movq foo(%rip), %rax10820; O3-NEXT:  .Lpcsection320:10821; O3-NEXT:    lock addq $42, (%rdi)10822; O3-NEXT:    movq $1, foo(%rip)10823; O3-NEXT:    retq10824;10825; HASWELL-O3-LABEL: atomic64_add_acq_rel:10826; HASWELL-O3:       # %bb.0: # %entry10827; HASWELL-O3-NEXT:    movq foo(%rip), %rax10828; HASWELL-O3-NEXT:  .Lpcsection320:10829; HASWELL-O3-NEXT:    lock addq $42, (%rdi)10830; HASWELL-O3-NEXT:    movq $1, foo(%rip)10831; HASWELL-O3-NEXT:    retq10832entry:10833  load volatile i64, ptr @foo, align 810834  %x = atomicrmw add ptr %a, i64 42 acq_rel, align 8, !pcsections !010835  store volatile i64 1, ptr @foo, align 810836  ret void10837}10838 10839define void @atomic64_sub_acq_rel(ptr %a) {10840; O0-LABEL: atomic64_sub_acq_rel:10841; O0:       # %bb.0: # %entry10842; O0-NEXT:    movq foo(%rip), %rax10843; O0-NEXT:  .Lpcsection360:10844; O0-NEXT:    lock subq $42, (%rdi)10845; O0-NEXT:    movq $1, foo10846; O0-NEXT:    retq10847;10848; O1-LABEL: atomic64_sub_acq_rel:10849; O1:       # %bb.0: # %entry10850; O1-NEXT:    movq foo(%rip), %rax10851; O1-NEXT:  .Lpcsection321:10852; O1-NEXT:    lock subq $42, (%rdi)10853; O1-NEXT:    movq $1, foo(%rip)10854; O1-NEXT:    retq10855;10856; O2-LABEL: atomic64_sub_acq_rel:10857; O2:       # %bb.0: # %entry10858; O2-NEXT:    movq foo(%rip), %rax10859; O2-NEXT:  .Lpcsection321:10860; O2-NEXT:    lock subq $42, (%rdi)10861; O2-NEXT:    movq $1, foo(%rip)10862; O2-NEXT:    retq10863;10864; O3-LABEL: atomic64_sub_acq_rel:10865; O3:       # %bb.0: # %entry10866; O3-NEXT:    movq foo(%rip), %rax10867; O3-NEXT:  .Lpcsection321:10868; O3-NEXT:    lock subq $42, (%rdi)10869; O3-NEXT:    movq $1, foo(%rip)10870; O3-NEXT:    retq10871;10872; HASWELL-O3-LABEL: atomic64_sub_acq_rel:10873; HASWELL-O3:       # %bb.0: # %entry10874; HASWELL-O3-NEXT:    movq foo(%rip), %rax10875; HASWELL-O3-NEXT:  .Lpcsection321:10876; HASWELL-O3-NEXT:    lock subq $42, (%rdi)10877; HASWELL-O3-NEXT:    movq $1, foo(%rip)10878; HASWELL-O3-NEXT:    retq10879entry:10880  load volatile i64, ptr @foo, align 810881  %x = atomicrmw sub ptr %a, i64 42 acq_rel, align 8, !pcsections !010882  store volatile i64 1, ptr @foo, align 810883  ret void10884}10885 10886define void @atomic64_and_acq_rel(ptr %a) {10887; O0-LABEL: atomic64_and_acq_rel:10888; O0:       # %bb.0: # %entry10889; O0-NEXT:    movq foo(%rip), %rax10890; O0-NEXT:  .Lpcsection361:10891; O0-NEXT:    lock andq $42, (%rdi)10892; O0-NEXT:    movq $1, foo10893; O0-NEXT:    retq10894;10895; O1-LABEL: atomic64_and_acq_rel:10896; O1:       # %bb.0: # %entry10897; O1-NEXT:    movq foo(%rip), %rax10898; O1-NEXT:  .Lpcsection322:10899; O1-NEXT:    lock andq $42, (%rdi)10900; O1-NEXT:    movq $1, foo(%rip)10901; O1-NEXT:    retq10902;10903; O2-LABEL: atomic64_and_acq_rel:10904; O2:       # %bb.0: # %entry10905; O2-NEXT:    movq foo(%rip), %rax10906; O2-NEXT:  .Lpcsection322:10907; O2-NEXT:    lock andq $42, (%rdi)10908; O2-NEXT:    movq $1, foo(%rip)10909; O2-NEXT:    retq10910;10911; O3-LABEL: atomic64_and_acq_rel:10912; O3:       # %bb.0: # %entry10913; O3-NEXT:    movq foo(%rip), %rax10914; O3-NEXT:  .Lpcsection322:10915; O3-NEXT:    lock andq $42, (%rdi)10916; O3-NEXT:    movq $1, foo(%rip)10917; O3-NEXT:    retq10918;10919; HASWELL-O3-LABEL: atomic64_and_acq_rel:10920; HASWELL-O3:       # %bb.0: # %entry10921; HASWELL-O3-NEXT:    movq foo(%rip), %rax10922; HASWELL-O3-NEXT:  .Lpcsection322:10923; HASWELL-O3-NEXT:    lock andq $42, (%rdi)10924; HASWELL-O3-NEXT:    movq $1, foo(%rip)10925; HASWELL-O3-NEXT:    retq10926entry:10927  load volatile i64, ptr @foo, align 810928  %x = atomicrmw and ptr %a, i64 42 acq_rel, align 8, !pcsections !010929  store volatile i64 1, ptr @foo, align 810930  ret void10931}10932 10933define void @atomic64_or_acq_rel(ptr %a) {10934; O0-LABEL: atomic64_or_acq_rel:10935; O0:       # %bb.0: # %entry10936; O0-NEXT:    movq foo(%rip), %rax10937; O0-NEXT:  .Lpcsection362:10938; O0-NEXT:    lock orq $42, (%rdi)10939; O0-NEXT:    movq $1, foo10940; O0-NEXT:    retq10941;10942; O1-LABEL: atomic64_or_acq_rel:10943; O1:       # %bb.0: # %entry10944; O1-NEXT:    movq foo(%rip), %rax10945; O1-NEXT:  .Lpcsection323:10946; O1-NEXT:    lock orq $42, (%rdi)10947; O1-NEXT:    movq $1, foo(%rip)10948; O1-NEXT:    retq10949;10950; O2-LABEL: atomic64_or_acq_rel:10951; O2:       # %bb.0: # %entry10952; O2-NEXT:    movq foo(%rip), %rax10953; O2-NEXT:  .Lpcsection323:10954; O2-NEXT:    lock orq $42, (%rdi)10955; O2-NEXT:    movq $1, foo(%rip)10956; O2-NEXT:    retq10957;10958; O3-LABEL: atomic64_or_acq_rel:10959; O3:       # %bb.0: # %entry10960; O3-NEXT:    movq foo(%rip), %rax10961; O3-NEXT:  .Lpcsection323:10962; O3-NEXT:    lock orq $42, (%rdi)10963; O3-NEXT:    movq $1, foo(%rip)10964; O3-NEXT:    retq10965;10966; HASWELL-O3-LABEL: atomic64_or_acq_rel:10967; HASWELL-O3:       # %bb.0: # %entry10968; HASWELL-O3-NEXT:    movq foo(%rip), %rax10969; HASWELL-O3-NEXT:  .Lpcsection323:10970; HASWELL-O3-NEXT:    lock orq $42, (%rdi)10971; HASWELL-O3-NEXT:    movq $1, foo(%rip)10972; HASWELL-O3-NEXT:    retq10973entry:10974  load volatile i64, ptr @foo, align 810975  %x = atomicrmw or ptr %a, i64 42 acq_rel, align 8, !pcsections !010976  store volatile i64 1, ptr @foo, align 810977  ret void10978}10979 10980define void @atomic64_xor_acq_rel(ptr %a) {10981; O0-LABEL: atomic64_xor_acq_rel:10982; O0:       # %bb.0: # %entry10983; O0-NEXT:    movq foo(%rip), %rax10984; O0-NEXT:  .Lpcsection363:10985; O0-NEXT:    lock xorq $42, (%rdi)10986; O0-NEXT:    movq $1, foo10987; O0-NEXT:    retq10988;10989; O1-LABEL: atomic64_xor_acq_rel:10990; O1:       # %bb.0: # %entry10991; O1-NEXT:    movq foo(%rip), %rax10992; O1-NEXT:  .Lpcsection324:10993; O1-NEXT:    lock xorq $42, (%rdi)10994; O1-NEXT:    movq $1, foo(%rip)10995; O1-NEXT:    retq10996;10997; O2-LABEL: atomic64_xor_acq_rel:10998; O2:       # %bb.0: # %entry10999; O2-NEXT:    movq foo(%rip), %rax11000; O2-NEXT:  .Lpcsection324:11001; O2-NEXT:    lock xorq $42, (%rdi)11002; O2-NEXT:    movq $1, foo(%rip)11003; O2-NEXT:    retq11004;11005; O3-LABEL: atomic64_xor_acq_rel:11006; O3:       # %bb.0: # %entry11007; O3-NEXT:    movq foo(%rip), %rax11008; O3-NEXT:  .Lpcsection324:11009; O3-NEXT:    lock xorq $42, (%rdi)11010; O3-NEXT:    movq $1, foo(%rip)11011; O3-NEXT:    retq11012;11013; HASWELL-O3-LABEL: atomic64_xor_acq_rel:11014; HASWELL-O3:       # %bb.0: # %entry11015; HASWELL-O3-NEXT:    movq foo(%rip), %rax11016; HASWELL-O3-NEXT:  .Lpcsection324:11017; HASWELL-O3-NEXT:    lock xorq $42, (%rdi)11018; HASWELL-O3-NEXT:    movq $1, foo(%rip)11019; HASWELL-O3-NEXT:    retq11020entry:11021  load volatile i64, ptr @foo, align 811022  %x = atomicrmw xor ptr %a, i64 42 acq_rel, align 8, !pcsections !011023  store volatile i64 1, ptr @foo, align 811024  ret void11025}11026 11027define void @atomic64_nand_acq_rel(ptr %a) {11028; O0-LABEL: atomic64_nand_acq_rel:11029; O0:       # %bb.0: # %entry11030; O0-NEXT:    movq %rdi, {{[-0-9]+}}(%r{{[sb]}}p) # 8-byte Spill11031; O0-NEXT:    movq foo, %rax11032; O0-NEXT:  .Lpcsection364:11033; O0-NEXT:    movq (%rdi), %rax11034; O0-NEXT:    movq %rax, {{[-0-9]+}}(%r{{[sb]}}p) # 8-byte Spill11035; O0-NEXT:  .LBB183_1: # %atomicrmw.start11036; O0-NEXT:    # =>This Inner Loop Header: Depth=111037; O0-NEXT:    movq {{[-0-9]+}}(%r{{[sb]}}p), %rax # 8-byte Reload11038; O0-NEXT:    movq {{[-0-9]+}}(%r{{[sb]}}p), %rcx # 8-byte Reload11039; O0-NEXT:    movl %eax, %esi11040; O0-NEXT:  .Lpcsection365:11041; O0-NEXT:    notl %esi11042; O0-NEXT:  .Lpcsection366:11043; O0-NEXT:    # implicit-def: $rdx11044; O0-NEXT:    movl %esi, %edx11045; O0-NEXT:  .Lpcsection367:11046; O0-NEXT:    orq $-43, %rdx11047; O0-NEXT:  .Lpcsection368:11048; O0-NEXT:    lock cmpxchgq %rdx, (%rcx)11049; O0-NEXT:  .Lpcsection369:11050; O0-NEXT:    sete %cl11051; O0-NEXT:  .Lpcsection370:11052; O0-NEXT:    testb $1, %cl11053; O0-NEXT:    movq %rax, {{[-0-9]+}}(%r{{[sb]}}p) # 8-byte Spill11054; O0-NEXT:  .Lpcsection371:11055; O0-NEXT:    jne .LBB183_211056; O0-NEXT:    jmp .LBB183_111057; O0-NEXT:  .LBB183_2: # %atomicrmw.end11058; O0-NEXT:    movq $1, foo11059; O0-NEXT:    retq11060;11061; O1-LABEL: atomic64_nand_acq_rel:11062; O1:       # %bb.0: # %entry11063; O1-NEXT:    movq foo(%rip), %rax11064; O1-NEXT:  .Lpcsection325:11065; O1-NEXT:    movq (%rdi), %rax11066; O1-NEXT:    .p2align 411067; O1-NEXT:  .LBB183_1: # %atomicrmw.start11068; O1-NEXT:    # =>This Inner Loop Header: Depth=111069; O1-NEXT:    movl %eax, %ecx11070; O1-NEXT:  .Lpcsection326:11071; O1-NEXT:    notl %ecx11072; O1-NEXT:  .Lpcsection327:11073; O1-NEXT:    orq $-43, %rcx11074; O1-NEXT:  .Lpcsection328:11075; O1-NEXT:    lock cmpxchgq %rcx, (%rdi)11076; O1-NEXT:  .Lpcsection329:11077; O1-NEXT:    jne .LBB183_111078; O1-NEXT:  # %bb.2: # %atomicrmw.end11079; O1-NEXT:    movq $1, foo(%rip)11080; O1-NEXT:    retq11081;11082; O2-LABEL: atomic64_nand_acq_rel:11083; O2:       # %bb.0: # %entry11084; O2-NEXT:    movq foo(%rip), %rax11085; O2-NEXT:  .Lpcsection325:11086; O2-NEXT:    movq (%rdi), %rax11087; O2-NEXT:    .p2align 411088; O2-NEXT:  .LBB183_1: # %atomicrmw.start11089; O2-NEXT:    # =>This Inner Loop Header: Depth=111090; O2-NEXT:    movl %eax, %ecx11091; O2-NEXT:  .Lpcsection326:11092; O2-NEXT:    notl %ecx11093; O2-NEXT:  .Lpcsection327:11094; O2-NEXT:    orq $-43, %rcx11095; O2-NEXT:  .Lpcsection328:11096; O2-NEXT:    lock cmpxchgq %rcx, (%rdi)11097; O2-NEXT:  .Lpcsection329:11098; O2-NEXT:    jne .LBB183_111099; O2-NEXT:  # %bb.2: # %atomicrmw.end11100; O2-NEXT:    movq $1, foo(%rip)11101; O2-NEXT:    retq11102;11103; O3-LABEL: atomic64_nand_acq_rel:11104; O3:       # %bb.0: # %entry11105; O3-NEXT:    movq foo(%rip), %rax11106; O3-NEXT:  .Lpcsection325:11107; O3-NEXT:    movq (%rdi), %rax11108; O3-NEXT:    .p2align 411109; O3-NEXT:  .LBB183_1: # %atomicrmw.start11110; O3-NEXT:    # =>This Inner Loop Header: Depth=111111; O3-NEXT:    movl %eax, %ecx11112; O3-NEXT:  .Lpcsection326:11113; O3-NEXT:    notl %ecx11114; O3-NEXT:  .Lpcsection327:11115; O3-NEXT:    orq $-43, %rcx11116; O3-NEXT:  .Lpcsection328:11117; O3-NEXT:    lock cmpxchgq %rcx, (%rdi)11118; O3-NEXT:  .Lpcsection329:11119; O3-NEXT:    jne .LBB183_111120; O3-NEXT:  # %bb.2: # %atomicrmw.end11121; O3-NEXT:    movq $1, foo(%rip)11122; O3-NEXT:    retq11123;11124; HASWELL-O3-LABEL: atomic64_nand_acq_rel:11125; HASWELL-O3:       # %bb.0: # %entry11126; HASWELL-O3-NEXT:    movq foo(%rip), %rax11127; HASWELL-O3-NEXT:  .Lpcsection325:11128; HASWELL-O3-NEXT:    movq (%rdi), %rax11129; HASWELL-O3-NEXT:    .p2align 411130; HASWELL-O3-NEXT:  .LBB183_1: # %atomicrmw.start11131; HASWELL-O3-NEXT:    # =>This Inner Loop Header: Depth=111132; HASWELL-O3-NEXT:    movl %eax, %ecx11133; HASWELL-O3-NEXT:  .Lpcsection326:11134; HASWELL-O3-NEXT:    notl %ecx11135; HASWELL-O3-NEXT:  .Lpcsection327:11136; HASWELL-O3-NEXT:    orq $-43, %rcx11137; HASWELL-O3-NEXT:  .Lpcsection328:11138; HASWELL-O3-NEXT:    lock cmpxchgq %rcx, (%rdi)11139; HASWELL-O3-NEXT:  .Lpcsection329:11140; HASWELL-O3-NEXT:    jne .LBB183_111141; HASWELL-O3-NEXT:  # %bb.2: # %atomicrmw.end11142; HASWELL-O3-NEXT:    movq $1, foo(%rip)11143; HASWELL-O3-NEXT:    retq11144entry:11145  load volatile i64, ptr @foo, align 811146  %x = atomicrmw nand ptr %a, i64 42 acq_rel, align 8, !pcsections !011147  store volatile i64 1, ptr @foo, align 811148  ret void11149}11150 11151define void @atomic64_xchg_seq_cst(ptr %a) {11152; O0-LABEL: atomic64_xchg_seq_cst:11153; O0:       # %bb.0: # %entry11154; O0-NEXT:    movq foo(%rip), %rax11155; O0-NEXT:    movl $42, %eax11156; O0-NEXT:  .Lpcsection372:11157; O0-NEXT:    xchgq %rax, (%rdi)11158; O0-NEXT:    movq $1, foo11159; O0-NEXT:    retq11160;11161; O1-LABEL: atomic64_xchg_seq_cst:11162; O1:       # %bb.0: # %entry11163; O1-NEXT:    movq foo(%rip), %rax11164; O1-NEXT:    movl $42, %eax11165; O1-NEXT:  .Lpcsection330:11166; O1-NEXT:    xchgq %rax, (%rdi)11167; O1-NEXT:    movq $1, foo(%rip)11168; O1-NEXT:    retq11169;11170; O2-LABEL: atomic64_xchg_seq_cst:11171; O2:       # %bb.0: # %entry11172; O2-NEXT:    movq foo(%rip), %rax11173; O2-NEXT:    movl $42, %eax11174; O2-NEXT:  .Lpcsection330:11175; O2-NEXT:    xchgq %rax, (%rdi)11176; O2-NEXT:    movq $1, foo(%rip)11177; O2-NEXT:    retq11178;11179; O3-LABEL: atomic64_xchg_seq_cst:11180; O3:       # %bb.0: # %entry11181; O3-NEXT:    movq foo(%rip), %rax11182; O3-NEXT:    movl $42, %eax11183; O3-NEXT:  .Lpcsection330:11184; O3-NEXT:    xchgq %rax, (%rdi)11185; O3-NEXT:    movq $1, foo(%rip)11186; O3-NEXT:    retq11187;11188; HASWELL-O3-LABEL: atomic64_xchg_seq_cst:11189; HASWELL-O3:       # %bb.0: # %entry11190; HASWELL-O3-NEXT:    movq foo(%rip), %rax11191; HASWELL-O3-NEXT:    movl $42, %eax11192; HASWELL-O3-NEXT:  .Lpcsection330:11193; HASWELL-O3-NEXT:    xchgq %rax, (%rdi)11194; HASWELL-O3-NEXT:    movq $1, foo(%rip)11195; HASWELL-O3-NEXT:    retq11196entry:11197  load volatile i64, ptr @foo, align 811198  %x = atomicrmw xchg ptr %a, i64 42 seq_cst, align 8, !pcsections !011199  store volatile i64 1, ptr @foo, align 811200  ret void11201}11202 11203define void @atomic64_add_seq_cst(ptr %a) {11204; O0-LABEL: atomic64_add_seq_cst:11205; O0:       # %bb.0: # %entry11206; O0-NEXT:    movq foo(%rip), %rax11207; O0-NEXT:  .Lpcsection373:11208; O0-NEXT:    lock addq $42, (%rdi)11209; O0-NEXT:    movq $1, foo11210; O0-NEXT:    retq11211;11212; O1-LABEL: atomic64_add_seq_cst:11213; O1:       # %bb.0: # %entry11214; O1-NEXT:    movq foo(%rip), %rax11215; O1-NEXT:  .Lpcsection331:11216; O1-NEXT:    lock addq $42, (%rdi)11217; O1-NEXT:    movq $1, foo(%rip)11218; O1-NEXT:    retq11219;11220; O2-LABEL: atomic64_add_seq_cst:11221; O2:       # %bb.0: # %entry11222; O2-NEXT:    movq foo(%rip), %rax11223; O2-NEXT:  .Lpcsection331:11224; O2-NEXT:    lock addq $42, (%rdi)11225; O2-NEXT:    movq $1, foo(%rip)11226; O2-NEXT:    retq11227;11228; O3-LABEL: atomic64_add_seq_cst:11229; O3:       # %bb.0: # %entry11230; O3-NEXT:    movq foo(%rip), %rax11231; O3-NEXT:  .Lpcsection331:11232; O3-NEXT:    lock addq $42, (%rdi)11233; O3-NEXT:    movq $1, foo(%rip)11234; O3-NEXT:    retq11235;11236; HASWELL-O3-LABEL: atomic64_add_seq_cst:11237; HASWELL-O3:       # %bb.0: # %entry11238; HASWELL-O3-NEXT:    movq foo(%rip), %rax11239; HASWELL-O3-NEXT:  .Lpcsection331:11240; HASWELL-O3-NEXT:    lock addq $42, (%rdi)11241; HASWELL-O3-NEXT:    movq $1, foo(%rip)11242; HASWELL-O3-NEXT:    retq11243entry:11244  load volatile i64, ptr @foo, align 811245  %x = atomicrmw add ptr %a, i64 42 seq_cst, align 8, !pcsections !011246  store volatile i64 1, ptr @foo, align 811247  ret void11248}11249 11250define void @atomic64_sub_seq_cst(ptr %a) {11251; O0-LABEL: atomic64_sub_seq_cst:11252; O0:       # %bb.0: # %entry11253; O0-NEXT:    movq foo(%rip), %rax11254; O0-NEXT:  .Lpcsection374:11255; O0-NEXT:    lock subq $42, (%rdi)11256; O0-NEXT:    movq $1, foo11257; O0-NEXT:    retq11258;11259; O1-LABEL: atomic64_sub_seq_cst:11260; O1:       # %bb.0: # %entry11261; O1-NEXT:    movq foo(%rip), %rax11262; O1-NEXT:  .Lpcsection332:11263; O1-NEXT:    lock subq $42, (%rdi)11264; O1-NEXT:    movq $1, foo(%rip)11265; O1-NEXT:    retq11266;11267; O2-LABEL: atomic64_sub_seq_cst:11268; O2:       # %bb.0: # %entry11269; O2-NEXT:    movq foo(%rip), %rax11270; O2-NEXT:  .Lpcsection332:11271; O2-NEXT:    lock subq $42, (%rdi)11272; O2-NEXT:    movq $1, foo(%rip)11273; O2-NEXT:    retq11274;11275; O3-LABEL: atomic64_sub_seq_cst:11276; O3:       # %bb.0: # %entry11277; O3-NEXT:    movq foo(%rip), %rax11278; O3-NEXT:  .Lpcsection332:11279; O3-NEXT:    lock subq $42, (%rdi)11280; O3-NEXT:    movq $1, foo(%rip)11281; O3-NEXT:    retq11282;11283; HASWELL-O3-LABEL: atomic64_sub_seq_cst:11284; HASWELL-O3:       # %bb.0: # %entry11285; HASWELL-O3-NEXT:    movq foo(%rip), %rax11286; HASWELL-O3-NEXT:  .Lpcsection332:11287; HASWELL-O3-NEXT:    lock subq $42, (%rdi)11288; HASWELL-O3-NEXT:    movq $1, foo(%rip)11289; HASWELL-O3-NEXT:    retq11290entry:11291  load volatile i64, ptr @foo, align 811292  %x = atomicrmw sub ptr %a, i64 42 seq_cst, align 8, !pcsections !011293  store volatile i64 1, ptr @foo, align 811294  ret void11295}11296 11297define void @atomic64_and_seq_cst(ptr %a) {11298; O0-LABEL: atomic64_and_seq_cst:11299; O0:       # %bb.0: # %entry11300; O0-NEXT:    movq foo(%rip), %rax11301; O0-NEXT:  .Lpcsection375:11302; O0-NEXT:    lock andq $42, (%rdi)11303; O0-NEXT:    movq $1, foo11304; O0-NEXT:    retq11305;11306; O1-LABEL: atomic64_and_seq_cst:11307; O1:       # %bb.0: # %entry11308; O1-NEXT:    movq foo(%rip), %rax11309; O1-NEXT:  .Lpcsection333:11310; O1-NEXT:    lock andq $42, (%rdi)11311; O1-NEXT:    movq $1, foo(%rip)11312; O1-NEXT:    retq11313;11314; O2-LABEL: atomic64_and_seq_cst:11315; O2:       # %bb.0: # %entry11316; O2-NEXT:    movq foo(%rip), %rax11317; O2-NEXT:  .Lpcsection333:11318; O2-NEXT:    lock andq $42, (%rdi)11319; O2-NEXT:    movq $1, foo(%rip)11320; O2-NEXT:    retq11321;11322; O3-LABEL: atomic64_and_seq_cst:11323; O3:       # %bb.0: # %entry11324; O3-NEXT:    movq foo(%rip), %rax11325; O3-NEXT:  .Lpcsection333:11326; O3-NEXT:    lock andq $42, (%rdi)11327; O3-NEXT:    movq $1, foo(%rip)11328; O3-NEXT:    retq11329;11330; HASWELL-O3-LABEL: atomic64_and_seq_cst:11331; HASWELL-O3:       # %bb.0: # %entry11332; HASWELL-O3-NEXT:    movq foo(%rip), %rax11333; HASWELL-O3-NEXT:  .Lpcsection333:11334; HASWELL-O3-NEXT:    lock andq $42, (%rdi)11335; HASWELL-O3-NEXT:    movq $1, foo(%rip)11336; HASWELL-O3-NEXT:    retq11337entry:11338  load volatile i64, ptr @foo, align 811339  %x = atomicrmw and ptr %a, i64 42 seq_cst, align 8, !pcsections !011340  store volatile i64 1, ptr @foo, align 811341  ret void11342}11343 11344define void @atomic64_or_seq_cst(ptr %a) {11345; O0-LABEL: atomic64_or_seq_cst:11346; O0:       # %bb.0: # %entry11347; O0-NEXT:    movq foo(%rip), %rax11348; O0-NEXT:  .Lpcsection376:11349; O0-NEXT:    lock orq $42, (%rdi)11350; O0-NEXT:    movq $1, foo11351; O0-NEXT:    retq11352;11353; O1-LABEL: atomic64_or_seq_cst:11354; O1:       # %bb.0: # %entry11355; O1-NEXT:    movq foo(%rip), %rax11356; O1-NEXT:  .Lpcsection334:11357; O1-NEXT:    lock orq $42, (%rdi)11358; O1-NEXT:    movq $1, foo(%rip)11359; O1-NEXT:    retq11360;11361; O2-LABEL: atomic64_or_seq_cst:11362; O2:       # %bb.0: # %entry11363; O2-NEXT:    movq foo(%rip), %rax11364; O2-NEXT:  .Lpcsection334:11365; O2-NEXT:    lock orq $42, (%rdi)11366; O2-NEXT:    movq $1, foo(%rip)11367; O2-NEXT:    retq11368;11369; O3-LABEL: atomic64_or_seq_cst:11370; O3:       # %bb.0: # %entry11371; O3-NEXT:    movq foo(%rip), %rax11372; O3-NEXT:  .Lpcsection334:11373; O3-NEXT:    lock orq $42, (%rdi)11374; O3-NEXT:    movq $1, foo(%rip)11375; O3-NEXT:    retq11376;11377; HASWELL-O3-LABEL: atomic64_or_seq_cst:11378; HASWELL-O3:       # %bb.0: # %entry11379; HASWELL-O3-NEXT:    movq foo(%rip), %rax11380; HASWELL-O3-NEXT:  .Lpcsection334:11381; HASWELL-O3-NEXT:    lock orq $42, (%rdi)11382; HASWELL-O3-NEXT:    movq $1, foo(%rip)11383; HASWELL-O3-NEXT:    retq11384entry:11385  load volatile i64, ptr @foo, align 811386  %x = atomicrmw or ptr %a, i64 42 seq_cst, align 8, !pcsections !011387  store volatile i64 1, ptr @foo, align 811388  ret void11389}11390 11391define void @atomic64_xor_seq_cst(ptr %a) {11392; O0-LABEL: atomic64_xor_seq_cst:11393; O0:       # %bb.0: # %entry11394; O0-NEXT:    movq foo(%rip), %rax11395; O0-NEXT:  .Lpcsection377:11396; O0-NEXT:    lock xorq $42, (%rdi)11397; O0-NEXT:    movq $1, foo11398; O0-NEXT:    retq11399;11400; O1-LABEL: atomic64_xor_seq_cst:11401; O1:       # %bb.0: # %entry11402; O1-NEXT:    movq foo(%rip), %rax11403; O1-NEXT:  .Lpcsection335:11404; O1-NEXT:    lock xorq $42, (%rdi)11405; O1-NEXT:    movq $1, foo(%rip)11406; O1-NEXT:    retq11407;11408; O2-LABEL: atomic64_xor_seq_cst:11409; O2:       # %bb.0: # %entry11410; O2-NEXT:    movq foo(%rip), %rax11411; O2-NEXT:  .Lpcsection335:11412; O2-NEXT:    lock xorq $42, (%rdi)11413; O2-NEXT:    movq $1, foo(%rip)11414; O2-NEXT:    retq11415;11416; O3-LABEL: atomic64_xor_seq_cst:11417; O3:       # %bb.0: # %entry11418; O3-NEXT:    movq foo(%rip), %rax11419; O3-NEXT:  .Lpcsection335:11420; O3-NEXT:    lock xorq $42, (%rdi)11421; O3-NEXT:    movq $1, foo(%rip)11422; O3-NEXT:    retq11423;11424; HASWELL-O3-LABEL: atomic64_xor_seq_cst:11425; HASWELL-O3:       # %bb.0: # %entry11426; HASWELL-O3-NEXT:    movq foo(%rip), %rax11427; HASWELL-O3-NEXT:  .Lpcsection335:11428; HASWELL-O3-NEXT:    lock xorq $42, (%rdi)11429; HASWELL-O3-NEXT:    movq $1, foo(%rip)11430; HASWELL-O3-NEXT:    retq11431entry:11432  load volatile i64, ptr @foo, align 811433  %x = atomicrmw xor ptr %a, i64 42 seq_cst, align 8, !pcsections !011434  store volatile i64 1, ptr @foo, align 811435  ret void11436}11437 11438define void @atomic64_nand_seq_cst(ptr %a) {11439; O0-LABEL: atomic64_nand_seq_cst:11440; O0:       # %bb.0: # %entry11441; O0-NEXT:    movq %rdi, {{[-0-9]+}}(%r{{[sb]}}p) # 8-byte Spill11442; O0-NEXT:    movq foo, %rax11443; O0-NEXT:  .Lpcsection378:11444; O0-NEXT:    movq (%rdi), %rax11445; O0-NEXT:    movq %rax, {{[-0-9]+}}(%r{{[sb]}}p) # 8-byte Spill11446; O0-NEXT:  .LBB190_1: # %atomicrmw.start11447; O0-NEXT:    # =>This Inner Loop Header: Depth=111448; O0-NEXT:    movq {{[-0-9]+}}(%r{{[sb]}}p), %rax # 8-byte Reload11449; O0-NEXT:    movq {{[-0-9]+}}(%r{{[sb]}}p), %rcx # 8-byte Reload11450; O0-NEXT:    movl %eax, %esi11451; O0-NEXT:  .Lpcsection379:11452; O0-NEXT:    notl %esi11453; O0-NEXT:  .Lpcsection380:11454; O0-NEXT:    # implicit-def: $rdx11455; O0-NEXT:    movl %esi, %edx11456; O0-NEXT:  .Lpcsection381:11457; O0-NEXT:    orq $-43, %rdx11458; O0-NEXT:  .Lpcsection382:11459; O0-NEXT:    lock cmpxchgq %rdx, (%rcx)11460; O0-NEXT:  .Lpcsection383:11461; O0-NEXT:    sete %cl11462; O0-NEXT:  .Lpcsection384:11463; O0-NEXT:    testb $1, %cl11464; O0-NEXT:    movq %rax, {{[-0-9]+}}(%r{{[sb]}}p) # 8-byte Spill11465; O0-NEXT:  .Lpcsection385:11466; O0-NEXT:    jne .LBB190_211467; O0-NEXT:    jmp .LBB190_111468; O0-NEXT:  .LBB190_2: # %atomicrmw.end11469; O0-NEXT:    movq $1, foo11470; O0-NEXT:    retq11471;11472; O1-LABEL: atomic64_nand_seq_cst:11473; O1:       # %bb.0: # %entry11474; O1-NEXT:    movq foo(%rip), %rax11475; O1-NEXT:  .Lpcsection336:11476; O1-NEXT:    movq (%rdi), %rax11477; O1-NEXT:    .p2align 411478; O1-NEXT:  .LBB190_1: # %atomicrmw.start11479; O1-NEXT:    # =>This Inner Loop Header: Depth=111480; O1-NEXT:    movl %eax, %ecx11481; O1-NEXT:  .Lpcsection337:11482; O1-NEXT:    notl %ecx11483; O1-NEXT:  .Lpcsection338:11484; O1-NEXT:    orq $-43, %rcx11485; O1-NEXT:  .Lpcsection339:11486; O1-NEXT:    lock cmpxchgq %rcx, (%rdi)11487; O1-NEXT:  .Lpcsection340:11488; O1-NEXT:    jne .LBB190_111489; O1-NEXT:  # %bb.2: # %atomicrmw.end11490; O1-NEXT:    movq $1, foo(%rip)11491; O1-NEXT:    retq11492;11493; O2-LABEL: atomic64_nand_seq_cst:11494; O2:       # %bb.0: # %entry11495; O2-NEXT:    movq foo(%rip), %rax11496; O2-NEXT:  .Lpcsection336:11497; O2-NEXT:    movq (%rdi), %rax11498; O2-NEXT:    .p2align 411499; O2-NEXT:  .LBB190_1: # %atomicrmw.start11500; O2-NEXT:    # =>This Inner Loop Header: Depth=111501; O2-NEXT:    movl %eax, %ecx11502; O2-NEXT:  .Lpcsection337:11503; O2-NEXT:    notl %ecx11504; O2-NEXT:  .Lpcsection338:11505; O2-NEXT:    orq $-43, %rcx11506; O2-NEXT:  .Lpcsection339:11507; O2-NEXT:    lock cmpxchgq %rcx, (%rdi)11508; O2-NEXT:  .Lpcsection340:11509; O2-NEXT:    jne .LBB190_111510; O2-NEXT:  # %bb.2: # %atomicrmw.end11511; O2-NEXT:    movq $1, foo(%rip)11512; O2-NEXT:    retq11513;11514; O3-LABEL: atomic64_nand_seq_cst:11515; O3:       # %bb.0: # %entry11516; O3-NEXT:    movq foo(%rip), %rax11517; O3-NEXT:  .Lpcsection336:11518; O3-NEXT:    movq (%rdi), %rax11519; O3-NEXT:    .p2align 411520; O3-NEXT:  .LBB190_1: # %atomicrmw.start11521; O3-NEXT:    # =>This Inner Loop Header: Depth=111522; O3-NEXT:    movl %eax, %ecx11523; O3-NEXT:  .Lpcsection337:11524; O3-NEXT:    notl %ecx11525; O3-NEXT:  .Lpcsection338:11526; O3-NEXT:    orq $-43, %rcx11527; O3-NEXT:  .Lpcsection339:11528; O3-NEXT:    lock cmpxchgq %rcx, (%rdi)11529; O3-NEXT:  .Lpcsection340:11530; O3-NEXT:    jne .LBB190_111531; O3-NEXT:  # %bb.2: # %atomicrmw.end11532; O3-NEXT:    movq $1, foo(%rip)11533; O3-NEXT:    retq11534;11535; HASWELL-O3-LABEL: atomic64_nand_seq_cst:11536; HASWELL-O3:       # %bb.0: # %entry11537; HASWELL-O3-NEXT:    movq foo(%rip), %rax11538; HASWELL-O3-NEXT:  .Lpcsection336:11539; HASWELL-O3-NEXT:    movq (%rdi), %rax11540; HASWELL-O3-NEXT:    .p2align 411541; HASWELL-O3-NEXT:  .LBB190_1: # %atomicrmw.start11542; HASWELL-O3-NEXT:    # =>This Inner Loop Header: Depth=111543; HASWELL-O3-NEXT:    movl %eax, %ecx11544; HASWELL-O3-NEXT:  .Lpcsection337:11545; HASWELL-O3-NEXT:    notl %ecx11546; HASWELL-O3-NEXT:  .Lpcsection338:11547; HASWELL-O3-NEXT:    orq $-43, %rcx11548; HASWELL-O3-NEXT:  .Lpcsection339:11549; HASWELL-O3-NEXT:    lock cmpxchgq %rcx, (%rdi)11550; HASWELL-O3-NEXT:  .Lpcsection340:11551; HASWELL-O3-NEXT:    jne .LBB190_111552; HASWELL-O3-NEXT:  # %bb.2: # %atomicrmw.end11553; HASWELL-O3-NEXT:    movq $1, foo(%rip)11554; HASWELL-O3-NEXT:    retq11555entry:11556  load volatile i64, ptr @foo, align 811557  %x = atomicrmw nand ptr %a, i64 42 seq_cst, align 8, !pcsections !011558  store volatile i64 1, ptr @foo, align 811559  ret void11560}11561 11562define void @atomic64_cas_monotonic(ptr %a) {11563; O0-LABEL: atomic64_cas_monotonic:11564; O0:       # %bb.0: # %entry11565; O0-NEXT:    movq foo(%rip), %rax11566; O0-NEXT:    movl $42, %eax11567; O0-NEXT:    movq %rax, {{[-0-9]+}}(%r{{[sb]}}p) # 8-byte Spill11568; O0-NEXT:    movl $1, %ecx11569; O0-NEXT:  .Lpcsection386:11570; O0-NEXT:    lock cmpxchgq %rcx, (%rdi)11571; O0-NEXT:  .Lpcsection387:11572; O0-NEXT:    # kill: def $rdx killed $rax11573; O0-NEXT:    movq {{[-0-9]+}}(%r{{[sb]}}p), %rax # 8-byte Reload11574; O0-NEXT:  .Lpcsection388:11575; O0-NEXT:    lock cmpxchgq %rcx, (%rdi)11576; O0-NEXT:  .Lpcsection389:11577; O0-NEXT:    # kill: def $rdx killed $rax11578; O0-NEXT:    movq {{[-0-9]+}}(%r{{[sb]}}p), %rax # 8-byte Reload11579; O0-NEXT:  .Lpcsection390:11580; O0-NEXT:    lock cmpxchgq %rcx, (%rdi)11581; O0-NEXT:    movq $1, foo11582; O0-NEXT:    retq11583;11584; O1-LABEL: atomic64_cas_monotonic:11585; O1:       # %bb.0: # %entry11586; O1-NEXT:    movq foo(%rip), %rax11587; O1-NEXT:    movl $1, %ecx11588; O1-NEXT:  .Lpcsection341:11589; O1-NEXT:    movl $42, %eax11590; O1-NEXT:  .Lpcsection342:11591; O1-NEXT:    lock cmpxchgq %rcx, (%rdi)11592; O1-NEXT:  .Lpcsection343:11593; O1-NEXT:    movl $42, %eax11594; O1-NEXT:  .Lpcsection344:11595; O1-NEXT:    lock cmpxchgq %rcx, (%rdi)11596; O1-NEXT:  .Lpcsection345:11597; O1-NEXT:    movl $42, %eax11598; O1-NEXT:  .Lpcsection346:11599; O1-NEXT:    lock cmpxchgq %rcx, (%rdi)11600; O1-NEXT:    movq $1, foo(%rip)11601; O1-NEXT:    retq11602;11603; O2-LABEL: atomic64_cas_monotonic:11604; O2:       # %bb.0: # %entry11605; O2-NEXT:    movq foo(%rip), %rax11606; O2-NEXT:    movl $1, %ecx11607; O2-NEXT:  .Lpcsection341:11608; O2-NEXT:    movl $42, %eax11609; O2-NEXT:  .Lpcsection342:11610; O2-NEXT:    lock cmpxchgq %rcx, (%rdi)11611; O2-NEXT:  .Lpcsection343:11612; O2-NEXT:    movl $42, %eax11613; O2-NEXT:  .Lpcsection344:11614; O2-NEXT:    lock cmpxchgq %rcx, (%rdi)11615; O2-NEXT:  .Lpcsection345:11616; O2-NEXT:    movl $42, %eax11617; O2-NEXT:  .Lpcsection346:11618; O2-NEXT:    lock cmpxchgq %rcx, (%rdi)11619; O2-NEXT:    movq $1, foo(%rip)11620; O2-NEXT:    retq11621;11622; O3-LABEL: atomic64_cas_monotonic:11623; O3:       # %bb.0: # %entry11624; O3-NEXT:    movq foo(%rip), %rax11625; O3-NEXT:    movl $1, %ecx11626; O3-NEXT:  .Lpcsection341:11627; O3-NEXT:    movl $42, %eax11628; O3-NEXT:  .Lpcsection342:11629; O3-NEXT:    lock cmpxchgq %rcx, (%rdi)11630; O3-NEXT:  .Lpcsection343:11631; O3-NEXT:    movl $42, %eax11632; O3-NEXT:  .Lpcsection344:11633; O3-NEXT:    lock cmpxchgq %rcx, (%rdi)11634; O3-NEXT:  .Lpcsection345:11635; O3-NEXT:    movl $42, %eax11636; O3-NEXT:  .Lpcsection346:11637; O3-NEXT:    lock cmpxchgq %rcx, (%rdi)11638; O3-NEXT:    movq $1, foo(%rip)11639; O3-NEXT:    retq11640;11641; HASWELL-O3-LABEL: atomic64_cas_monotonic:11642; HASWELL-O3:       # %bb.0: # %entry11643; HASWELL-O3-NEXT:    movq foo(%rip), %rax11644; HASWELL-O3-NEXT:    movl $1, %ecx11645; HASWELL-O3-NEXT:  .Lpcsection341:11646; HASWELL-O3-NEXT:    movl $42, %eax11647; HASWELL-O3-NEXT:  .Lpcsection342:11648; HASWELL-O3-NEXT:    lock cmpxchgq %rcx, (%rdi)11649; HASWELL-O3-NEXT:  .Lpcsection343:11650; HASWELL-O3-NEXT:    movl $42, %eax11651; HASWELL-O3-NEXT:  .Lpcsection344:11652; HASWELL-O3-NEXT:    lock cmpxchgq %rcx, (%rdi)11653; HASWELL-O3-NEXT:  .Lpcsection345:11654; HASWELL-O3-NEXT:    movl $42, %eax11655; HASWELL-O3-NEXT:  .Lpcsection346:11656; HASWELL-O3-NEXT:    lock cmpxchgq %rcx, (%rdi)11657; HASWELL-O3-NEXT:    movq $1, foo(%rip)11658; HASWELL-O3-NEXT:    retq11659entry:11660  load volatile i64, ptr @foo, align 811661  %x = cmpxchg ptr %a, i64 42, i64 1 monotonic monotonic, align 8, !pcsections !011662  %y = cmpxchg ptr %a, i64 42, i64 1 monotonic acquire, align 8, !pcsections !011663  %z = cmpxchg ptr %a, i64 42, i64 1 monotonic seq_cst, align 8, !pcsections !011664  store volatile i64 1, ptr @foo, align 811665  ret void11666}11667 11668define void @atomic64_cas_acquire(ptr %a) {11669; O0-LABEL: atomic64_cas_acquire:11670; O0:       # %bb.0: # %entry11671; O0-NEXT:    movq foo(%rip), %rax11672; O0-NEXT:    movl $42, %eax11673; O0-NEXT:    movq %rax, {{[-0-9]+}}(%r{{[sb]}}p) # 8-byte Spill11674; O0-NEXT:    movl $1, %ecx11675; O0-NEXT:  .Lpcsection391:11676; O0-NEXT:    lock cmpxchgq %rcx, (%rdi)11677; O0-NEXT:  .Lpcsection392:11678; O0-NEXT:    # kill: def $rdx killed $rax11679; O0-NEXT:    movq {{[-0-9]+}}(%r{{[sb]}}p), %rax # 8-byte Reload11680; O0-NEXT:  .Lpcsection393:11681; O0-NEXT:    lock cmpxchgq %rcx, (%rdi)11682; O0-NEXT:  .Lpcsection394:11683; O0-NEXT:    # kill: def $rdx killed $rax11684; O0-NEXT:    movq {{[-0-9]+}}(%r{{[sb]}}p), %rax # 8-byte Reload11685; O0-NEXT:  .Lpcsection395:11686; O0-NEXT:    lock cmpxchgq %rcx, (%rdi)11687; O0-NEXT:    movq $1, foo11688; O0-NEXT:    retq11689;11690; O1-LABEL: atomic64_cas_acquire:11691; O1:       # %bb.0: # %entry11692; O1-NEXT:    movq foo(%rip), %rax11693; O1-NEXT:    movl $1, %ecx11694; O1-NEXT:  .Lpcsection347:11695; O1-NEXT:    movl $42, %eax11696; O1-NEXT:  .Lpcsection348:11697; O1-NEXT:    lock cmpxchgq %rcx, (%rdi)11698; O1-NEXT:  .Lpcsection349:11699; O1-NEXT:    movl $42, %eax11700; O1-NEXT:  .Lpcsection350:11701; O1-NEXT:    lock cmpxchgq %rcx, (%rdi)11702; O1-NEXT:  .Lpcsection351:11703; O1-NEXT:    movl $42, %eax11704; O1-NEXT:  .Lpcsection352:11705; O1-NEXT:    lock cmpxchgq %rcx, (%rdi)11706; O1-NEXT:    movq $1, foo(%rip)11707; O1-NEXT:    retq11708;11709; O2-LABEL: atomic64_cas_acquire:11710; O2:       # %bb.0: # %entry11711; O2-NEXT:    movq foo(%rip), %rax11712; O2-NEXT:    movl $1, %ecx11713; O2-NEXT:  .Lpcsection347:11714; O2-NEXT:    movl $42, %eax11715; O2-NEXT:  .Lpcsection348:11716; O2-NEXT:    lock cmpxchgq %rcx, (%rdi)11717; O2-NEXT:  .Lpcsection349:11718; O2-NEXT:    movl $42, %eax11719; O2-NEXT:  .Lpcsection350:11720; O2-NEXT:    lock cmpxchgq %rcx, (%rdi)11721; O2-NEXT:  .Lpcsection351:11722; O2-NEXT:    movl $42, %eax11723; O2-NEXT:  .Lpcsection352:11724; O2-NEXT:    lock cmpxchgq %rcx, (%rdi)11725; O2-NEXT:    movq $1, foo(%rip)11726; O2-NEXT:    retq11727;11728; O3-LABEL: atomic64_cas_acquire:11729; O3:       # %bb.0: # %entry11730; O3-NEXT:    movq foo(%rip), %rax11731; O3-NEXT:    movl $1, %ecx11732; O3-NEXT:  .Lpcsection347:11733; O3-NEXT:    movl $42, %eax11734; O3-NEXT:  .Lpcsection348:11735; O3-NEXT:    lock cmpxchgq %rcx, (%rdi)11736; O3-NEXT:  .Lpcsection349:11737; O3-NEXT:    movl $42, %eax11738; O3-NEXT:  .Lpcsection350:11739; O3-NEXT:    lock cmpxchgq %rcx, (%rdi)11740; O3-NEXT:  .Lpcsection351:11741; O3-NEXT:    movl $42, %eax11742; O3-NEXT:  .Lpcsection352:11743; O3-NEXT:    lock cmpxchgq %rcx, (%rdi)11744; O3-NEXT:    movq $1, foo(%rip)11745; O3-NEXT:    retq11746;11747; HASWELL-O3-LABEL: atomic64_cas_acquire:11748; HASWELL-O3:       # %bb.0: # %entry11749; HASWELL-O3-NEXT:    movq foo(%rip), %rax11750; HASWELL-O3-NEXT:    movl $1, %ecx11751; HASWELL-O3-NEXT:  .Lpcsection347:11752; HASWELL-O3-NEXT:    movl $42, %eax11753; HASWELL-O3-NEXT:  .Lpcsection348:11754; HASWELL-O3-NEXT:    lock cmpxchgq %rcx, (%rdi)11755; HASWELL-O3-NEXT:  .Lpcsection349:11756; HASWELL-O3-NEXT:    movl $42, %eax11757; HASWELL-O3-NEXT:  .Lpcsection350:11758; HASWELL-O3-NEXT:    lock cmpxchgq %rcx, (%rdi)11759; HASWELL-O3-NEXT:  .Lpcsection351:11760; HASWELL-O3-NEXT:    movl $42, %eax11761; HASWELL-O3-NEXT:  .Lpcsection352:11762; HASWELL-O3-NEXT:    lock cmpxchgq %rcx, (%rdi)11763; HASWELL-O3-NEXT:    movq $1, foo(%rip)11764; HASWELL-O3-NEXT:    retq11765entry:11766  load volatile i64, ptr @foo, align 811767  %x = cmpxchg ptr %a, i64 42, i64 1 acquire monotonic, align 8, !pcsections !011768  %y = cmpxchg ptr %a, i64 42, i64 1 acquire acquire, align 8, !pcsections !011769  %z = cmpxchg ptr %a, i64 42, i64 1 acquire seq_cst, align 8, !pcsections !011770  store volatile i64 1, ptr @foo, align 811771  ret void11772}11773 11774define void @atomic64_cas_release(ptr %a) {11775; O0-LABEL: atomic64_cas_release:11776; O0:       # %bb.0: # %entry11777; O0-NEXT:    movq foo(%rip), %rax11778; O0-NEXT:    movl $42, %eax11779; O0-NEXT:    movq %rax, {{[-0-9]+}}(%r{{[sb]}}p) # 8-byte Spill11780; O0-NEXT:    movl $1, %ecx11781; O0-NEXT:  .Lpcsection396:11782; O0-NEXT:    lock cmpxchgq %rcx, (%rdi)11783; O0-NEXT:  .Lpcsection397:11784; O0-NEXT:    # kill: def $rdx killed $rax11785; O0-NEXT:    movq {{[-0-9]+}}(%r{{[sb]}}p), %rax # 8-byte Reload11786; O0-NEXT:  .Lpcsection398:11787; O0-NEXT:    lock cmpxchgq %rcx, (%rdi)11788; O0-NEXT:  .Lpcsection399:11789; O0-NEXT:    # kill: def $rdx killed $rax11790; O0-NEXT:    movq {{[-0-9]+}}(%r{{[sb]}}p), %rax # 8-byte Reload11791; O0-NEXT:  .Lpcsection400:11792; O0-NEXT:    lock cmpxchgq %rcx, (%rdi)11793; O0-NEXT:    movq $1, foo11794; O0-NEXT:    retq11795;11796; O1-LABEL: atomic64_cas_release:11797; O1:       # %bb.0: # %entry11798; O1-NEXT:    movq foo(%rip), %rax11799; O1-NEXT:    movl $1, %ecx11800; O1-NEXT:  .Lpcsection353:11801; O1-NEXT:    movl $42, %eax11802; O1-NEXT:  .Lpcsection354:11803; O1-NEXT:    lock cmpxchgq %rcx, (%rdi)11804; O1-NEXT:  .Lpcsection355:11805; O1-NEXT:    movl $42, %eax11806; O1-NEXT:  .Lpcsection356:11807; O1-NEXT:    lock cmpxchgq %rcx, (%rdi)11808; O1-NEXT:  .Lpcsection357:11809; O1-NEXT:    movl $42, %eax11810; O1-NEXT:  .Lpcsection358:11811; O1-NEXT:    lock cmpxchgq %rcx, (%rdi)11812; O1-NEXT:    movq $1, foo(%rip)11813; O1-NEXT:    retq11814;11815; O2-LABEL: atomic64_cas_release:11816; O2:       # %bb.0: # %entry11817; O2-NEXT:    movq foo(%rip), %rax11818; O2-NEXT:    movl $1, %ecx11819; O2-NEXT:  .Lpcsection353:11820; O2-NEXT:    movl $42, %eax11821; O2-NEXT:  .Lpcsection354:11822; O2-NEXT:    lock cmpxchgq %rcx, (%rdi)11823; O2-NEXT:  .Lpcsection355:11824; O2-NEXT:    movl $42, %eax11825; O2-NEXT:  .Lpcsection356:11826; O2-NEXT:    lock cmpxchgq %rcx, (%rdi)11827; O2-NEXT:  .Lpcsection357:11828; O2-NEXT:    movl $42, %eax11829; O2-NEXT:  .Lpcsection358:11830; O2-NEXT:    lock cmpxchgq %rcx, (%rdi)11831; O2-NEXT:    movq $1, foo(%rip)11832; O2-NEXT:    retq11833;11834; O3-LABEL: atomic64_cas_release:11835; O3:       # %bb.0: # %entry11836; O3-NEXT:    movq foo(%rip), %rax11837; O3-NEXT:    movl $1, %ecx11838; O3-NEXT:  .Lpcsection353:11839; O3-NEXT:    movl $42, %eax11840; O3-NEXT:  .Lpcsection354:11841; O3-NEXT:    lock cmpxchgq %rcx, (%rdi)11842; O3-NEXT:  .Lpcsection355:11843; O3-NEXT:    movl $42, %eax11844; O3-NEXT:  .Lpcsection356:11845; O3-NEXT:    lock cmpxchgq %rcx, (%rdi)11846; O3-NEXT:  .Lpcsection357:11847; O3-NEXT:    movl $42, %eax11848; O3-NEXT:  .Lpcsection358:11849; O3-NEXT:    lock cmpxchgq %rcx, (%rdi)11850; O3-NEXT:    movq $1, foo(%rip)11851; O3-NEXT:    retq11852;11853; HASWELL-O3-LABEL: atomic64_cas_release:11854; HASWELL-O3:       # %bb.0: # %entry11855; HASWELL-O3-NEXT:    movq foo(%rip), %rax11856; HASWELL-O3-NEXT:    movl $1, %ecx11857; HASWELL-O3-NEXT:  .Lpcsection353:11858; HASWELL-O3-NEXT:    movl $42, %eax11859; HASWELL-O3-NEXT:  .Lpcsection354:11860; HASWELL-O3-NEXT:    lock cmpxchgq %rcx, (%rdi)11861; HASWELL-O3-NEXT:  .Lpcsection355:11862; HASWELL-O3-NEXT:    movl $42, %eax11863; HASWELL-O3-NEXT:  .Lpcsection356:11864; HASWELL-O3-NEXT:    lock cmpxchgq %rcx, (%rdi)11865; HASWELL-O3-NEXT:  .Lpcsection357:11866; HASWELL-O3-NEXT:    movl $42, %eax11867; HASWELL-O3-NEXT:  .Lpcsection358:11868; HASWELL-O3-NEXT:    lock cmpxchgq %rcx, (%rdi)11869; HASWELL-O3-NEXT:    movq $1, foo(%rip)11870; HASWELL-O3-NEXT:    retq11871entry:11872  load volatile i64, ptr @foo, align 811873  %x = cmpxchg ptr %a, i64 42, i64 1 release monotonic, align 8, !pcsections !011874  %y = cmpxchg ptr %a, i64 42, i64 1 release acquire, align 8, !pcsections !011875  %z = cmpxchg ptr %a, i64 42, i64 1 release seq_cst, align 8, !pcsections !011876  store volatile i64 1, ptr @foo, align 811877  ret void11878}11879 11880define void @atomic64_cas_acq_rel(ptr %a) {11881; O0-LABEL: atomic64_cas_acq_rel:11882; O0:       # %bb.0: # %entry11883; O0-NEXT:    movq foo(%rip), %rax11884; O0-NEXT:    movl $42, %eax11885; O0-NEXT:    movq %rax, {{[-0-9]+}}(%r{{[sb]}}p) # 8-byte Spill11886; O0-NEXT:    movl $1, %ecx11887; O0-NEXT:  .Lpcsection401:11888; O0-NEXT:    lock cmpxchgq %rcx, (%rdi)11889; O0-NEXT:  .Lpcsection402:11890; O0-NEXT:    # kill: def $rdx killed $rax11891; O0-NEXT:    movq {{[-0-9]+}}(%r{{[sb]}}p), %rax # 8-byte Reload11892; O0-NEXT:  .Lpcsection403:11893; O0-NEXT:    lock cmpxchgq %rcx, (%rdi)11894; O0-NEXT:  .Lpcsection404:11895; O0-NEXT:    # kill: def $rdx killed $rax11896; O0-NEXT:    movq {{[-0-9]+}}(%r{{[sb]}}p), %rax # 8-byte Reload11897; O0-NEXT:  .Lpcsection405:11898; O0-NEXT:    lock cmpxchgq %rcx, (%rdi)11899; O0-NEXT:    movq $1, foo11900; O0-NEXT:    retq11901;11902; O1-LABEL: atomic64_cas_acq_rel:11903; O1:       # %bb.0: # %entry11904; O1-NEXT:    movq foo(%rip), %rax11905; O1-NEXT:    movl $1, %ecx11906; O1-NEXT:  .Lpcsection359:11907; O1-NEXT:    movl $42, %eax11908; O1-NEXT:  .Lpcsection360:11909; O1-NEXT:    lock cmpxchgq %rcx, (%rdi)11910; O1-NEXT:  .Lpcsection361:11911; O1-NEXT:    movl $42, %eax11912; O1-NEXT:  .Lpcsection362:11913; O1-NEXT:    lock cmpxchgq %rcx, (%rdi)11914; O1-NEXT:  .Lpcsection363:11915; O1-NEXT:    movl $42, %eax11916; O1-NEXT:  .Lpcsection364:11917; O1-NEXT:    lock cmpxchgq %rcx, (%rdi)11918; O1-NEXT:    movq $1, foo(%rip)11919; O1-NEXT:    retq11920;11921; O2-LABEL: atomic64_cas_acq_rel:11922; O2:       # %bb.0: # %entry11923; O2-NEXT:    movq foo(%rip), %rax11924; O2-NEXT:    movl $1, %ecx11925; O2-NEXT:  .Lpcsection359:11926; O2-NEXT:    movl $42, %eax11927; O2-NEXT:  .Lpcsection360:11928; O2-NEXT:    lock cmpxchgq %rcx, (%rdi)11929; O2-NEXT:  .Lpcsection361:11930; O2-NEXT:    movl $42, %eax11931; O2-NEXT:  .Lpcsection362:11932; O2-NEXT:    lock cmpxchgq %rcx, (%rdi)11933; O2-NEXT:  .Lpcsection363:11934; O2-NEXT:    movl $42, %eax11935; O2-NEXT:  .Lpcsection364:11936; O2-NEXT:    lock cmpxchgq %rcx, (%rdi)11937; O2-NEXT:    movq $1, foo(%rip)11938; O2-NEXT:    retq11939;11940; O3-LABEL: atomic64_cas_acq_rel:11941; O3:       # %bb.0: # %entry11942; O3-NEXT:    movq foo(%rip), %rax11943; O3-NEXT:    movl $1, %ecx11944; O3-NEXT:  .Lpcsection359:11945; O3-NEXT:    movl $42, %eax11946; O3-NEXT:  .Lpcsection360:11947; O3-NEXT:    lock cmpxchgq %rcx, (%rdi)11948; O3-NEXT:  .Lpcsection361:11949; O3-NEXT:    movl $42, %eax11950; O3-NEXT:  .Lpcsection362:11951; O3-NEXT:    lock cmpxchgq %rcx, (%rdi)11952; O3-NEXT:  .Lpcsection363:11953; O3-NEXT:    movl $42, %eax11954; O3-NEXT:  .Lpcsection364:11955; O3-NEXT:    lock cmpxchgq %rcx, (%rdi)11956; O3-NEXT:    movq $1, foo(%rip)11957; O3-NEXT:    retq11958;11959; HASWELL-O3-LABEL: atomic64_cas_acq_rel:11960; HASWELL-O3:       # %bb.0: # %entry11961; HASWELL-O3-NEXT:    movq foo(%rip), %rax11962; HASWELL-O3-NEXT:    movl $1, %ecx11963; HASWELL-O3-NEXT:  .Lpcsection359:11964; HASWELL-O3-NEXT:    movl $42, %eax11965; HASWELL-O3-NEXT:  .Lpcsection360:11966; HASWELL-O3-NEXT:    lock cmpxchgq %rcx, (%rdi)11967; HASWELL-O3-NEXT:  .Lpcsection361:11968; HASWELL-O3-NEXT:    movl $42, %eax11969; HASWELL-O3-NEXT:  .Lpcsection362:11970; HASWELL-O3-NEXT:    lock cmpxchgq %rcx, (%rdi)11971; HASWELL-O3-NEXT:  .Lpcsection363:11972; HASWELL-O3-NEXT:    movl $42, %eax11973; HASWELL-O3-NEXT:  .Lpcsection364:11974; HASWELL-O3-NEXT:    lock cmpxchgq %rcx, (%rdi)11975; HASWELL-O3-NEXT:    movq $1, foo(%rip)11976; HASWELL-O3-NEXT:    retq11977entry:11978  load volatile i64, ptr @foo, align 811979  %x = cmpxchg ptr %a, i64 42, i64 1 acq_rel monotonic, align 8, !pcsections !011980  %y = cmpxchg ptr %a, i64 42, i64 1 acq_rel acquire, align 8, !pcsections !011981  %z = cmpxchg ptr %a, i64 42, i64 1 acq_rel seq_cst, align 8, !pcsections !011982  store volatile i64 1, ptr @foo, align 811983  ret void11984}11985 11986define void @atomic64_cas_seq_cst(ptr %a) {11987; O0-LABEL: atomic64_cas_seq_cst:11988; O0:       # %bb.0: # %entry11989; O0-NEXT:    movq foo(%rip), %rax11990; O0-NEXT:    movl $42, %eax11991; O0-NEXT:    movq %rax, {{[-0-9]+}}(%r{{[sb]}}p) # 8-byte Spill11992; O0-NEXT:    movl $1, %ecx11993; O0-NEXT:  .Lpcsection406:11994; O0-NEXT:    lock cmpxchgq %rcx, (%rdi)11995; O0-NEXT:  .Lpcsection407:11996; O0-NEXT:    # kill: def $rdx killed $rax11997; O0-NEXT:    movq {{[-0-9]+}}(%r{{[sb]}}p), %rax # 8-byte Reload11998; O0-NEXT:  .Lpcsection408:11999; O0-NEXT:    lock cmpxchgq %rcx, (%rdi)12000; O0-NEXT:  .Lpcsection409:12001; O0-NEXT:    # kill: def $rdx killed $rax12002; O0-NEXT:    movq {{[-0-9]+}}(%r{{[sb]}}p), %rax # 8-byte Reload12003; O0-NEXT:  .Lpcsection410:12004; O0-NEXT:    lock cmpxchgq %rcx, (%rdi)12005; O0-NEXT:    movq $3, foo12006; O0-NEXT:    retq12007;12008; O1-LABEL: atomic64_cas_seq_cst:12009; O1:       # %bb.0: # %entry12010; O1-NEXT:    movq foo(%rip), %rax12011; O1-NEXT:    movl $1, %ecx12012; O1-NEXT:  .Lpcsection365:12013; O1-NEXT:    movl $42, %eax12014; O1-NEXT:  .Lpcsection366:12015; O1-NEXT:    lock cmpxchgq %rcx, (%rdi)12016; O1-NEXT:  .Lpcsection367:12017; O1-NEXT:    movl $42, %eax12018; O1-NEXT:  .Lpcsection368:12019; O1-NEXT:    lock cmpxchgq %rcx, (%rdi)12020; O1-NEXT:  .Lpcsection369:12021; O1-NEXT:    movl $42, %eax12022; O1-NEXT:  .Lpcsection370:12023; O1-NEXT:    lock cmpxchgq %rcx, (%rdi)12024; O1-NEXT:    movq $3, foo(%rip)12025; O1-NEXT:    retq12026;12027; O2-LABEL: atomic64_cas_seq_cst:12028; O2:       # %bb.0: # %entry12029; O2-NEXT:    movq foo(%rip), %rax12030; O2-NEXT:    movl $1, %ecx12031; O2-NEXT:  .Lpcsection365:12032; O2-NEXT:    movl $42, %eax12033; O2-NEXT:  .Lpcsection366:12034; O2-NEXT:    lock cmpxchgq %rcx, (%rdi)12035; O2-NEXT:  .Lpcsection367:12036; O2-NEXT:    movl $42, %eax12037; O2-NEXT:  .Lpcsection368:12038; O2-NEXT:    lock cmpxchgq %rcx, (%rdi)12039; O2-NEXT:  .Lpcsection369:12040; O2-NEXT:    movl $42, %eax12041; O2-NEXT:  .Lpcsection370:12042; O2-NEXT:    lock cmpxchgq %rcx, (%rdi)12043; O2-NEXT:    movq $3, foo(%rip)12044; O2-NEXT:    retq12045;12046; O3-LABEL: atomic64_cas_seq_cst:12047; O3:       # %bb.0: # %entry12048; O3-NEXT:    movq foo(%rip), %rax12049; O3-NEXT:    movl $1, %ecx12050; O3-NEXT:  .Lpcsection365:12051; O3-NEXT:    movl $42, %eax12052; O3-NEXT:  .Lpcsection366:12053; O3-NEXT:    lock cmpxchgq %rcx, (%rdi)12054; O3-NEXT:  .Lpcsection367:12055; O3-NEXT:    movl $42, %eax12056; O3-NEXT:  .Lpcsection368:12057; O3-NEXT:    lock cmpxchgq %rcx, (%rdi)12058; O3-NEXT:  .Lpcsection369:12059; O3-NEXT:    movl $42, %eax12060; O3-NEXT:  .Lpcsection370:12061; O3-NEXT:    lock cmpxchgq %rcx, (%rdi)12062; O3-NEXT:    movq $3, foo(%rip)12063; O3-NEXT:    retq12064;12065; HASWELL-O3-LABEL: atomic64_cas_seq_cst:12066; HASWELL-O3:       # %bb.0: # %entry12067; HASWELL-O3-NEXT:    movq foo(%rip), %rax12068; HASWELL-O3-NEXT:    movl $1, %ecx12069; HASWELL-O3-NEXT:  .Lpcsection365:12070; HASWELL-O3-NEXT:    movl $42, %eax12071; HASWELL-O3-NEXT:  .Lpcsection366:12072; HASWELL-O3-NEXT:    lock cmpxchgq %rcx, (%rdi)12073; HASWELL-O3-NEXT:  .Lpcsection367:12074; HASWELL-O3-NEXT:    movl $42, %eax12075; HASWELL-O3-NEXT:  .Lpcsection368:12076; HASWELL-O3-NEXT:    lock cmpxchgq %rcx, (%rdi)12077; HASWELL-O3-NEXT:  .Lpcsection369:12078; HASWELL-O3-NEXT:    movl $42, %eax12079; HASWELL-O3-NEXT:  .Lpcsection370:12080; HASWELL-O3-NEXT:    lock cmpxchgq %rcx, (%rdi)12081; HASWELL-O3-NEXT:    movq $3, foo(%rip)12082; HASWELL-O3-NEXT:    retq12083entry:12084  load volatile i64, ptr @foo, align 812085  %x = cmpxchg ptr %a, i64 42, i64 1 seq_cst monotonic, align 8, !pcsections !012086  %y = cmpxchg ptr %a, i64 42, i64 1 seq_cst acquire, align 8, !pcsections !012087  %z = cmpxchg ptr %a, i64 42, i64 1 seq_cst seq_cst, align 8, !pcsections !012088  store volatile i64 3, ptr @foo, align 812089  ret void12090}12091 12092define void @atomic64_cas_seq_cst_ptr_ty(ptr %a, ptr %v1, ptr %v2) {12093; O0-LABEL: atomic64_cas_seq_cst_ptr_ty:12094; O0:       # %bb.0: # %entry12095; O0-NEXT:    movq %rsi, %rax12096; O0-NEXT:    movq foo(%rip), %rcx12097; O0-NEXT:  .Lpcsection411:12098; O0-NEXT:    lock cmpxchgq %rdx, (%rdi)12099; O0-NEXT:    movq $1, foo12100; O0-NEXT:    retq12101;12102; O1-LABEL: atomic64_cas_seq_cst_ptr_ty:12103; O1:       # %bb.0: # %entry12104; O1-NEXT:    movq %rsi, %rax12105; O1-NEXT:    movq foo(%rip), %rcx12106; O1-NEXT:  .Lpcsection371:12107; O1-NEXT:    lock cmpxchgq %rdx, (%rdi)12108; O1-NEXT:    movq $1, foo(%rip)12109; O1-NEXT:    retq12110;12111; O2-LABEL: atomic64_cas_seq_cst_ptr_ty:12112; O2:       # %bb.0: # %entry12113; O2-NEXT:    movq %rsi, %rax12114; O2-NEXT:    movq foo(%rip), %rcx12115; O2-NEXT:  .Lpcsection371:12116; O2-NEXT:    lock cmpxchgq %rdx, (%rdi)12117; O2-NEXT:    movq $1, foo(%rip)12118; O2-NEXT:    retq12119;12120; O3-LABEL: atomic64_cas_seq_cst_ptr_ty:12121; O3:       # %bb.0: # %entry12122; O3-NEXT:    movq %rsi, %rax12123; O3-NEXT:    movq foo(%rip), %rcx12124; O3-NEXT:  .Lpcsection371:12125; O3-NEXT:    lock cmpxchgq %rdx, (%rdi)12126; O3-NEXT:    movq $1, foo(%rip)12127; O3-NEXT:    retq12128;12129; HASWELL-O3-LABEL: atomic64_cas_seq_cst_ptr_ty:12130; HASWELL-O3:       # %bb.0: # %entry12131; HASWELL-O3-NEXT:    movq %rsi, %rax12132; HASWELL-O3-NEXT:    movq foo(%rip), %rcx12133; HASWELL-O3-NEXT:  .Lpcsection371:12134; HASWELL-O3-NEXT:    lock cmpxchgq %rdx, (%rdi)12135; HASWELL-O3-NEXT:    movq $1, foo(%rip)12136; HASWELL-O3-NEXT:    retq12137entry:12138  load volatile i64, ptr @foo, align 812139  %x = cmpxchg ptr %a, ptr %v1, ptr %v2 seq_cst seq_cst, align 8, !pcsections !012140  store volatile i64 1, ptr @foo, align 812141  ret void12142}12143 12144define i64 @atomic_use_cond(ptr %a) {12145; O0-LABEL: atomic_use_cond:12146; O0:       # %bb.0: # %entry12147; O0-NEXT:  .Lpcsection412:12148; O0-NEXT:    lock decq (%rdi)12149; O0-NEXT:  .Lpcsection413:12150; O0-NEXT:    sete %al12151; O0-NEXT:    testb $1, %al12152; O0-NEXT:    je .LBB197_212153; O0-NEXT:  # %bb.1: # %then12154; O0-NEXT:    movl $1, %eax12155; O0-NEXT:    retq12156; O0-NEXT:  .LBB197_2: # %else12157; O0-NEXT:    movl $2, %eax12158; O0-NEXT:    retq12159;12160; O1-LABEL: atomic_use_cond:12161; O1:       # %bb.0: # %entry12162; O1-NEXT:  .Lpcsection372:12163; O1-NEXT:    lock decq (%rdi)12164; O1-NEXT:    jne .LBB197_212165; O1-NEXT:  # %bb.1: # %then12166; O1-NEXT:    movl $1, %eax12167; O1-NEXT:    retq12168; O1-NEXT:  .LBB197_2: # %else12169; O1-NEXT:    movl $2, %eax12170; O1-NEXT:    retq12171;12172; O2-LABEL: atomic_use_cond:12173; O2:       # %bb.0: # %entry12174; O2-NEXT:  .Lpcsection372:12175; O2-NEXT:    lock decq (%rdi)12176; O2-NEXT:    jne .LBB197_212177; O2-NEXT:  # %bb.1: # %then12178; O2-NEXT:    movl $1, %eax12179; O2-NEXT:    retq12180; O2-NEXT:  .LBB197_2: # %else12181; O2-NEXT:    movl $2, %eax12182; O2-NEXT:    retq12183;12184; O3-LABEL: atomic_use_cond:12185; O3:       # %bb.0: # %entry12186; O3-NEXT:  .Lpcsection372:12187; O3-NEXT:    lock decq (%rdi)12188; O3-NEXT:    jne .LBB197_212189; O3-NEXT:  # %bb.1: # %then12190; O3-NEXT:    movl $1, %eax12191; O3-NEXT:    retq12192; O3-NEXT:  .LBB197_2: # %else12193; O3-NEXT:    movl $2, %eax12194; O3-NEXT:    retq12195;12196; HASWELL-O3-LABEL: atomic_use_cond:12197; HASWELL-O3:       # %bb.0: # %entry12198; HASWELL-O3-NEXT:  .Lpcsection372:12199; HASWELL-O3-NEXT:    lock decq (%rdi)12200; HASWELL-O3-NEXT:    jne .LBB197_212201; HASWELL-O3-NEXT:  # %bb.1: # %then12202; HASWELL-O3-NEXT:    movl $1, %eax12203; HASWELL-O3-NEXT:    retq12204; HASWELL-O3-NEXT:  .LBB197_2: # %else12205; HASWELL-O3-NEXT:    movl $2, %eax12206; HASWELL-O3-NEXT:    retq12207entry:12208  %x = atomicrmw sub ptr %a, i64 1 seq_cst, align 8, !pcsections !012209  %y = icmp eq i64 %x, 112210  br i1 %y, label %then, label %else12211 12212then:12213  ret i64 112214 12215else:12216  ret i64 212217}12218 12219define i128 @atomic128_load_unordered(ptr %a) {12220; O0-LABEL: atomic128_load_unordered:12221; O0:       # %bb.0: # %entry12222; O0-NEXT:    pushq %rbx12223; O0-NEXT:    .cfi_def_cfa_offset 1612224; O0-NEXT:    .cfi_offset %rbx, -1612225; O0-NEXT:    movq foo(%rip), %rax12226; O0-NEXT:  .Lpcsection414:12227; O0-NEXT:    xorl %eax, %eax12228; O0-NEXT:    movl %eax, %ebx12229; O0-NEXT:    movq %rbx, %rax12230; O0-NEXT:    movq %rbx, %rdx12231; O0-NEXT:    movq %rbx, %rcx12232; O0-NEXT:  .Lpcsection415:12233; O0-NEXT:    lock cmpxchg16b (%rdi)12234; O0-NEXT:    movq $1, foo(%rip)12235; O0-NEXT:    popq %rbx12236; O0-NEXT:    .cfi_def_cfa_offset 812237; O0-NEXT:    retq12238;12239; O1-LABEL: atomic128_load_unordered:12240; O1:       # %bb.0: # %entry12241; O1-NEXT:    pushq %rbx12242; O1-NEXT:    .cfi_def_cfa_offset 1612243; O1-NEXT:    .cfi_offset %rbx, -1612244; O1-NEXT:    movq foo(%rip), %rax12245; O1-NEXT:  .Lpcsection373:12246; O1-NEXT:    xorl %eax, %eax12247; O1-NEXT:  .Lpcsection374:12248; O1-NEXT:    xorl %edx, %edx12249; O1-NEXT:  .Lpcsection375:12250; O1-NEXT:    xorl %ecx, %ecx12251; O1-NEXT:  .Lpcsection376:12252; O1-NEXT:    xorl %ebx, %ebx12253; O1-NEXT:  .Lpcsection377:12254; O1-NEXT:    lock cmpxchg16b (%rdi)12255; O1-NEXT:    movq $1, foo(%rip)12256; O1-NEXT:    popq %rbx12257; O1-NEXT:    .cfi_def_cfa_offset 812258; O1-NEXT:    retq12259;12260; O2-LABEL: atomic128_load_unordered:12261; O2:       # %bb.0: # %entry12262; O2-NEXT:    pushq %rbx12263; O2-NEXT:    .cfi_def_cfa_offset 1612264; O2-NEXT:    .cfi_offset %rbx, -1612265; O2-NEXT:    movq foo(%rip), %rax12266; O2-NEXT:  .Lpcsection373:12267; O2-NEXT:    xorl %eax, %eax12268; O2-NEXT:  .Lpcsection374:12269; O2-NEXT:    xorl %edx, %edx12270; O2-NEXT:  .Lpcsection375:12271; O2-NEXT:    xorl %ecx, %ecx12272; O2-NEXT:  .Lpcsection376:12273; O2-NEXT:    xorl %ebx, %ebx12274; O2-NEXT:  .Lpcsection377:12275; O2-NEXT:    lock cmpxchg16b (%rdi)12276; O2-NEXT:    movq $1, foo(%rip)12277; O2-NEXT:    popq %rbx12278; O2-NEXT:    .cfi_def_cfa_offset 812279; O2-NEXT:    retq12280;12281; O3-LABEL: atomic128_load_unordered:12282; O3:       # %bb.0: # %entry12283; O3-NEXT:    pushq %rbx12284; O3-NEXT:    .cfi_def_cfa_offset 1612285; O3-NEXT:    .cfi_offset %rbx, -1612286; O3-NEXT:    movq foo(%rip), %rax12287; O3-NEXT:  .Lpcsection373:12288; O3-NEXT:    xorl %eax, %eax12289; O3-NEXT:  .Lpcsection374:12290; O3-NEXT:    xorl %edx, %edx12291; O3-NEXT:  .Lpcsection375:12292; O3-NEXT:    xorl %ecx, %ecx12293; O3-NEXT:  .Lpcsection376:12294; O3-NEXT:    xorl %ebx, %ebx12295; O3-NEXT:  .Lpcsection377:12296; O3-NEXT:    lock cmpxchg16b (%rdi)12297; O3-NEXT:    movq $1, foo(%rip)12298; O3-NEXT:    popq %rbx12299; O3-NEXT:    .cfi_def_cfa_offset 812300; O3-NEXT:    retq12301;12302; HASWELL-O3-LABEL: atomic128_load_unordered:12303; HASWELL-O3:       # %bb.0: # %entry12304; HASWELL-O3-NEXT:    movq foo(%rip), %rax12305; HASWELL-O3-NEXT:  .Lpcsection373:12306; HASWELL-O3-NEXT:    vmovdqa (%rdi), %xmm012307; HASWELL-O3-NEXT:  .Lpcsection374:12308; HASWELL-O3-NEXT:    vmovq %xmm0, %rax12309; HASWELL-O3-NEXT:  .Lpcsection375:12310; HASWELL-O3-NEXT:    vpextrq $1, %xmm0, %rdx12311; HASWELL-O3-NEXT:    movq $1, foo(%rip)12312; HASWELL-O3-NEXT:    retq12313entry:12314  load volatile i64, ptr @foo, align 812315  %x = load atomic i128, ptr %a unordered, align 16, !pcsections !012316  store volatile i64 1, ptr @foo, align 812317  ret i128 %x12318}12319 12320define i128 @atomic128_load_monotonic(ptr %a) {12321; O0-LABEL: atomic128_load_monotonic:12322; O0:       # %bb.0: # %entry12323; O0-NEXT:    pushq %rbx12324; O0-NEXT:    .cfi_def_cfa_offset 1612325; O0-NEXT:    .cfi_offset %rbx, -1612326; O0-NEXT:    movq foo(%rip), %rax12327; O0-NEXT:  .Lpcsection416:12328; O0-NEXT:    xorl %eax, %eax12329; O0-NEXT:    movl %eax, %ebx12330; O0-NEXT:    movq %rbx, %rax12331; O0-NEXT:    movq %rbx, %rdx12332; O0-NEXT:    movq %rbx, %rcx12333; O0-NEXT:  .Lpcsection417:12334; O0-NEXT:    lock cmpxchg16b (%rdi)12335; O0-NEXT:    movq $1, foo(%rip)12336; O0-NEXT:    popq %rbx12337; O0-NEXT:    .cfi_def_cfa_offset 812338; O0-NEXT:    retq12339;12340; O1-LABEL: atomic128_load_monotonic:12341; O1:       # %bb.0: # %entry12342; O1-NEXT:    pushq %rbx12343; O1-NEXT:    .cfi_def_cfa_offset 1612344; O1-NEXT:    .cfi_offset %rbx, -1612345; O1-NEXT:    movq foo(%rip), %rax12346; O1-NEXT:  .Lpcsection378:12347; O1-NEXT:    xorl %eax, %eax12348; O1-NEXT:  .Lpcsection379:12349; O1-NEXT:    xorl %edx, %edx12350; O1-NEXT:  .Lpcsection380:12351; O1-NEXT:    xorl %ecx, %ecx12352; O1-NEXT:  .Lpcsection381:12353; O1-NEXT:    xorl %ebx, %ebx12354; O1-NEXT:  .Lpcsection382:12355; O1-NEXT:    lock cmpxchg16b (%rdi)12356; O1-NEXT:    movq $1, foo(%rip)12357; O1-NEXT:    popq %rbx12358; O1-NEXT:    .cfi_def_cfa_offset 812359; O1-NEXT:    retq12360;12361; O2-LABEL: atomic128_load_monotonic:12362; O2:       # %bb.0: # %entry12363; O2-NEXT:    pushq %rbx12364; O2-NEXT:    .cfi_def_cfa_offset 1612365; O2-NEXT:    .cfi_offset %rbx, -1612366; O2-NEXT:    movq foo(%rip), %rax12367; O2-NEXT:  .Lpcsection378:12368; O2-NEXT:    xorl %eax, %eax12369; O2-NEXT:  .Lpcsection379:12370; O2-NEXT:    xorl %edx, %edx12371; O2-NEXT:  .Lpcsection380:12372; O2-NEXT:    xorl %ecx, %ecx12373; O2-NEXT:  .Lpcsection381:12374; O2-NEXT:    xorl %ebx, %ebx12375; O2-NEXT:  .Lpcsection382:12376; O2-NEXT:    lock cmpxchg16b (%rdi)12377; O2-NEXT:    movq $1, foo(%rip)12378; O2-NEXT:    popq %rbx12379; O2-NEXT:    .cfi_def_cfa_offset 812380; O2-NEXT:    retq12381;12382; O3-LABEL: atomic128_load_monotonic:12383; O3:       # %bb.0: # %entry12384; O3-NEXT:    pushq %rbx12385; O3-NEXT:    .cfi_def_cfa_offset 1612386; O3-NEXT:    .cfi_offset %rbx, -1612387; O3-NEXT:    movq foo(%rip), %rax12388; O3-NEXT:  .Lpcsection378:12389; O3-NEXT:    xorl %eax, %eax12390; O3-NEXT:  .Lpcsection379:12391; O3-NEXT:    xorl %edx, %edx12392; O3-NEXT:  .Lpcsection380:12393; O3-NEXT:    xorl %ecx, %ecx12394; O3-NEXT:  .Lpcsection381:12395; O3-NEXT:    xorl %ebx, %ebx12396; O3-NEXT:  .Lpcsection382:12397; O3-NEXT:    lock cmpxchg16b (%rdi)12398; O3-NEXT:    movq $1, foo(%rip)12399; O3-NEXT:    popq %rbx12400; O3-NEXT:    .cfi_def_cfa_offset 812401; O3-NEXT:    retq12402;12403; HASWELL-O3-LABEL: atomic128_load_monotonic:12404; HASWELL-O3:       # %bb.0: # %entry12405; HASWELL-O3-NEXT:    movq foo(%rip), %rax12406; HASWELL-O3-NEXT:  .Lpcsection376:12407; HASWELL-O3-NEXT:    vmovdqa (%rdi), %xmm012408; HASWELL-O3-NEXT:  .Lpcsection377:12409; HASWELL-O3-NEXT:    vmovq %xmm0, %rax12410; HASWELL-O3-NEXT:  .Lpcsection378:12411; HASWELL-O3-NEXT:    vpextrq $1, %xmm0, %rdx12412; HASWELL-O3-NEXT:    movq $1, foo(%rip)12413; HASWELL-O3-NEXT:    retq12414entry:12415  load volatile i64, ptr @foo, align 812416  %x = load atomic i128, ptr %a monotonic, align 16, !pcsections !012417  store volatile i64 1, ptr @foo, align 812418  ret i128 %x12419}12420 12421define i128 @atomic128_load_acquire(ptr %a) {12422; O0-LABEL: atomic128_load_acquire:12423; O0:       # %bb.0: # %entry12424; O0-NEXT:    pushq %rbx12425; O0-NEXT:    .cfi_def_cfa_offset 1612426; O0-NEXT:    .cfi_offset %rbx, -1612427; O0-NEXT:    movq foo(%rip), %rax12428; O0-NEXT:  .Lpcsection418:12429; O0-NEXT:    xorl %eax, %eax12430; O0-NEXT:    movl %eax, %ebx12431; O0-NEXT:    movq %rbx, %rax12432; O0-NEXT:    movq %rbx, %rdx12433; O0-NEXT:    movq %rbx, %rcx12434; O0-NEXT:  .Lpcsection419:12435; O0-NEXT:    lock cmpxchg16b (%rdi)12436; O0-NEXT:    movq $1, foo(%rip)12437; O0-NEXT:    popq %rbx12438; O0-NEXT:    .cfi_def_cfa_offset 812439; O0-NEXT:    retq12440;12441; O1-LABEL: atomic128_load_acquire:12442; O1:       # %bb.0: # %entry12443; O1-NEXT:    pushq %rbx12444; O1-NEXT:    .cfi_def_cfa_offset 1612445; O1-NEXT:    .cfi_offset %rbx, -1612446; O1-NEXT:    movq foo(%rip), %rax12447; O1-NEXT:  .Lpcsection383:12448; O1-NEXT:    xorl %eax, %eax12449; O1-NEXT:  .Lpcsection384:12450; O1-NEXT:    xorl %edx, %edx12451; O1-NEXT:  .Lpcsection385:12452; O1-NEXT:    xorl %ecx, %ecx12453; O1-NEXT:  .Lpcsection386:12454; O1-NEXT:    xorl %ebx, %ebx12455; O1-NEXT:  .Lpcsection387:12456; O1-NEXT:    lock cmpxchg16b (%rdi)12457; O1-NEXT:    movq $1, foo(%rip)12458; O1-NEXT:    popq %rbx12459; O1-NEXT:    .cfi_def_cfa_offset 812460; O1-NEXT:    retq12461;12462; O2-LABEL: atomic128_load_acquire:12463; O2:       # %bb.0: # %entry12464; O2-NEXT:    pushq %rbx12465; O2-NEXT:    .cfi_def_cfa_offset 1612466; O2-NEXT:    .cfi_offset %rbx, -1612467; O2-NEXT:    movq foo(%rip), %rax12468; O2-NEXT:  .Lpcsection383:12469; O2-NEXT:    xorl %eax, %eax12470; O2-NEXT:  .Lpcsection384:12471; O2-NEXT:    xorl %edx, %edx12472; O2-NEXT:  .Lpcsection385:12473; O2-NEXT:    xorl %ecx, %ecx12474; O2-NEXT:  .Lpcsection386:12475; O2-NEXT:    xorl %ebx, %ebx12476; O2-NEXT:  .Lpcsection387:12477; O2-NEXT:    lock cmpxchg16b (%rdi)12478; O2-NEXT:    movq $1, foo(%rip)12479; O2-NEXT:    popq %rbx12480; O2-NEXT:    .cfi_def_cfa_offset 812481; O2-NEXT:    retq12482;12483; O3-LABEL: atomic128_load_acquire:12484; O3:       # %bb.0: # %entry12485; O3-NEXT:    pushq %rbx12486; O3-NEXT:    .cfi_def_cfa_offset 1612487; O3-NEXT:    .cfi_offset %rbx, -1612488; O3-NEXT:    movq foo(%rip), %rax12489; O3-NEXT:  .Lpcsection383:12490; O3-NEXT:    xorl %eax, %eax12491; O3-NEXT:  .Lpcsection384:12492; O3-NEXT:    xorl %edx, %edx12493; O3-NEXT:  .Lpcsection385:12494; O3-NEXT:    xorl %ecx, %ecx12495; O3-NEXT:  .Lpcsection386:12496; O3-NEXT:    xorl %ebx, %ebx12497; O3-NEXT:  .Lpcsection387:12498; O3-NEXT:    lock cmpxchg16b (%rdi)12499; O3-NEXT:    movq $1, foo(%rip)12500; O3-NEXT:    popq %rbx12501; O3-NEXT:    .cfi_def_cfa_offset 812502; O3-NEXT:    retq12503;12504; HASWELL-O3-LABEL: atomic128_load_acquire:12505; HASWELL-O3:       # %bb.0: # %entry12506; HASWELL-O3-NEXT:    movq foo(%rip), %rax12507; HASWELL-O3-NEXT:  .Lpcsection379:12508; HASWELL-O3-NEXT:    vmovdqa (%rdi), %xmm012509; HASWELL-O3-NEXT:  .Lpcsection380:12510; HASWELL-O3-NEXT:    vmovq %xmm0, %rax12511; HASWELL-O3-NEXT:  .Lpcsection381:12512; HASWELL-O3-NEXT:    vpextrq $1, %xmm0, %rdx12513; HASWELL-O3-NEXT:    movq $1, foo(%rip)12514; HASWELL-O3-NEXT:    retq12515entry:12516  load volatile i64, ptr @foo, align 812517  %x = load atomic i128, ptr %a acquire, align 16, !pcsections !012518  store volatile i64 1, ptr @foo, align 812519  ret i128 %x12520}12521 12522define i128 @atomic128_load_seq_cst(ptr %a) {12523; O0-LABEL: atomic128_load_seq_cst:12524; O0:       # %bb.0: # %entry12525; O0-NEXT:    pushq %rbx12526; O0-NEXT:    .cfi_def_cfa_offset 1612527; O0-NEXT:    .cfi_offset %rbx, -1612528; O0-NEXT:    movq foo(%rip), %rax12529; O0-NEXT:  .Lpcsection420:12530; O0-NEXT:    xorl %eax, %eax12531; O0-NEXT:    movl %eax, %ebx12532; O0-NEXT:    movq %rbx, %rax12533; O0-NEXT:    movq %rbx, %rdx12534; O0-NEXT:    movq %rbx, %rcx12535; O0-NEXT:  .Lpcsection421:12536; O0-NEXT:    lock cmpxchg16b (%rdi)12537; O0-NEXT:    movq $1, foo(%rip)12538; O0-NEXT:    popq %rbx12539; O0-NEXT:    .cfi_def_cfa_offset 812540; O0-NEXT:    retq12541;12542; O1-LABEL: atomic128_load_seq_cst:12543; O1:       # %bb.0: # %entry12544; O1-NEXT:    pushq %rbx12545; O1-NEXT:    .cfi_def_cfa_offset 1612546; O1-NEXT:    .cfi_offset %rbx, -1612547; O1-NEXT:    movq foo(%rip), %rax12548; O1-NEXT:  .Lpcsection388:12549; O1-NEXT:    xorl %eax, %eax12550; O1-NEXT:  .Lpcsection389:12551; O1-NEXT:    xorl %edx, %edx12552; O1-NEXT:  .Lpcsection390:12553; O1-NEXT:    xorl %ecx, %ecx12554; O1-NEXT:  .Lpcsection391:12555; O1-NEXT:    xorl %ebx, %ebx12556; O1-NEXT:  .Lpcsection392:12557; O1-NEXT:    lock cmpxchg16b (%rdi)12558; O1-NEXT:    movq $1, foo(%rip)12559; O1-NEXT:    popq %rbx12560; O1-NEXT:    .cfi_def_cfa_offset 812561; O1-NEXT:    retq12562;12563; O2-LABEL: atomic128_load_seq_cst:12564; O2:       # %bb.0: # %entry12565; O2-NEXT:    pushq %rbx12566; O2-NEXT:    .cfi_def_cfa_offset 1612567; O2-NEXT:    .cfi_offset %rbx, -1612568; O2-NEXT:    movq foo(%rip), %rax12569; O2-NEXT:  .Lpcsection388:12570; O2-NEXT:    xorl %eax, %eax12571; O2-NEXT:  .Lpcsection389:12572; O2-NEXT:    xorl %edx, %edx12573; O2-NEXT:  .Lpcsection390:12574; O2-NEXT:    xorl %ecx, %ecx12575; O2-NEXT:  .Lpcsection391:12576; O2-NEXT:    xorl %ebx, %ebx12577; O2-NEXT:  .Lpcsection392:12578; O2-NEXT:    lock cmpxchg16b (%rdi)12579; O2-NEXT:    movq $1, foo(%rip)12580; O2-NEXT:    popq %rbx12581; O2-NEXT:    .cfi_def_cfa_offset 812582; O2-NEXT:    retq12583;12584; O3-LABEL: atomic128_load_seq_cst:12585; O3:       # %bb.0: # %entry12586; O3-NEXT:    pushq %rbx12587; O3-NEXT:    .cfi_def_cfa_offset 1612588; O3-NEXT:    .cfi_offset %rbx, -1612589; O3-NEXT:    movq foo(%rip), %rax12590; O3-NEXT:  .Lpcsection388:12591; O3-NEXT:    xorl %eax, %eax12592; O3-NEXT:  .Lpcsection389:12593; O3-NEXT:    xorl %edx, %edx12594; O3-NEXT:  .Lpcsection390:12595; O3-NEXT:    xorl %ecx, %ecx12596; O3-NEXT:  .Lpcsection391:12597; O3-NEXT:    xorl %ebx, %ebx12598; O3-NEXT:  .Lpcsection392:12599; O3-NEXT:    lock cmpxchg16b (%rdi)12600; O3-NEXT:    movq $1, foo(%rip)12601; O3-NEXT:    popq %rbx12602; O3-NEXT:    .cfi_def_cfa_offset 812603; O3-NEXT:    retq12604;12605; HASWELL-O3-LABEL: atomic128_load_seq_cst:12606; HASWELL-O3:       # %bb.0: # %entry12607; HASWELL-O3-NEXT:    movq foo(%rip), %rax12608; HASWELL-O3-NEXT:  .Lpcsection382:12609; HASWELL-O3-NEXT:    vmovdqa (%rdi), %xmm012610; HASWELL-O3-NEXT:  .Lpcsection383:12611; HASWELL-O3-NEXT:    vmovq %xmm0, %rax12612; HASWELL-O3-NEXT:  .Lpcsection384:12613; HASWELL-O3-NEXT:    vpextrq $1, %xmm0, %rdx12614; HASWELL-O3-NEXT:    movq $1, foo(%rip)12615; HASWELL-O3-NEXT:    retq12616entry:12617  load volatile i64, ptr @foo, align 812618  %x = load atomic i128, ptr %a seq_cst, align 16, !pcsections !012619  store volatile i64 1, ptr @foo, align 812620  ret i128 %x12621}12622 12623define ptr @atomic128_load_seq_cst_ptr_ty(ptr %a) {12624; O0-LABEL: atomic128_load_seq_cst_ptr_ty:12625; O0:       # %bb.0: # %entry12626; O0-NEXT:    movq foo(%rip), %rax12627; O0-NEXT:  .Lpcsection422:12628; O0-NEXT:    movq (%rdi), %rax12629; O0-NEXT:    movq $1, foo12630; O0-NEXT:    retq12631;12632; O1-LABEL: atomic128_load_seq_cst_ptr_ty:12633; O1:       # %bb.0: # %entry12634; O1-NEXT:    movq foo(%rip), %rax12635; O1-NEXT:  .Lpcsection393:12636; O1-NEXT:    movq (%rdi), %rax12637; O1-NEXT:    movq $1, foo(%rip)12638; O1-NEXT:    retq12639;12640; O2-LABEL: atomic128_load_seq_cst_ptr_ty:12641; O2:       # %bb.0: # %entry12642; O2-NEXT:    movq foo(%rip), %rax12643; O2-NEXT:  .Lpcsection393:12644; O2-NEXT:    movq (%rdi), %rax12645; O2-NEXT:    movq $1, foo(%rip)12646; O2-NEXT:    retq12647;12648; O3-LABEL: atomic128_load_seq_cst_ptr_ty:12649; O3:       # %bb.0: # %entry12650; O3-NEXT:    movq foo(%rip), %rax12651; O3-NEXT:  .Lpcsection393:12652; O3-NEXT:    movq (%rdi), %rax12653; O3-NEXT:    movq $1, foo(%rip)12654; O3-NEXT:    retq12655;12656; HASWELL-O3-LABEL: atomic128_load_seq_cst_ptr_ty:12657; HASWELL-O3:       # %bb.0: # %entry12658; HASWELL-O3-NEXT:    movq foo(%rip), %rax12659; HASWELL-O3-NEXT:  .Lpcsection385:12660; HASWELL-O3-NEXT:    movq (%rdi), %rax12661; HASWELL-O3-NEXT:    movq $1, foo(%rip)12662; HASWELL-O3-NEXT:    retq12663entry:12664  load volatile i64, ptr @foo, align 812665  %x = load atomic ptr, ptr %a seq_cst, align 16, !pcsections !012666  store volatile i64 1, ptr @foo, align 812667  ret ptr %x12668}12669 12670define void @atomic128_store_unordered(ptr %a) {12671; O0-LABEL: atomic128_store_unordered:12672; O0:       # %bb.0: # %entry12673; O0-NEXT:    pushq %rbx12674; O0-NEXT:    .cfi_def_cfa_offset 1612675; O0-NEXT:    .cfi_offset %rbx, -1612676; O0-NEXT:    movq %rdi, {{[-0-9]+}}(%r{{[sb]}}p) # 8-byte Spill12677; O0-NEXT:    movq foo(%rip), %rax12678; O0-NEXT:  .Lpcsection423:12679; O0-NEXT:    movq (%rdi), %rax12680; O0-NEXT:  .Lpcsection424:12681; O0-NEXT:    movq 8(%rdi), %rdx12682; O0-NEXT:    movq %rax, {{[-0-9]+}}(%r{{[sb]}}p) # 8-byte Spill12683; O0-NEXT:    movq %rdx, {{[-0-9]+}}(%r{{[sb]}}p) # 8-byte Spill12684; O0-NEXT:  .Lpcsection425:12685; O0-NEXT:    jmp .LBB203_112686; O0-NEXT:  .LBB203_1: # %atomicrmw.start12687; O0-NEXT:    # =>This Inner Loop Header: Depth=112688; O0-NEXT:    movq {{[-0-9]+}}(%r{{[sb]}}p), %rdx # 8-byte Reload12689; O0-NEXT:    movq {{[-0-9]+}}(%r{{[sb]}}p), %rax # 8-byte Reload12690; O0-NEXT:    movq {{[-0-9]+}}(%r{{[sb]}}p), %rsi # 8-byte Reload12691; O0-NEXT:  .Lpcsection426:12692; O0-NEXT:    xorl %ecx, %ecx12693; O0-NEXT:  .Lpcsection427:12694; O0-NEXT:    # kill: def $rcx killed $ecx12695; O0-NEXT:  .Lpcsection428:12696; O0-NEXT:    movl $42, %ebx12697; O0-NEXT:  .Lpcsection429:12698; O0-NEXT:    lock cmpxchg16b (%rsi)12699; O0-NEXT:    movq %rax, {{[-0-9]+}}(%r{{[sb]}}p) # 8-byte Spill12700; O0-NEXT:    movq %rdx, {{[-0-9]+}}(%r{{[sb]}}p) # 8-byte Spill12701; O0-NEXT:  .Lpcsection430:12702; O0-NEXT:    jne .LBB203_112703; O0-NEXT:    jmp .LBB203_212704; O0-NEXT:  .LBB203_2: # %atomicrmw.end12705; O0-NEXT:    movq $1, foo12706; O0-NEXT:    popq %rbx12707; O0-NEXT:    .cfi_def_cfa_offset 812708; O0-NEXT:    retq12709;12710; O1-LABEL: atomic128_store_unordered:12711; O1:       # %bb.0: # %entry12712; O1-NEXT:    pushq %rbx12713; O1-NEXT:    .cfi_def_cfa_offset 1612714; O1-NEXT:    .cfi_offset %rbx, -1612715; O1-NEXT:    movq foo(%rip), %rax12716; O1-NEXT:  .Lpcsection394:12717; O1-NEXT:    movq (%rdi), %rax12718; O1-NEXT:  .Lpcsection395:12719; O1-NEXT:    movq 8(%rdi), %rdx12720; O1-NEXT:  .Lpcsection396:12721; O1-NEXT:    movl $42, %ebx12722; O1-NEXT:    .p2align 412723; O1-NEXT:  .LBB203_1: # %atomicrmw.start12724; O1-NEXT:    # =>This Inner Loop Header: Depth=112725; O1-NEXT:  .Lpcsection397:12726; O1-NEXT:    xorl %ecx, %ecx12727; O1-NEXT:  .Lpcsection398:12728; O1-NEXT:    lock cmpxchg16b (%rdi)12729; O1-NEXT:  .Lpcsection399:12730; O1-NEXT:    jne .LBB203_112731; O1-NEXT:  # %bb.2: # %atomicrmw.end12732; O1-NEXT:    movq $1, foo(%rip)12733; O1-NEXT:    popq %rbx12734; O1-NEXT:    .cfi_def_cfa_offset 812735; O1-NEXT:    retq12736;12737; O2-LABEL: atomic128_store_unordered:12738; O2:       # %bb.0: # %entry12739; O2-NEXT:    pushq %rbx12740; O2-NEXT:    .cfi_def_cfa_offset 1612741; O2-NEXT:    .cfi_offset %rbx, -1612742; O2-NEXT:    movq foo(%rip), %rax12743; O2-NEXT:  .Lpcsection394:12744; O2-NEXT:    movq (%rdi), %rax12745; O2-NEXT:  .Lpcsection395:12746; O2-NEXT:    movq 8(%rdi), %rdx12747; O2-NEXT:  .Lpcsection396:12748; O2-NEXT:    movl $42, %ebx12749; O2-NEXT:    .p2align 412750; O2-NEXT:  .LBB203_1: # %atomicrmw.start12751; O2-NEXT:    # =>This Inner Loop Header: Depth=112752; O2-NEXT:  .Lpcsection397:12753; O2-NEXT:    xorl %ecx, %ecx12754; O2-NEXT:  .Lpcsection398:12755; O2-NEXT:    lock cmpxchg16b (%rdi)12756; O2-NEXT:  .Lpcsection399:12757; O2-NEXT:    jne .LBB203_112758; O2-NEXT:  # %bb.2: # %atomicrmw.end12759; O2-NEXT:    movq $1, foo(%rip)12760; O2-NEXT:    popq %rbx12761; O2-NEXT:    .cfi_def_cfa_offset 812762; O2-NEXT:    retq12763;12764; O3-LABEL: atomic128_store_unordered:12765; O3:       # %bb.0: # %entry12766; O3-NEXT:    pushq %rbx12767; O3-NEXT:    .cfi_def_cfa_offset 1612768; O3-NEXT:    .cfi_offset %rbx, -1612769; O3-NEXT:    movq foo(%rip), %rax12770; O3-NEXT:  .Lpcsection394:12771; O3-NEXT:    movq (%rdi), %rax12772; O3-NEXT:  .Lpcsection395:12773; O3-NEXT:    movq 8(%rdi), %rdx12774; O3-NEXT:  .Lpcsection396:12775; O3-NEXT:    movl $42, %ebx12776; O3-NEXT:    .p2align 412777; O3-NEXT:  .LBB203_1: # %atomicrmw.start12778; O3-NEXT:    # =>This Inner Loop Header: Depth=112779; O3-NEXT:  .Lpcsection397:12780; O3-NEXT:    xorl %ecx, %ecx12781; O3-NEXT:  .Lpcsection398:12782; O3-NEXT:    lock cmpxchg16b (%rdi)12783; O3-NEXT:  .Lpcsection399:12784; O3-NEXT:    jne .LBB203_112785; O3-NEXT:  # %bb.2: # %atomicrmw.end12786; O3-NEXT:    movq $1, foo(%rip)12787; O3-NEXT:    popq %rbx12788; O3-NEXT:    .cfi_def_cfa_offset 812789; O3-NEXT:    retq12790;12791; HASWELL-O3-LABEL: atomic128_store_unordered:12792; HASWELL-O3:       # %bb.0: # %entry12793; HASWELL-O3-NEXT:    movq foo(%rip), %rax12794; HASWELL-O3-NEXT:  .Lpcsection386:12795; HASWELL-O3-NEXT:    vmovss {{.*#+}} xmm0 = [42,0,0,0]12796; HASWELL-O3-NEXT:  .Lpcsection387:12797; HASWELL-O3-NEXT:    vmovaps %xmm0, (%rdi)12798; HASWELL-O3-NEXT:    movq $1, foo(%rip)12799; HASWELL-O3-NEXT:    retq12800entry:12801  load volatile i64, ptr @foo, align 812802  store atomic i128 42, ptr %a unordered, align 16, !pcsections !012803  store volatile i64 1, ptr @foo, align 812804  ret void12805}12806 12807define void @atomic128_store_monotonic(ptr %a) {12808; O0-LABEL: atomic128_store_monotonic:12809; O0:       # %bb.0: # %entry12810; O0-NEXT:    pushq %rbx12811; O0-NEXT:    .cfi_def_cfa_offset 1612812; O0-NEXT:    .cfi_offset %rbx, -1612813; O0-NEXT:    movq %rdi, {{[-0-9]+}}(%r{{[sb]}}p) # 8-byte Spill12814; O0-NEXT:    movq foo(%rip), %rax12815; O0-NEXT:  .Lpcsection431:12816; O0-NEXT:    movq (%rdi), %rax12817; O0-NEXT:  .Lpcsection432:12818; O0-NEXT:    movq 8(%rdi), %rdx12819; O0-NEXT:    movq %rax, {{[-0-9]+}}(%r{{[sb]}}p) # 8-byte Spill12820; O0-NEXT:    movq %rdx, {{[-0-9]+}}(%r{{[sb]}}p) # 8-byte Spill12821; O0-NEXT:  .Lpcsection433:12822; O0-NEXT:    jmp .LBB204_112823; O0-NEXT:  .LBB204_1: # %atomicrmw.start12824; O0-NEXT:    # =>This Inner Loop Header: Depth=112825; O0-NEXT:    movq {{[-0-9]+}}(%r{{[sb]}}p), %rdx # 8-byte Reload12826; O0-NEXT:    movq {{[-0-9]+}}(%r{{[sb]}}p), %rax # 8-byte Reload12827; O0-NEXT:    movq {{[-0-9]+}}(%r{{[sb]}}p), %rsi # 8-byte Reload12828; O0-NEXT:  .Lpcsection434:12829; O0-NEXT:    xorl %ecx, %ecx12830; O0-NEXT:  .Lpcsection435:12831; O0-NEXT:    # kill: def $rcx killed $ecx12832; O0-NEXT:  .Lpcsection436:12833; O0-NEXT:    movl $42, %ebx12834; O0-NEXT:  .Lpcsection437:12835; O0-NEXT:    lock cmpxchg16b (%rsi)12836; O0-NEXT:    movq %rax, {{[-0-9]+}}(%r{{[sb]}}p) # 8-byte Spill12837; O0-NEXT:    movq %rdx, {{[-0-9]+}}(%r{{[sb]}}p) # 8-byte Spill12838; O0-NEXT:  .Lpcsection438:12839; O0-NEXT:    jne .LBB204_112840; O0-NEXT:    jmp .LBB204_212841; O0-NEXT:  .LBB204_2: # %atomicrmw.end12842; O0-NEXT:    movq $1, foo12843; O0-NEXT:    popq %rbx12844; O0-NEXT:    .cfi_def_cfa_offset 812845; O0-NEXT:    retq12846;12847; O1-LABEL: atomic128_store_monotonic:12848; O1:       # %bb.0: # %entry12849; O1-NEXT:    pushq %rbx12850; O1-NEXT:    .cfi_def_cfa_offset 1612851; O1-NEXT:    .cfi_offset %rbx, -1612852; O1-NEXT:    movq foo(%rip), %rax12853; O1-NEXT:  .Lpcsection400:12854; O1-NEXT:    movq (%rdi), %rax12855; O1-NEXT:  .Lpcsection401:12856; O1-NEXT:    movq 8(%rdi), %rdx12857; O1-NEXT:  .Lpcsection402:12858; O1-NEXT:    movl $42, %ebx12859; O1-NEXT:    .p2align 412860; O1-NEXT:  .LBB204_1: # %atomicrmw.start12861; O1-NEXT:    # =>This Inner Loop Header: Depth=112862; O1-NEXT:  .Lpcsection403:12863; O1-NEXT:    xorl %ecx, %ecx12864; O1-NEXT:  .Lpcsection404:12865; O1-NEXT:    lock cmpxchg16b (%rdi)12866; O1-NEXT:  .Lpcsection405:12867; O1-NEXT:    jne .LBB204_112868; O1-NEXT:  # %bb.2: # %atomicrmw.end12869; O1-NEXT:    movq $1, foo(%rip)12870; O1-NEXT:    popq %rbx12871; O1-NEXT:    .cfi_def_cfa_offset 812872; O1-NEXT:    retq12873;12874; O2-LABEL: atomic128_store_monotonic:12875; O2:       # %bb.0: # %entry12876; O2-NEXT:    pushq %rbx12877; O2-NEXT:    .cfi_def_cfa_offset 1612878; O2-NEXT:    .cfi_offset %rbx, -1612879; O2-NEXT:    movq foo(%rip), %rax12880; O2-NEXT:  .Lpcsection400:12881; O2-NEXT:    movq (%rdi), %rax12882; O2-NEXT:  .Lpcsection401:12883; O2-NEXT:    movq 8(%rdi), %rdx12884; O2-NEXT:  .Lpcsection402:12885; O2-NEXT:    movl $42, %ebx12886; O2-NEXT:    .p2align 412887; O2-NEXT:  .LBB204_1: # %atomicrmw.start12888; O2-NEXT:    # =>This Inner Loop Header: Depth=112889; O2-NEXT:  .Lpcsection403:12890; O2-NEXT:    xorl %ecx, %ecx12891; O2-NEXT:  .Lpcsection404:12892; O2-NEXT:    lock cmpxchg16b (%rdi)12893; O2-NEXT:  .Lpcsection405:12894; O2-NEXT:    jne .LBB204_112895; O2-NEXT:  # %bb.2: # %atomicrmw.end12896; O2-NEXT:    movq $1, foo(%rip)12897; O2-NEXT:    popq %rbx12898; O2-NEXT:    .cfi_def_cfa_offset 812899; O2-NEXT:    retq12900;12901; O3-LABEL: atomic128_store_monotonic:12902; O3:       # %bb.0: # %entry12903; O3-NEXT:    pushq %rbx12904; O3-NEXT:    .cfi_def_cfa_offset 1612905; O3-NEXT:    .cfi_offset %rbx, -1612906; O3-NEXT:    movq foo(%rip), %rax12907; O3-NEXT:  .Lpcsection400:12908; O3-NEXT:    movq (%rdi), %rax12909; O3-NEXT:  .Lpcsection401:12910; O3-NEXT:    movq 8(%rdi), %rdx12911; O3-NEXT:  .Lpcsection402:12912; O3-NEXT:    movl $42, %ebx12913; O3-NEXT:    .p2align 412914; O3-NEXT:  .LBB204_1: # %atomicrmw.start12915; O3-NEXT:    # =>This Inner Loop Header: Depth=112916; O3-NEXT:  .Lpcsection403:12917; O3-NEXT:    xorl %ecx, %ecx12918; O3-NEXT:  .Lpcsection404:12919; O3-NEXT:    lock cmpxchg16b (%rdi)12920; O3-NEXT:  .Lpcsection405:12921; O3-NEXT:    jne .LBB204_112922; O3-NEXT:  # %bb.2: # %atomicrmw.end12923; O3-NEXT:    movq $1, foo(%rip)12924; O3-NEXT:    popq %rbx12925; O3-NEXT:    .cfi_def_cfa_offset 812926; O3-NEXT:    retq12927;12928; HASWELL-O3-LABEL: atomic128_store_monotonic:12929; HASWELL-O3:       # %bb.0: # %entry12930; HASWELL-O3-NEXT:    movq foo(%rip), %rax12931; HASWELL-O3-NEXT:  .Lpcsection388:12932; HASWELL-O3-NEXT:    vmovss {{.*#+}} xmm0 = [42,0,0,0]12933; HASWELL-O3-NEXT:  .Lpcsection389:12934; HASWELL-O3-NEXT:    vmovaps %xmm0, (%rdi)12935; HASWELL-O3-NEXT:    movq $1, foo(%rip)12936; HASWELL-O3-NEXT:    retq12937entry:12938  load volatile i64, ptr @foo, align 812939  store atomic i128 42, ptr %a monotonic, align 16, !pcsections !012940  store volatile i64 1, ptr @foo, align 812941  ret void12942}12943 12944define void @atomic128_store_release(ptr %a) {12945; O0-LABEL: atomic128_store_release:12946; O0:       # %bb.0: # %entry12947; O0-NEXT:    pushq %rbx12948; O0-NEXT:    .cfi_def_cfa_offset 1612949; O0-NEXT:    .cfi_offset %rbx, -1612950; O0-NEXT:    movq %rdi, {{[-0-9]+}}(%r{{[sb]}}p) # 8-byte Spill12951; O0-NEXT:    movq foo(%rip), %rax12952; O0-NEXT:  .Lpcsection439:12953; O0-NEXT:    movq (%rdi), %rax12954; O0-NEXT:  .Lpcsection440:12955; O0-NEXT:    movq 8(%rdi), %rdx12956; O0-NEXT:    movq %rax, {{[-0-9]+}}(%r{{[sb]}}p) # 8-byte Spill12957; O0-NEXT:    movq %rdx, {{[-0-9]+}}(%r{{[sb]}}p) # 8-byte Spill12958; O0-NEXT:  .Lpcsection441:12959; O0-NEXT:    jmp .LBB205_112960; O0-NEXT:  .LBB205_1: # %atomicrmw.start12961; O0-NEXT:    # =>This Inner Loop Header: Depth=112962; O0-NEXT:    movq {{[-0-9]+}}(%r{{[sb]}}p), %rdx # 8-byte Reload12963; O0-NEXT:    movq {{[-0-9]+}}(%r{{[sb]}}p), %rax # 8-byte Reload12964; O0-NEXT:    movq {{[-0-9]+}}(%r{{[sb]}}p), %rsi # 8-byte Reload12965; O0-NEXT:  .Lpcsection442:12966; O0-NEXT:    xorl %ecx, %ecx12967; O0-NEXT:  .Lpcsection443:12968; O0-NEXT:    # kill: def $rcx killed $ecx12969; O0-NEXT:  .Lpcsection444:12970; O0-NEXT:    movl $42, %ebx12971; O0-NEXT:  .Lpcsection445:12972; O0-NEXT:    lock cmpxchg16b (%rsi)12973; O0-NEXT:    movq %rax, {{[-0-9]+}}(%r{{[sb]}}p) # 8-byte Spill12974; O0-NEXT:    movq %rdx, {{[-0-9]+}}(%r{{[sb]}}p) # 8-byte Spill12975; O0-NEXT:  .Lpcsection446:12976; O0-NEXT:    jne .LBB205_112977; O0-NEXT:    jmp .LBB205_212978; O0-NEXT:  .LBB205_2: # %atomicrmw.end12979; O0-NEXT:    movq $1, foo12980; O0-NEXT:    popq %rbx12981; O0-NEXT:    .cfi_def_cfa_offset 812982; O0-NEXT:    retq12983;12984; O1-LABEL: atomic128_store_release:12985; O1:       # %bb.0: # %entry12986; O1-NEXT:    pushq %rbx12987; O1-NEXT:    .cfi_def_cfa_offset 1612988; O1-NEXT:    .cfi_offset %rbx, -1612989; O1-NEXT:    movq foo(%rip), %rax12990; O1-NEXT:  .Lpcsection406:12991; O1-NEXT:    movq (%rdi), %rax12992; O1-NEXT:  .Lpcsection407:12993; O1-NEXT:    movq 8(%rdi), %rdx12994; O1-NEXT:  .Lpcsection408:12995; O1-NEXT:    movl $42, %ebx12996; O1-NEXT:    .p2align 412997; O1-NEXT:  .LBB205_1: # %atomicrmw.start12998; O1-NEXT:    # =>This Inner Loop Header: Depth=112999; O1-NEXT:  .Lpcsection409:13000; O1-NEXT:    xorl %ecx, %ecx13001; O1-NEXT:  .Lpcsection410:13002; O1-NEXT:    lock cmpxchg16b (%rdi)13003; O1-NEXT:  .Lpcsection411:13004; O1-NEXT:    jne .LBB205_113005; O1-NEXT:  # %bb.2: # %atomicrmw.end13006; O1-NEXT:    movq $1, foo(%rip)13007; O1-NEXT:    popq %rbx13008; O1-NEXT:    .cfi_def_cfa_offset 813009; O1-NEXT:    retq13010;13011; O2-LABEL: atomic128_store_release:13012; O2:       # %bb.0: # %entry13013; O2-NEXT:    pushq %rbx13014; O2-NEXT:    .cfi_def_cfa_offset 1613015; O2-NEXT:    .cfi_offset %rbx, -1613016; O2-NEXT:    movq foo(%rip), %rax13017; O2-NEXT:  .Lpcsection406:13018; O2-NEXT:    movq (%rdi), %rax13019; O2-NEXT:  .Lpcsection407:13020; O2-NEXT:    movq 8(%rdi), %rdx13021; O2-NEXT:  .Lpcsection408:13022; O2-NEXT:    movl $42, %ebx13023; O2-NEXT:    .p2align 413024; O2-NEXT:  .LBB205_1: # %atomicrmw.start13025; O2-NEXT:    # =>This Inner Loop Header: Depth=113026; O2-NEXT:  .Lpcsection409:13027; O2-NEXT:    xorl %ecx, %ecx13028; O2-NEXT:  .Lpcsection410:13029; O2-NEXT:    lock cmpxchg16b (%rdi)13030; O2-NEXT:  .Lpcsection411:13031; O2-NEXT:    jne .LBB205_113032; O2-NEXT:  # %bb.2: # %atomicrmw.end13033; O2-NEXT:    movq $1, foo(%rip)13034; O2-NEXT:    popq %rbx13035; O2-NEXT:    .cfi_def_cfa_offset 813036; O2-NEXT:    retq13037;13038; O3-LABEL: atomic128_store_release:13039; O3:       # %bb.0: # %entry13040; O3-NEXT:    pushq %rbx13041; O3-NEXT:    .cfi_def_cfa_offset 1613042; O3-NEXT:    .cfi_offset %rbx, -1613043; O3-NEXT:    movq foo(%rip), %rax13044; O3-NEXT:  .Lpcsection406:13045; O3-NEXT:    movq (%rdi), %rax13046; O3-NEXT:  .Lpcsection407:13047; O3-NEXT:    movq 8(%rdi), %rdx13048; O3-NEXT:  .Lpcsection408:13049; O3-NEXT:    movl $42, %ebx13050; O3-NEXT:    .p2align 413051; O3-NEXT:  .LBB205_1: # %atomicrmw.start13052; O3-NEXT:    # =>This Inner Loop Header: Depth=113053; O3-NEXT:  .Lpcsection409:13054; O3-NEXT:    xorl %ecx, %ecx13055; O3-NEXT:  .Lpcsection410:13056; O3-NEXT:    lock cmpxchg16b (%rdi)13057; O3-NEXT:  .Lpcsection411:13058; O3-NEXT:    jne .LBB205_113059; O3-NEXT:  # %bb.2: # %atomicrmw.end13060; O3-NEXT:    movq $1, foo(%rip)13061; O3-NEXT:    popq %rbx13062; O3-NEXT:    .cfi_def_cfa_offset 813063; O3-NEXT:    retq13064;13065; HASWELL-O3-LABEL: atomic128_store_release:13066; HASWELL-O3:       # %bb.0: # %entry13067; HASWELL-O3-NEXT:    movq foo(%rip), %rax13068; HASWELL-O3-NEXT:  .Lpcsection390:13069; HASWELL-O3-NEXT:    vmovss {{.*#+}} xmm0 = [42,0,0,0]13070; HASWELL-O3-NEXT:  .Lpcsection391:13071; HASWELL-O3-NEXT:    vmovaps %xmm0, (%rdi)13072; HASWELL-O3-NEXT:    movq $1, foo(%rip)13073; HASWELL-O3-NEXT:    retq13074entry:13075  load volatile i64, ptr @foo, align 813076  store atomic i128 42, ptr %a release, align 16, !pcsections !013077  store volatile i64 1, ptr @foo, align 813078  ret void13079}13080 13081define void @atomic128_store_seq_cst(ptr %a) {13082; O0-LABEL: atomic128_store_seq_cst:13083; O0:       # %bb.0: # %entry13084; O0-NEXT:    pushq %rbx13085; O0-NEXT:    .cfi_def_cfa_offset 1613086; O0-NEXT:    .cfi_offset %rbx, -1613087; O0-NEXT:    movq %rdi, {{[-0-9]+}}(%r{{[sb]}}p) # 8-byte Spill13088; O0-NEXT:    movq foo(%rip), %rax13089; O0-NEXT:  .Lpcsection447:13090; O0-NEXT:    movq (%rdi), %rax13091; O0-NEXT:  .Lpcsection448:13092; O0-NEXT:    movq 8(%rdi), %rdx13093; O0-NEXT:    movq %rax, {{[-0-9]+}}(%r{{[sb]}}p) # 8-byte Spill13094; O0-NEXT:    movq %rdx, {{[-0-9]+}}(%r{{[sb]}}p) # 8-byte Spill13095; O0-NEXT:  .Lpcsection449:13096; O0-NEXT:    jmp .LBB206_113097; O0-NEXT:  .LBB206_1: # %atomicrmw.start13098; O0-NEXT:    # =>This Inner Loop Header: Depth=113099; O0-NEXT:    movq {{[-0-9]+}}(%r{{[sb]}}p), %rdx # 8-byte Reload13100; O0-NEXT:    movq {{[-0-9]+}}(%r{{[sb]}}p), %rax # 8-byte Reload13101; O0-NEXT:    movq {{[-0-9]+}}(%r{{[sb]}}p), %rsi # 8-byte Reload13102; O0-NEXT:  .Lpcsection450:13103; O0-NEXT:    xorl %ecx, %ecx13104; O0-NEXT:  .Lpcsection451:13105; O0-NEXT:    # kill: def $rcx killed $ecx13106; O0-NEXT:  .Lpcsection452:13107; O0-NEXT:    movl $42, %ebx13108; O0-NEXT:  .Lpcsection453:13109; O0-NEXT:    lock cmpxchg16b (%rsi)13110; O0-NEXT:    movq %rax, {{[-0-9]+}}(%r{{[sb]}}p) # 8-byte Spill13111; O0-NEXT:    movq %rdx, {{[-0-9]+}}(%r{{[sb]}}p) # 8-byte Spill13112; O0-NEXT:  .Lpcsection454:13113; O0-NEXT:    jne .LBB206_113114; O0-NEXT:    jmp .LBB206_213115; O0-NEXT:  .LBB206_2: # %atomicrmw.end13116; O0-NEXT:    movq $1, foo13117; O0-NEXT:    popq %rbx13118; O0-NEXT:    .cfi_def_cfa_offset 813119; O0-NEXT:    retq13120;13121; O1-LABEL: atomic128_store_seq_cst:13122; O1:       # %bb.0: # %entry13123; O1-NEXT:    pushq %rbx13124; O1-NEXT:    .cfi_def_cfa_offset 1613125; O1-NEXT:    .cfi_offset %rbx, -1613126; O1-NEXT:    movq foo(%rip), %rax13127; O1-NEXT:  .Lpcsection412:13128; O1-NEXT:    movq (%rdi), %rax13129; O1-NEXT:  .Lpcsection413:13130; O1-NEXT:    movq 8(%rdi), %rdx13131; O1-NEXT:  .Lpcsection414:13132; O1-NEXT:    movl $42, %ebx13133; O1-NEXT:    .p2align 413134; O1-NEXT:  .LBB206_1: # %atomicrmw.start13135; O1-NEXT:    # =>This Inner Loop Header: Depth=113136; O1-NEXT:  .Lpcsection415:13137; O1-NEXT:    xorl %ecx, %ecx13138; O1-NEXT:  .Lpcsection416:13139; O1-NEXT:    lock cmpxchg16b (%rdi)13140; O1-NEXT:  .Lpcsection417:13141; O1-NEXT:    jne .LBB206_113142; O1-NEXT:  # %bb.2: # %atomicrmw.end13143; O1-NEXT:    movq $1, foo(%rip)13144; O1-NEXT:    popq %rbx13145; O1-NEXT:    .cfi_def_cfa_offset 813146; O1-NEXT:    retq13147;13148; O2-LABEL: atomic128_store_seq_cst:13149; O2:       # %bb.0: # %entry13150; O2-NEXT:    pushq %rbx13151; O2-NEXT:    .cfi_def_cfa_offset 1613152; O2-NEXT:    .cfi_offset %rbx, -1613153; O2-NEXT:    movq foo(%rip), %rax13154; O2-NEXT:  .Lpcsection412:13155; O2-NEXT:    movq (%rdi), %rax13156; O2-NEXT:  .Lpcsection413:13157; O2-NEXT:    movq 8(%rdi), %rdx13158; O2-NEXT:  .Lpcsection414:13159; O2-NEXT:    movl $42, %ebx13160; O2-NEXT:    .p2align 413161; O2-NEXT:  .LBB206_1: # %atomicrmw.start13162; O2-NEXT:    # =>This Inner Loop Header: Depth=113163; O2-NEXT:  .Lpcsection415:13164; O2-NEXT:    xorl %ecx, %ecx13165; O2-NEXT:  .Lpcsection416:13166; O2-NEXT:    lock cmpxchg16b (%rdi)13167; O2-NEXT:  .Lpcsection417:13168; O2-NEXT:    jne .LBB206_113169; O2-NEXT:  # %bb.2: # %atomicrmw.end13170; O2-NEXT:    movq $1, foo(%rip)13171; O2-NEXT:    popq %rbx13172; O2-NEXT:    .cfi_def_cfa_offset 813173; O2-NEXT:    retq13174;13175; O3-LABEL: atomic128_store_seq_cst:13176; O3:       # %bb.0: # %entry13177; O3-NEXT:    pushq %rbx13178; O3-NEXT:    .cfi_def_cfa_offset 1613179; O3-NEXT:    .cfi_offset %rbx, -1613180; O3-NEXT:    movq foo(%rip), %rax13181; O3-NEXT:  .Lpcsection412:13182; O3-NEXT:    movq (%rdi), %rax13183; O3-NEXT:  .Lpcsection413:13184; O3-NEXT:    movq 8(%rdi), %rdx13185; O3-NEXT:  .Lpcsection414:13186; O3-NEXT:    movl $42, %ebx13187; O3-NEXT:    .p2align 413188; O3-NEXT:  .LBB206_1: # %atomicrmw.start13189; O3-NEXT:    # =>This Inner Loop Header: Depth=113190; O3-NEXT:  .Lpcsection415:13191; O3-NEXT:    xorl %ecx, %ecx13192; O3-NEXT:  .Lpcsection416:13193; O3-NEXT:    lock cmpxchg16b (%rdi)13194; O3-NEXT:  .Lpcsection417:13195; O3-NEXT:    jne .LBB206_113196; O3-NEXT:  # %bb.2: # %atomicrmw.end13197; O3-NEXT:    movq $1, foo(%rip)13198; O3-NEXT:    popq %rbx13199; O3-NEXT:    .cfi_def_cfa_offset 813200; O3-NEXT:    retq13201;13202; HASWELL-O3-LABEL: atomic128_store_seq_cst:13203; HASWELL-O3:       # %bb.0: # %entry13204; HASWELL-O3-NEXT:    movq foo(%rip), %rax13205; HASWELL-O3-NEXT:  .Lpcsection392:13206; HASWELL-O3-NEXT:    vmovss {{.*#+}} xmm0 = [42,0,0,0]13207; HASWELL-O3-NEXT:  .Lpcsection393:13208; HASWELL-O3-NEXT:    vmovaps %xmm0, (%rdi)13209; HASWELL-O3-NEXT:  .Lpcsection394:13210; HASWELL-O3-NEXT:    lock orl $0, -{{[0-9]+}}(%rsp)13211; HASWELL-O3-NEXT:    movq $1, foo(%rip)13212; HASWELL-O3-NEXT:    retq13213entry:13214  load volatile i64, ptr @foo, align 813215  store atomic i128 42, ptr %a seq_cst, align 16, !pcsections !013216  store volatile i64 1, ptr @foo, align 813217  ret void13218}13219 13220define void @atomic128_store_seq_cst_ptr_ty(ptr %a, ptr %v) {13221; O0-LABEL: atomic128_store_seq_cst_ptr_ty:13222; O0:       # %bb.0: # %entry13223; O0-NEXT:    movq foo(%rip), %rax13224; O0-NEXT:  .Lpcsection455:13225; O0-NEXT:    xchgq %rsi, (%rdi)13226; O0-NEXT:    movq $1, foo13227; O0-NEXT:    retq13228;13229; O1-LABEL: atomic128_store_seq_cst_ptr_ty:13230; O1:       # %bb.0: # %entry13231; O1-NEXT:    movq foo(%rip), %rax13232; O1-NEXT:  .Lpcsection418:13233; O1-NEXT:    xchgq %rsi, (%rdi)13234; O1-NEXT:    movq $1, foo(%rip)13235; O1-NEXT:    retq13236;13237; O2-LABEL: atomic128_store_seq_cst_ptr_ty:13238; O2:       # %bb.0: # %entry13239; O2-NEXT:    movq foo(%rip), %rax13240; O2-NEXT:  .Lpcsection418:13241; O2-NEXT:    xchgq %rsi, (%rdi)13242; O2-NEXT:    movq $1, foo(%rip)13243; O2-NEXT:    retq13244;13245; O3-LABEL: atomic128_store_seq_cst_ptr_ty:13246; O3:       # %bb.0: # %entry13247; O3-NEXT:    movq foo(%rip), %rax13248; O3-NEXT:  .Lpcsection418:13249; O3-NEXT:    xchgq %rsi, (%rdi)13250; O3-NEXT:    movq $1, foo(%rip)13251; O3-NEXT:    retq13252;13253; HASWELL-O3-LABEL: atomic128_store_seq_cst_ptr_ty:13254; HASWELL-O3:       # %bb.0: # %entry13255; HASWELL-O3-NEXT:    movq foo(%rip), %rax13256; HASWELL-O3-NEXT:  .Lpcsection395:13257; HASWELL-O3-NEXT:    xchgq %rsi, (%rdi)13258; HASWELL-O3-NEXT:    movq $1, foo(%rip)13259; HASWELL-O3-NEXT:    retq13260entry:13261  load volatile i64, ptr @foo, align 813262  store atomic ptr %v, ptr %a seq_cst, align 16, !pcsections !013263  store volatile i64 1, ptr @foo, align 813264  ret void13265}13266 13267define void @atomic128_xchg_monotonic(ptr %a) {13268; O0-LABEL: atomic128_xchg_monotonic:13269; O0:       # %bb.0: # %entry13270; O0-NEXT:    pushq %rbx13271; O0-NEXT:    .cfi_def_cfa_offset 1613272; O0-NEXT:    .cfi_offset %rbx, -1613273; O0-NEXT:    movq %rdi, {{[-0-9]+}}(%r{{[sb]}}p) # 8-byte Spill13274; O0-NEXT:    movq foo(%rip), %rax13275; O0-NEXT:  .Lpcsection456:13276; O0-NEXT:    movq (%rdi), %rax13277; O0-NEXT:  .Lpcsection457:13278; O0-NEXT:    movq 8(%rdi), %rdx13279; O0-NEXT:    movq %rax, {{[-0-9]+}}(%r{{[sb]}}p) # 8-byte Spill13280; O0-NEXT:    movq %rdx, {{[-0-9]+}}(%r{{[sb]}}p) # 8-byte Spill13281; O0-NEXT:  .Lpcsection458:13282; O0-NEXT:    jmp .LBB208_113283; O0-NEXT:  .LBB208_1: # %atomicrmw.start13284; O0-NEXT:    # =>This Inner Loop Header: Depth=113285; O0-NEXT:    movq {{[-0-9]+}}(%r{{[sb]}}p), %rdx # 8-byte Reload13286; O0-NEXT:    movq {{[-0-9]+}}(%r{{[sb]}}p), %rax # 8-byte Reload13287; O0-NEXT:    movq {{[-0-9]+}}(%r{{[sb]}}p), %rsi # 8-byte Reload13288; O0-NEXT:  .Lpcsection459:13289; O0-NEXT:    xorl %ecx, %ecx13290; O0-NEXT:  .Lpcsection460:13291; O0-NEXT:    # kill: def $rcx killed $ecx13292; O0-NEXT:  .Lpcsection461:13293; O0-NEXT:    movl $42, %ebx13294; O0-NEXT:  .Lpcsection462:13295; O0-NEXT:    lock cmpxchg16b (%rsi)13296; O0-NEXT:    movq %rax, {{[-0-9]+}}(%r{{[sb]}}p) # 8-byte Spill13297; O0-NEXT:    movq %rdx, {{[-0-9]+}}(%r{{[sb]}}p) # 8-byte Spill13298; O0-NEXT:  .Lpcsection463:13299; O0-NEXT:    jne .LBB208_113300; O0-NEXT:    jmp .LBB208_213301; O0-NEXT:  .LBB208_2: # %atomicrmw.end13302; O0-NEXT:    movq $1, foo13303; O0-NEXT:    popq %rbx13304; O0-NEXT:    .cfi_def_cfa_offset 813305; O0-NEXT:    retq13306;13307; O1-LABEL: atomic128_xchg_monotonic:13308; O1:       # %bb.0: # %entry13309; O1-NEXT:    pushq %rbx13310; O1-NEXT:    .cfi_def_cfa_offset 1613311; O1-NEXT:    .cfi_offset %rbx, -1613312; O1-NEXT:    movq foo(%rip), %rax13313; O1-NEXT:  .Lpcsection419:13314; O1-NEXT:    movq (%rdi), %rax13315; O1-NEXT:  .Lpcsection420:13316; O1-NEXT:    movq 8(%rdi), %rdx13317; O1-NEXT:  .Lpcsection421:13318; O1-NEXT:    movl $42, %ebx13319; O1-NEXT:    .p2align 413320; O1-NEXT:  .LBB208_1: # %atomicrmw.start13321; O1-NEXT:    # =>This Inner Loop Header: Depth=113322; O1-NEXT:  .Lpcsection422:13323; O1-NEXT:    xorl %ecx, %ecx13324; O1-NEXT:  .Lpcsection423:13325; O1-NEXT:    lock cmpxchg16b (%rdi)13326; O1-NEXT:  .Lpcsection424:13327; O1-NEXT:    jne .LBB208_113328; O1-NEXT:  # %bb.2: # %atomicrmw.end13329; O1-NEXT:    movq $1, foo(%rip)13330; O1-NEXT:    popq %rbx13331; O1-NEXT:    .cfi_def_cfa_offset 813332; O1-NEXT:    retq13333;13334; O2-LABEL: atomic128_xchg_monotonic:13335; O2:       # %bb.0: # %entry13336; O2-NEXT:    pushq %rbx13337; O2-NEXT:    .cfi_def_cfa_offset 1613338; O2-NEXT:    .cfi_offset %rbx, -1613339; O2-NEXT:    movq foo(%rip), %rax13340; O2-NEXT:  .Lpcsection419:13341; O2-NEXT:    movq (%rdi), %rax13342; O2-NEXT:  .Lpcsection420:13343; O2-NEXT:    movq 8(%rdi), %rdx13344; O2-NEXT:  .Lpcsection421:13345; O2-NEXT:    movl $42, %ebx13346; O2-NEXT:    .p2align 413347; O2-NEXT:  .LBB208_1: # %atomicrmw.start13348; O2-NEXT:    # =>This Inner Loop Header: Depth=113349; O2-NEXT:  .Lpcsection422:13350; O2-NEXT:    xorl %ecx, %ecx13351; O2-NEXT:  .Lpcsection423:13352; O2-NEXT:    lock cmpxchg16b (%rdi)13353; O2-NEXT:  .Lpcsection424:13354; O2-NEXT:    jne .LBB208_113355; O2-NEXT:  # %bb.2: # %atomicrmw.end13356; O2-NEXT:    movq $1, foo(%rip)13357; O2-NEXT:    popq %rbx13358; O2-NEXT:    .cfi_def_cfa_offset 813359; O2-NEXT:    retq13360;13361; O3-LABEL: atomic128_xchg_monotonic:13362; O3:       # %bb.0: # %entry13363; O3-NEXT:    pushq %rbx13364; O3-NEXT:    .cfi_def_cfa_offset 1613365; O3-NEXT:    .cfi_offset %rbx, -1613366; O3-NEXT:    movq foo(%rip), %rax13367; O3-NEXT:  .Lpcsection419:13368; O3-NEXT:    movq (%rdi), %rax13369; O3-NEXT:  .Lpcsection420:13370; O3-NEXT:    movq 8(%rdi), %rdx13371; O3-NEXT:  .Lpcsection421:13372; O3-NEXT:    movl $42, %ebx13373; O3-NEXT:    .p2align 413374; O3-NEXT:  .LBB208_1: # %atomicrmw.start13375; O3-NEXT:    # =>This Inner Loop Header: Depth=113376; O3-NEXT:  .Lpcsection422:13377; O3-NEXT:    xorl %ecx, %ecx13378; O3-NEXT:  .Lpcsection423:13379; O3-NEXT:    lock cmpxchg16b (%rdi)13380; O3-NEXT:  .Lpcsection424:13381; O3-NEXT:    jne .LBB208_113382; O3-NEXT:  # %bb.2: # %atomicrmw.end13383; O3-NEXT:    movq $1, foo(%rip)13384; O3-NEXT:    popq %rbx13385; O3-NEXT:    .cfi_def_cfa_offset 813386; O3-NEXT:    retq13387;13388; HASWELL-O3-LABEL: atomic128_xchg_monotonic:13389; HASWELL-O3:       # %bb.0: # %entry13390; HASWELL-O3-NEXT:    pushq %rbx13391; HASWELL-O3-NEXT:    .cfi_def_cfa_offset 1613392; HASWELL-O3-NEXT:    .cfi_offset %rbx, -1613393; HASWELL-O3-NEXT:    movq foo(%rip), %rax13394; HASWELL-O3-NEXT:  .Lpcsection396:13395; HASWELL-O3-NEXT:    movq (%rdi), %rax13396; HASWELL-O3-NEXT:  .Lpcsection397:13397; HASWELL-O3-NEXT:    movq 8(%rdi), %rdx13398; HASWELL-O3-NEXT:  .Lpcsection398:13399; HASWELL-O3-NEXT:    movl $42, %ebx13400; HASWELL-O3-NEXT:    .p2align 413401; HASWELL-O3-NEXT:  .LBB208_1: # %atomicrmw.start13402; HASWELL-O3-NEXT:    # =>This Inner Loop Header: Depth=113403; HASWELL-O3-NEXT:  .Lpcsection399:13404; HASWELL-O3-NEXT:    xorl %ecx, %ecx13405; HASWELL-O3-NEXT:  .Lpcsection400:13406; HASWELL-O3-NEXT:    lock cmpxchg16b (%rdi)13407; HASWELL-O3-NEXT:  .Lpcsection401:13408; HASWELL-O3-NEXT:    jne .LBB208_113409; HASWELL-O3-NEXT:  # %bb.2: # %atomicrmw.end13410; HASWELL-O3-NEXT:    movq $1, foo(%rip)13411; HASWELL-O3-NEXT:    popq %rbx13412; HASWELL-O3-NEXT:    .cfi_def_cfa_offset 813413; HASWELL-O3-NEXT:    retq13414entry:13415  load volatile i64, ptr @foo, align 813416  %x = atomicrmw xchg ptr %a, i128 42 monotonic, align 16, !pcsections !013417  store volatile i64 1, ptr @foo, align 813418  ret void13419}13420 13421define void @atomic128_add_monotonic(ptr %a) {13422; O0-LABEL: atomic128_add_monotonic:13423; O0:       # %bb.0: # %entry13424; O0-NEXT:    pushq %rbx13425; O0-NEXT:    .cfi_def_cfa_offset 1613426; O0-NEXT:    .cfi_offset %rbx, -1613427; O0-NEXT:    movq %rdi, {{[-0-9]+}}(%r{{[sb]}}p) # 8-byte Spill13428; O0-NEXT:    movq foo(%rip), %rax13429; O0-NEXT:  .Lpcsection464:13430; O0-NEXT:    movq (%rdi), %rax13431; O0-NEXT:  .Lpcsection465:13432; O0-NEXT:    movq 8(%rdi), %rdx13433; O0-NEXT:    movq %rax, {{[-0-9]+}}(%r{{[sb]}}p) # 8-byte Spill13434; O0-NEXT:    movq %rdx, {{[-0-9]+}}(%r{{[sb]}}p) # 8-byte Spill13435; O0-NEXT:  .Lpcsection466:13436; O0-NEXT:    jmp .LBB209_113437; O0-NEXT:  .LBB209_1: # %atomicrmw.start13438; O0-NEXT:    # =>This Inner Loop Header: Depth=113439; O0-NEXT:    movq {{[-0-9]+}}(%r{{[sb]}}p), %rdx # 8-byte Reload13440; O0-NEXT:    movq {{[-0-9]+}}(%r{{[sb]}}p), %rax # 8-byte Reload13441; O0-NEXT:    movq {{[-0-9]+}}(%r{{[sb]}}p), %rsi # 8-byte Reload13442; O0-NEXT:    movq %rax, %rbx13443; O0-NEXT:  .Lpcsection467:13444; O0-NEXT:    addq $42, %rbx13445; O0-NEXT:    movq %rdx, %rcx13446; O0-NEXT:  .Lpcsection468:13447; O0-NEXT:    adcq $0, %rcx13448; O0-NEXT:  .Lpcsection469:13449; O0-NEXT:    lock cmpxchg16b (%rsi)13450; O0-NEXT:    movq %rax, {{[-0-9]+}}(%r{{[sb]}}p) # 8-byte Spill13451; O0-NEXT:    movq %rdx, {{[-0-9]+}}(%r{{[sb]}}p) # 8-byte Spill13452; O0-NEXT:  .Lpcsection470:13453; O0-NEXT:    jne .LBB209_113454; O0-NEXT:    jmp .LBB209_213455; O0-NEXT:  .LBB209_2: # %atomicrmw.end13456; O0-NEXT:    movq $1, foo13457; O0-NEXT:    popq %rbx13458; O0-NEXT:    .cfi_def_cfa_offset 813459; O0-NEXT:    retq13460;13461; O1-LABEL: atomic128_add_monotonic:13462; O1:       # %bb.0: # %entry13463; O1-NEXT:    pushq %rbx13464; O1-NEXT:    .cfi_def_cfa_offset 1613465; O1-NEXT:    .cfi_offset %rbx, -1613466; O1-NEXT:    movq foo(%rip), %rax13467; O1-NEXT:  .Lpcsection425:13468; O1-NEXT:    movq (%rdi), %rax13469; O1-NEXT:  .Lpcsection426:13470; O1-NEXT:    movq 8(%rdi), %rdx13471; O1-NEXT:    .p2align 413472; O1-NEXT:  .LBB209_1: # %atomicrmw.start13473; O1-NEXT:    # =>This Inner Loop Header: Depth=113474; O1-NEXT:    movq %rax, %rbx13475; O1-NEXT:  .Lpcsection427:13476; O1-NEXT:    addq $42, %rbx13477; O1-NEXT:    movq %rdx, %rcx13478; O1-NEXT:  .Lpcsection428:13479; O1-NEXT:    adcq $0, %rcx13480; O1-NEXT:  .Lpcsection429:13481; O1-NEXT:    lock cmpxchg16b (%rdi)13482; O1-NEXT:  .Lpcsection430:13483; O1-NEXT:    jne .LBB209_113484; O1-NEXT:  # %bb.2: # %atomicrmw.end13485; O1-NEXT:    movq $1, foo(%rip)13486; O1-NEXT:    popq %rbx13487; O1-NEXT:    .cfi_def_cfa_offset 813488; O1-NEXT:    retq13489;13490; O2-LABEL: atomic128_add_monotonic:13491; O2:       # %bb.0: # %entry13492; O2-NEXT:    pushq %rbx13493; O2-NEXT:    .cfi_def_cfa_offset 1613494; O2-NEXT:    .cfi_offset %rbx, -1613495; O2-NEXT:    movq foo(%rip), %rax13496; O2-NEXT:  .Lpcsection425:13497; O2-NEXT:    movq (%rdi), %rax13498; O2-NEXT:  .Lpcsection426:13499; O2-NEXT:    movq 8(%rdi), %rdx13500; O2-NEXT:    .p2align 413501; O2-NEXT:  .LBB209_1: # %atomicrmw.start13502; O2-NEXT:    # =>This Inner Loop Header: Depth=113503; O2-NEXT:    movq %rax, %rbx13504; O2-NEXT:  .Lpcsection427:13505; O2-NEXT:    addq $42, %rbx13506; O2-NEXT:    movq %rdx, %rcx13507; O2-NEXT:  .Lpcsection428:13508; O2-NEXT:    adcq $0, %rcx13509; O2-NEXT:  .Lpcsection429:13510; O2-NEXT:    lock cmpxchg16b (%rdi)13511; O2-NEXT:  .Lpcsection430:13512; O2-NEXT:    jne .LBB209_113513; O2-NEXT:  # %bb.2: # %atomicrmw.end13514; O2-NEXT:    movq $1, foo(%rip)13515; O2-NEXT:    popq %rbx13516; O2-NEXT:    .cfi_def_cfa_offset 813517; O2-NEXT:    retq13518;13519; O3-LABEL: atomic128_add_monotonic:13520; O3:       # %bb.0: # %entry13521; O3-NEXT:    pushq %rbx13522; O3-NEXT:    .cfi_def_cfa_offset 1613523; O3-NEXT:    .cfi_offset %rbx, -1613524; O3-NEXT:    movq foo(%rip), %rax13525; O3-NEXT:  .Lpcsection425:13526; O3-NEXT:    movq (%rdi), %rax13527; O3-NEXT:  .Lpcsection426:13528; O3-NEXT:    movq 8(%rdi), %rdx13529; O3-NEXT:    .p2align 413530; O3-NEXT:  .LBB209_1: # %atomicrmw.start13531; O3-NEXT:    # =>This Inner Loop Header: Depth=113532; O3-NEXT:    movq %rax, %rbx13533; O3-NEXT:  .Lpcsection427:13534; O3-NEXT:    addq $42, %rbx13535; O3-NEXT:    movq %rdx, %rcx13536; O3-NEXT:  .Lpcsection428:13537; O3-NEXT:    adcq $0, %rcx13538; O3-NEXT:  .Lpcsection429:13539; O3-NEXT:    lock cmpxchg16b (%rdi)13540; O3-NEXT:  .Lpcsection430:13541; O3-NEXT:    jne .LBB209_113542; O3-NEXT:  # %bb.2: # %atomicrmw.end13543; O3-NEXT:    movq $1, foo(%rip)13544; O3-NEXT:    popq %rbx13545; O3-NEXT:    .cfi_def_cfa_offset 813546; O3-NEXT:    retq13547;13548; HASWELL-O3-LABEL: atomic128_add_monotonic:13549; HASWELL-O3:       # %bb.0: # %entry13550; HASWELL-O3-NEXT:    pushq %rbx13551; HASWELL-O3-NEXT:    .cfi_def_cfa_offset 1613552; HASWELL-O3-NEXT:    .cfi_offset %rbx, -1613553; HASWELL-O3-NEXT:    movq foo(%rip), %rax13554; HASWELL-O3-NEXT:  .Lpcsection402:13555; HASWELL-O3-NEXT:    movq (%rdi), %rax13556; HASWELL-O3-NEXT:  .Lpcsection403:13557; HASWELL-O3-NEXT:    movq 8(%rdi), %rdx13558; HASWELL-O3-NEXT:    .p2align 413559; HASWELL-O3-NEXT:  .LBB209_1: # %atomicrmw.start13560; HASWELL-O3-NEXT:    # =>This Inner Loop Header: Depth=113561; HASWELL-O3-NEXT:    movq %rax, %rbx13562; HASWELL-O3-NEXT:  .Lpcsection404:13563; HASWELL-O3-NEXT:    addq $42, %rbx13564; HASWELL-O3-NEXT:    movq %rdx, %rcx13565; HASWELL-O3-NEXT:  .Lpcsection405:13566; HASWELL-O3-NEXT:    adcq $0, %rcx13567; HASWELL-O3-NEXT:  .Lpcsection406:13568; HASWELL-O3-NEXT:    lock cmpxchg16b (%rdi)13569; HASWELL-O3-NEXT:  .Lpcsection407:13570; HASWELL-O3-NEXT:    jne .LBB209_113571; HASWELL-O3-NEXT:  # %bb.2: # %atomicrmw.end13572; HASWELL-O3-NEXT:    movq $1, foo(%rip)13573; HASWELL-O3-NEXT:    popq %rbx13574; HASWELL-O3-NEXT:    .cfi_def_cfa_offset 813575; HASWELL-O3-NEXT:    retq13576entry:13577  load volatile i64, ptr @foo, align 813578  %x = atomicrmw add ptr %a, i128 42 monotonic, align 16, !pcsections !013579  store volatile i64 1, ptr @foo, align 813580  ret void13581}13582 13583define void @atomic128_sub_monotonic(ptr %a) {13584; O0-LABEL: atomic128_sub_monotonic:13585; O0:       # %bb.0: # %entry13586; O0-NEXT:    pushq %rbx13587; O0-NEXT:    .cfi_def_cfa_offset 1613588; O0-NEXT:    .cfi_offset %rbx, -1613589; O0-NEXT:    movq %rdi, {{[-0-9]+}}(%r{{[sb]}}p) # 8-byte Spill13590; O0-NEXT:    movq foo(%rip), %rax13591; O0-NEXT:  .Lpcsection471:13592; O0-NEXT:    movq (%rdi), %rax13593; O0-NEXT:  .Lpcsection472:13594; O0-NEXT:    movq 8(%rdi), %rdx13595; O0-NEXT:    movq %rax, {{[-0-9]+}}(%r{{[sb]}}p) # 8-byte Spill13596; O0-NEXT:    movq %rdx, {{[-0-9]+}}(%r{{[sb]}}p) # 8-byte Spill13597; O0-NEXT:  .Lpcsection473:13598; O0-NEXT:    jmp .LBB210_113599; O0-NEXT:  .LBB210_1: # %atomicrmw.start13600; O0-NEXT:    # =>This Inner Loop Header: Depth=113601; O0-NEXT:    movq {{[-0-9]+}}(%r{{[sb]}}p), %rdx # 8-byte Reload13602; O0-NEXT:    movq {{[-0-9]+}}(%r{{[sb]}}p), %rax # 8-byte Reload13603; O0-NEXT:    movq {{[-0-9]+}}(%r{{[sb]}}p), %rsi # 8-byte Reload13604; O0-NEXT:    movq %rax, %rbx13605; O0-NEXT:  .Lpcsection474:13606; O0-NEXT:    addq $-42, %rbx13607; O0-NEXT:    movq %rdx, %rcx13608; O0-NEXT:  .Lpcsection475:13609; O0-NEXT:    adcq $-1, %rcx13610; O0-NEXT:  .Lpcsection476:13611; O0-NEXT:    lock cmpxchg16b (%rsi)13612; O0-NEXT:    movq %rax, {{[-0-9]+}}(%r{{[sb]}}p) # 8-byte Spill13613; O0-NEXT:    movq %rdx, {{[-0-9]+}}(%r{{[sb]}}p) # 8-byte Spill13614; O0-NEXT:  .Lpcsection477:13615; O0-NEXT:    jne .LBB210_113616; O0-NEXT:    jmp .LBB210_213617; O0-NEXT:  .LBB210_2: # %atomicrmw.end13618; O0-NEXT:    movq $1, foo13619; O0-NEXT:    popq %rbx13620; O0-NEXT:    .cfi_def_cfa_offset 813621; O0-NEXT:    retq13622;13623; O1-LABEL: atomic128_sub_monotonic:13624; O1:       # %bb.0: # %entry13625; O1-NEXT:    pushq %rbx13626; O1-NEXT:    .cfi_def_cfa_offset 1613627; O1-NEXT:    .cfi_offset %rbx, -1613628; O1-NEXT:    movq foo(%rip), %rax13629; O1-NEXT:  .Lpcsection431:13630; O1-NEXT:    movq (%rdi), %rax13631; O1-NEXT:  .Lpcsection432:13632; O1-NEXT:    movq 8(%rdi), %rdx13633; O1-NEXT:    .p2align 413634; O1-NEXT:  .LBB210_1: # %atomicrmw.start13635; O1-NEXT:    # =>This Inner Loop Header: Depth=113636; O1-NEXT:    movq %rax, %rbx13637; O1-NEXT:  .Lpcsection433:13638; O1-NEXT:    addq $-42, %rbx13639; O1-NEXT:    movq %rdx, %rcx13640; O1-NEXT:  .Lpcsection434:13641; O1-NEXT:    adcq $-1, %rcx13642; O1-NEXT:  .Lpcsection435:13643; O1-NEXT:    lock cmpxchg16b (%rdi)13644; O1-NEXT:  .Lpcsection436:13645; O1-NEXT:    jne .LBB210_113646; O1-NEXT:  # %bb.2: # %atomicrmw.end13647; O1-NEXT:    movq $1, foo(%rip)13648; O1-NEXT:    popq %rbx13649; O1-NEXT:    .cfi_def_cfa_offset 813650; O1-NEXT:    retq13651;13652; O2-LABEL: atomic128_sub_monotonic:13653; O2:       # %bb.0: # %entry13654; O2-NEXT:    pushq %rbx13655; O2-NEXT:    .cfi_def_cfa_offset 1613656; O2-NEXT:    .cfi_offset %rbx, -1613657; O2-NEXT:    movq foo(%rip), %rax13658; O2-NEXT:  .Lpcsection431:13659; O2-NEXT:    movq (%rdi), %rax13660; O2-NEXT:  .Lpcsection432:13661; O2-NEXT:    movq 8(%rdi), %rdx13662; O2-NEXT:    .p2align 413663; O2-NEXT:  .LBB210_1: # %atomicrmw.start13664; O2-NEXT:    # =>This Inner Loop Header: Depth=113665; O2-NEXT:    movq %rax, %rbx13666; O2-NEXT:  .Lpcsection433:13667; O2-NEXT:    addq $-42, %rbx13668; O2-NEXT:    movq %rdx, %rcx13669; O2-NEXT:  .Lpcsection434:13670; O2-NEXT:    adcq $-1, %rcx13671; O2-NEXT:  .Lpcsection435:13672; O2-NEXT:    lock cmpxchg16b (%rdi)13673; O2-NEXT:  .Lpcsection436:13674; O2-NEXT:    jne .LBB210_113675; O2-NEXT:  # %bb.2: # %atomicrmw.end13676; O2-NEXT:    movq $1, foo(%rip)13677; O2-NEXT:    popq %rbx13678; O2-NEXT:    .cfi_def_cfa_offset 813679; O2-NEXT:    retq13680;13681; O3-LABEL: atomic128_sub_monotonic:13682; O3:       # %bb.0: # %entry13683; O3-NEXT:    pushq %rbx13684; O3-NEXT:    .cfi_def_cfa_offset 1613685; O3-NEXT:    .cfi_offset %rbx, -1613686; O3-NEXT:    movq foo(%rip), %rax13687; O3-NEXT:  .Lpcsection431:13688; O3-NEXT:    movq (%rdi), %rax13689; O3-NEXT:  .Lpcsection432:13690; O3-NEXT:    movq 8(%rdi), %rdx13691; O3-NEXT:    .p2align 413692; O3-NEXT:  .LBB210_1: # %atomicrmw.start13693; O3-NEXT:    # =>This Inner Loop Header: Depth=113694; O3-NEXT:    movq %rax, %rbx13695; O3-NEXT:  .Lpcsection433:13696; O3-NEXT:    addq $-42, %rbx13697; O3-NEXT:    movq %rdx, %rcx13698; O3-NEXT:  .Lpcsection434:13699; O3-NEXT:    adcq $-1, %rcx13700; O3-NEXT:  .Lpcsection435:13701; O3-NEXT:    lock cmpxchg16b (%rdi)13702; O3-NEXT:  .Lpcsection436:13703; O3-NEXT:    jne .LBB210_113704; O3-NEXT:  # %bb.2: # %atomicrmw.end13705; O3-NEXT:    movq $1, foo(%rip)13706; O3-NEXT:    popq %rbx13707; O3-NEXT:    .cfi_def_cfa_offset 813708; O3-NEXT:    retq13709;13710; HASWELL-O3-LABEL: atomic128_sub_monotonic:13711; HASWELL-O3:       # %bb.0: # %entry13712; HASWELL-O3-NEXT:    pushq %rbx13713; HASWELL-O3-NEXT:    .cfi_def_cfa_offset 1613714; HASWELL-O3-NEXT:    .cfi_offset %rbx, -1613715; HASWELL-O3-NEXT:    movq foo(%rip), %rax13716; HASWELL-O3-NEXT:  .Lpcsection408:13717; HASWELL-O3-NEXT:    movq (%rdi), %rax13718; HASWELL-O3-NEXT:  .Lpcsection409:13719; HASWELL-O3-NEXT:    movq 8(%rdi), %rdx13720; HASWELL-O3-NEXT:    .p2align 413721; HASWELL-O3-NEXT:  .LBB210_1: # %atomicrmw.start13722; HASWELL-O3-NEXT:    # =>This Inner Loop Header: Depth=113723; HASWELL-O3-NEXT:    movq %rax, %rbx13724; HASWELL-O3-NEXT:  .Lpcsection410:13725; HASWELL-O3-NEXT:    addq $-42, %rbx13726; HASWELL-O3-NEXT:    movq %rdx, %rcx13727; HASWELL-O3-NEXT:  .Lpcsection411:13728; HASWELL-O3-NEXT:    adcq $-1, %rcx13729; HASWELL-O3-NEXT:  .Lpcsection412:13730; HASWELL-O3-NEXT:    lock cmpxchg16b (%rdi)13731; HASWELL-O3-NEXT:  .Lpcsection413:13732; HASWELL-O3-NEXT:    jne .LBB210_113733; HASWELL-O3-NEXT:  # %bb.2: # %atomicrmw.end13734; HASWELL-O3-NEXT:    movq $1, foo(%rip)13735; HASWELL-O3-NEXT:    popq %rbx13736; HASWELL-O3-NEXT:    .cfi_def_cfa_offset 813737; HASWELL-O3-NEXT:    retq13738entry:13739  load volatile i64, ptr @foo, align 813740  %x = atomicrmw sub ptr %a, i128 42 monotonic, align 16, !pcsections !013741  store volatile i64 1, ptr @foo, align 813742  ret void13743}13744 13745define void @atomic128_and_monotonic(ptr %a) {13746; O0-LABEL: atomic128_and_monotonic:13747; O0:       # %bb.0: # %entry13748; O0-NEXT:    pushq %rbx13749; O0-NEXT:    .cfi_def_cfa_offset 1613750; O0-NEXT:    .cfi_offset %rbx, -1613751; O0-NEXT:    movq %rdi, {{[-0-9]+}}(%r{{[sb]}}p) # 8-byte Spill13752; O0-NEXT:    movq foo(%rip), %rax13753; O0-NEXT:  .Lpcsection478:13754; O0-NEXT:    movq (%rdi), %rax13755; O0-NEXT:  .Lpcsection479:13756; O0-NEXT:    movq 8(%rdi), %rdx13757; O0-NEXT:    movq %rax, {{[-0-9]+}}(%r{{[sb]}}p) # 8-byte Spill13758; O0-NEXT:    movq %rdx, {{[-0-9]+}}(%r{{[sb]}}p) # 8-byte Spill13759; O0-NEXT:  .Lpcsection480:13760; O0-NEXT:    jmp .LBB211_113761; O0-NEXT:  .LBB211_1: # %atomicrmw.start13762; O0-NEXT:    # =>This Inner Loop Header: Depth=113763; O0-NEXT:    movq {{[-0-9]+}}(%r{{[sb]}}p), %rdx # 8-byte Reload13764; O0-NEXT:    movq {{[-0-9]+}}(%r{{[sb]}}p), %rax # 8-byte Reload13765; O0-NEXT:    movq {{[-0-9]+}}(%r{{[sb]}}p), %rsi # 8-byte Reload13766; O0-NEXT:    movl %eax, %ecx13767; O0-NEXT:  .Lpcsection481:13768; O0-NEXT:    andl $42, %ecx13769; O0-NEXT:    movl %ecx, %ebx13770; O0-NEXT:  .Lpcsection482:13771; O0-NEXT:    xorl %ecx, %ecx13772; O0-NEXT:  .Lpcsection483:13773; O0-NEXT:    # kill: def $rcx killed $ecx13774; O0-NEXT:  .Lpcsection484:13775; O0-NEXT:    lock cmpxchg16b (%rsi)13776; O0-NEXT:    movq %rax, {{[-0-9]+}}(%r{{[sb]}}p) # 8-byte Spill13777; O0-NEXT:    movq %rdx, {{[-0-9]+}}(%r{{[sb]}}p) # 8-byte Spill13778; O0-NEXT:  .Lpcsection485:13779; O0-NEXT:    jne .LBB211_113780; O0-NEXT:    jmp .LBB211_213781; O0-NEXT:  .LBB211_2: # %atomicrmw.end13782; O0-NEXT:    movq $1, foo13783; O0-NEXT:    popq %rbx13784; O0-NEXT:    .cfi_def_cfa_offset 813785; O0-NEXT:    retq13786;13787; O1-LABEL: atomic128_and_monotonic:13788; O1:       # %bb.0: # %entry13789; O1-NEXT:    pushq %rbx13790; O1-NEXT:    .cfi_def_cfa_offset 1613791; O1-NEXT:    .cfi_offset %rbx, -1613792; O1-NEXT:    movq foo(%rip), %rax13793; O1-NEXT:  .Lpcsection437:13794; O1-NEXT:    movq (%rdi), %rax13795; O1-NEXT:  .Lpcsection438:13796; O1-NEXT:    movq 8(%rdi), %rdx13797; O1-NEXT:    .p2align 413798; O1-NEXT:  .LBB211_1: # %atomicrmw.start13799; O1-NEXT:    # =>This Inner Loop Header: Depth=113800; O1-NEXT:    movl %eax, %ebx13801; O1-NEXT:  .Lpcsection439:13802; O1-NEXT:    andl $42, %ebx13803; O1-NEXT:  .Lpcsection440:13804; O1-NEXT:    xorl %ecx, %ecx13805; O1-NEXT:  .Lpcsection441:13806; O1-NEXT:    lock cmpxchg16b (%rdi)13807; O1-NEXT:  .Lpcsection442:13808; O1-NEXT:    jne .LBB211_113809; O1-NEXT:  # %bb.2: # %atomicrmw.end13810; O1-NEXT:    movq $1, foo(%rip)13811; O1-NEXT:    popq %rbx13812; O1-NEXT:    .cfi_def_cfa_offset 813813; O1-NEXT:    retq13814;13815; O2-LABEL: atomic128_and_monotonic:13816; O2:       # %bb.0: # %entry13817; O2-NEXT:    pushq %rbx13818; O2-NEXT:    .cfi_def_cfa_offset 1613819; O2-NEXT:    .cfi_offset %rbx, -1613820; O2-NEXT:    movq foo(%rip), %rax13821; O2-NEXT:  .Lpcsection437:13822; O2-NEXT:    movq (%rdi), %rax13823; O2-NEXT:  .Lpcsection438:13824; O2-NEXT:    movq 8(%rdi), %rdx13825; O2-NEXT:    .p2align 413826; O2-NEXT:  .LBB211_1: # %atomicrmw.start13827; O2-NEXT:    # =>This Inner Loop Header: Depth=113828; O2-NEXT:    movl %eax, %ebx13829; O2-NEXT:  .Lpcsection439:13830; O2-NEXT:    andl $42, %ebx13831; O2-NEXT:  .Lpcsection440:13832; O2-NEXT:    xorl %ecx, %ecx13833; O2-NEXT:  .Lpcsection441:13834; O2-NEXT:    lock cmpxchg16b (%rdi)13835; O2-NEXT:  .Lpcsection442:13836; O2-NEXT:    jne .LBB211_113837; O2-NEXT:  # %bb.2: # %atomicrmw.end13838; O2-NEXT:    movq $1, foo(%rip)13839; O2-NEXT:    popq %rbx13840; O2-NEXT:    .cfi_def_cfa_offset 813841; O2-NEXT:    retq13842;13843; O3-LABEL: atomic128_and_monotonic:13844; O3:       # %bb.0: # %entry13845; O3-NEXT:    pushq %rbx13846; O3-NEXT:    .cfi_def_cfa_offset 1613847; O3-NEXT:    .cfi_offset %rbx, -1613848; O3-NEXT:    movq foo(%rip), %rax13849; O3-NEXT:  .Lpcsection437:13850; O3-NEXT:    movq (%rdi), %rax13851; O3-NEXT:  .Lpcsection438:13852; O3-NEXT:    movq 8(%rdi), %rdx13853; O3-NEXT:    .p2align 413854; O3-NEXT:  .LBB211_1: # %atomicrmw.start13855; O3-NEXT:    # =>This Inner Loop Header: Depth=113856; O3-NEXT:    movl %eax, %ebx13857; O3-NEXT:  .Lpcsection439:13858; O3-NEXT:    andl $42, %ebx13859; O3-NEXT:  .Lpcsection440:13860; O3-NEXT:    xorl %ecx, %ecx13861; O3-NEXT:  .Lpcsection441:13862; O3-NEXT:    lock cmpxchg16b (%rdi)13863; O3-NEXT:  .Lpcsection442:13864; O3-NEXT:    jne .LBB211_113865; O3-NEXT:  # %bb.2: # %atomicrmw.end13866; O3-NEXT:    movq $1, foo(%rip)13867; O3-NEXT:    popq %rbx13868; O3-NEXT:    .cfi_def_cfa_offset 813869; O3-NEXT:    retq13870;13871; HASWELL-O3-LABEL: atomic128_and_monotonic:13872; HASWELL-O3:       # %bb.0: # %entry13873; HASWELL-O3-NEXT:    pushq %rbx13874; HASWELL-O3-NEXT:    .cfi_def_cfa_offset 1613875; HASWELL-O3-NEXT:    .cfi_offset %rbx, -1613876; HASWELL-O3-NEXT:    movq foo(%rip), %rax13877; HASWELL-O3-NEXT:  .Lpcsection414:13878; HASWELL-O3-NEXT:    movq (%rdi), %rax13879; HASWELL-O3-NEXT:  .Lpcsection415:13880; HASWELL-O3-NEXT:    movq 8(%rdi), %rdx13881; HASWELL-O3-NEXT:    .p2align 413882; HASWELL-O3-NEXT:  .LBB211_1: # %atomicrmw.start13883; HASWELL-O3-NEXT:    # =>This Inner Loop Header: Depth=113884; HASWELL-O3-NEXT:    movl %eax, %ebx13885; HASWELL-O3-NEXT:  .Lpcsection416:13886; HASWELL-O3-NEXT:    andl $42, %ebx13887; HASWELL-O3-NEXT:  .Lpcsection417:13888; HASWELL-O3-NEXT:    xorl %ecx, %ecx13889; HASWELL-O3-NEXT:  .Lpcsection418:13890; HASWELL-O3-NEXT:    lock cmpxchg16b (%rdi)13891; HASWELL-O3-NEXT:  .Lpcsection419:13892; HASWELL-O3-NEXT:    jne .LBB211_113893; HASWELL-O3-NEXT:  # %bb.2: # %atomicrmw.end13894; HASWELL-O3-NEXT:    movq $1, foo(%rip)13895; HASWELL-O3-NEXT:    popq %rbx13896; HASWELL-O3-NEXT:    .cfi_def_cfa_offset 813897; HASWELL-O3-NEXT:    retq13898entry:13899  load volatile i64, ptr @foo, align 813900  %x = atomicrmw and ptr %a, i128 42 monotonic, align 16, !pcsections !013901  store volatile i64 1, ptr @foo, align 813902  ret void13903}13904 13905define void @atomic128_or_monotonic(ptr %a) {13906; O0-LABEL: atomic128_or_monotonic:13907; O0:       # %bb.0: # %entry13908; O0-NEXT:    pushq %rbx13909; O0-NEXT:    .cfi_def_cfa_offset 1613910; O0-NEXT:    .cfi_offset %rbx, -1613911; O0-NEXT:    movq %rdi, {{[-0-9]+}}(%r{{[sb]}}p) # 8-byte Spill13912; O0-NEXT:    movq foo(%rip), %rax13913; O0-NEXT:  .Lpcsection486:13914; O0-NEXT:    movq (%rdi), %rax13915; O0-NEXT:  .Lpcsection487:13916; O0-NEXT:    movq 8(%rdi), %rdx13917; O0-NEXT:    movq %rax, {{[-0-9]+}}(%r{{[sb]}}p) # 8-byte Spill13918; O0-NEXT:    movq %rdx, {{[-0-9]+}}(%r{{[sb]}}p) # 8-byte Spill13919; O0-NEXT:  .Lpcsection488:13920; O0-NEXT:    jmp .LBB212_113921; O0-NEXT:  .LBB212_1: # %atomicrmw.start13922; O0-NEXT:    # =>This Inner Loop Header: Depth=113923; O0-NEXT:    movq {{[-0-9]+}}(%r{{[sb]}}p), %rcx # 8-byte Reload13924; O0-NEXT:    movq {{[-0-9]+}}(%r{{[sb]}}p), %rax # 8-byte Reload13925; O0-NEXT:    movq {{[-0-9]+}}(%r{{[sb]}}p), %rsi # 8-byte Reload13926; O0-NEXT:    movq %rax, %rbx13927; O0-NEXT:  .Lpcsection489:13928; O0-NEXT:    orq $42, %rbx13929; O0-NEXT:    movq %rcx, %rdx13930; O0-NEXT:  .Lpcsection490:13931; O0-NEXT:    lock cmpxchg16b (%rsi)13932; O0-NEXT:    movq %rax, {{[-0-9]+}}(%r{{[sb]}}p) # 8-byte Spill13933; O0-NEXT:    movq %rdx, {{[-0-9]+}}(%r{{[sb]}}p) # 8-byte Spill13934; O0-NEXT:  .Lpcsection491:13935; O0-NEXT:    jne .LBB212_113936; O0-NEXT:    jmp .LBB212_213937; O0-NEXT:  .LBB212_2: # %atomicrmw.end13938; O0-NEXT:    movq $1, foo13939; O0-NEXT:    popq %rbx13940; O0-NEXT:    .cfi_def_cfa_offset 813941; O0-NEXT:    retq13942;13943; O1-LABEL: atomic128_or_monotonic:13944; O1:       # %bb.0: # %entry13945; O1-NEXT:    pushq %rbx13946; O1-NEXT:    .cfi_def_cfa_offset 1613947; O1-NEXT:    .cfi_offset %rbx, -1613948; O1-NEXT:    movq foo(%rip), %rax13949; O1-NEXT:  .Lpcsection443:13950; O1-NEXT:    movq (%rdi), %rax13951; O1-NEXT:  .Lpcsection444:13952; O1-NEXT:    movq 8(%rdi), %rdx13953; O1-NEXT:    .p2align 413954; O1-NEXT:  .LBB212_1: # %atomicrmw.start13955; O1-NEXT:    # =>This Inner Loop Header: Depth=113956; O1-NEXT:    movq %rax, %rbx13957; O1-NEXT:  .Lpcsection445:13958; O1-NEXT:    orq $42, %rbx13959; O1-NEXT:    movq %rdx, %rcx13960; O1-NEXT:  .Lpcsection446:13961; O1-NEXT:    lock cmpxchg16b (%rdi)13962; O1-NEXT:  .Lpcsection447:13963; O1-NEXT:    jne .LBB212_113964; O1-NEXT:  # %bb.2: # %atomicrmw.end13965; O1-NEXT:    movq $1, foo(%rip)13966; O1-NEXT:    popq %rbx13967; O1-NEXT:    .cfi_def_cfa_offset 813968; O1-NEXT:    retq13969;13970; O2-LABEL: atomic128_or_monotonic:13971; O2:       # %bb.0: # %entry13972; O2-NEXT:    pushq %rbx13973; O2-NEXT:    .cfi_def_cfa_offset 1613974; O2-NEXT:    .cfi_offset %rbx, -1613975; O2-NEXT:    movq foo(%rip), %rax13976; O2-NEXT:  .Lpcsection443:13977; O2-NEXT:    movq (%rdi), %rax13978; O2-NEXT:  .Lpcsection444:13979; O2-NEXT:    movq 8(%rdi), %rdx13980; O2-NEXT:    .p2align 413981; O2-NEXT:  .LBB212_1: # %atomicrmw.start13982; O2-NEXT:    # =>This Inner Loop Header: Depth=113983; O2-NEXT:    movq %rax, %rbx13984; O2-NEXT:  .Lpcsection445:13985; O2-NEXT:    orq $42, %rbx13986; O2-NEXT:    movq %rdx, %rcx13987; O2-NEXT:  .Lpcsection446:13988; O2-NEXT:    lock cmpxchg16b (%rdi)13989; O2-NEXT:  .Lpcsection447:13990; O2-NEXT:    jne .LBB212_113991; O2-NEXT:  # %bb.2: # %atomicrmw.end13992; O2-NEXT:    movq $1, foo(%rip)13993; O2-NEXT:    popq %rbx13994; O2-NEXT:    .cfi_def_cfa_offset 813995; O2-NEXT:    retq13996;13997; O3-LABEL: atomic128_or_monotonic:13998; O3:       # %bb.0: # %entry13999; O3-NEXT:    pushq %rbx14000; O3-NEXT:    .cfi_def_cfa_offset 1614001; O3-NEXT:    .cfi_offset %rbx, -1614002; O3-NEXT:    movq foo(%rip), %rax14003; O3-NEXT:  .Lpcsection443:14004; O3-NEXT:    movq (%rdi), %rax14005; O3-NEXT:  .Lpcsection444:14006; O3-NEXT:    movq 8(%rdi), %rdx14007; O3-NEXT:    .p2align 414008; O3-NEXT:  .LBB212_1: # %atomicrmw.start14009; O3-NEXT:    # =>This Inner Loop Header: Depth=114010; O3-NEXT:    movq %rax, %rbx14011; O3-NEXT:  .Lpcsection445:14012; O3-NEXT:    orq $42, %rbx14013; O3-NEXT:    movq %rdx, %rcx14014; O3-NEXT:  .Lpcsection446:14015; O3-NEXT:    lock cmpxchg16b (%rdi)14016; O3-NEXT:  .Lpcsection447:14017; O3-NEXT:    jne .LBB212_114018; O3-NEXT:  # %bb.2: # %atomicrmw.end14019; O3-NEXT:    movq $1, foo(%rip)14020; O3-NEXT:    popq %rbx14021; O3-NEXT:    .cfi_def_cfa_offset 814022; O3-NEXT:    retq14023;14024; HASWELL-O3-LABEL: atomic128_or_monotonic:14025; HASWELL-O3:       # %bb.0: # %entry14026; HASWELL-O3-NEXT:    pushq %rbx14027; HASWELL-O3-NEXT:    .cfi_def_cfa_offset 1614028; HASWELL-O3-NEXT:    .cfi_offset %rbx, -1614029; HASWELL-O3-NEXT:    movq foo(%rip), %rax14030; HASWELL-O3-NEXT:  .Lpcsection420:14031; HASWELL-O3-NEXT:    movq (%rdi), %rax14032; HASWELL-O3-NEXT:  .Lpcsection421:14033; HASWELL-O3-NEXT:    movq 8(%rdi), %rdx14034; HASWELL-O3-NEXT:    .p2align 414035; HASWELL-O3-NEXT:  .LBB212_1: # %atomicrmw.start14036; HASWELL-O3-NEXT:    # =>This Inner Loop Header: Depth=114037; HASWELL-O3-NEXT:    movq %rax, %rbx14038; HASWELL-O3-NEXT:  .Lpcsection422:14039; HASWELL-O3-NEXT:    orq $42, %rbx14040; HASWELL-O3-NEXT:    movq %rdx, %rcx14041; HASWELL-O3-NEXT:  .Lpcsection423:14042; HASWELL-O3-NEXT:    lock cmpxchg16b (%rdi)14043; HASWELL-O3-NEXT:  .Lpcsection424:14044; HASWELL-O3-NEXT:    jne .LBB212_114045; HASWELL-O3-NEXT:  # %bb.2: # %atomicrmw.end14046; HASWELL-O3-NEXT:    movq $1, foo(%rip)14047; HASWELL-O3-NEXT:    popq %rbx14048; HASWELL-O3-NEXT:    .cfi_def_cfa_offset 814049; HASWELL-O3-NEXT:    retq14050entry:14051  load volatile i64, ptr @foo, align 814052  %x = atomicrmw or ptr %a, i128 42 monotonic, align 16, !pcsections !014053  store volatile i64 1, ptr @foo, align 814054  ret void14055}14056 14057define void @atomic128_xor_monotonic(ptr %a) {14058; O0-LABEL: atomic128_xor_monotonic:14059; O0:       # %bb.0: # %entry14060; O0-NEXT:    pushq %rbx14061; O0-NEXT:    .cfi_def_cfa_offset 1614062; O0-NEXT:    .cfi_offset %rbx, -1614063; O0-NEXT:    movq %rdi, {{[-0-9]+}}(%r{{[sb]}}p) # 8-byte Spill14064; O0-NEXT:    movq foo(%rip), %rax14065; O0-NEXT:  .Lpcsection492:14066; O0-NEXT:    movq (%rdi), %rax14067; O0-NEXT:  .Lpcsection493:14068; O0-NEXT:    movq 8(%rdi), %rdx14069; O0-NEXT:    movq %rax, {{[-0-9]+}}(%r{{[sb]}}p) # 8-byte Spill14070; O0-NEXT:    movq %rdx, {{[-0-9]+}}(%r{{[sb]}}p) # 8-byte Spill14071; O0-NEXT:  .Lpcsection494:14072; O0-NEXT:    jmp .LBB213_114073; O0-NEXT:  .LBB213_1: # %atomicrmw.start14074; O0-NEXT:    # =>This Inner Loop Header: Depth=114075; O0-NEXT:    movq {{[-0-9]+}}(%r{{[sb]}}p), %rcx # 8-byte Reload14076; O0-NEXT:    movq {{[-0-9]+}}(%r{{[sb]}}p), %rax # 8-byte Reload14077; O0-NEXT:    movq {{[-0-9]+}}(%r{{[sb]}}p), %rsi # 8-byte Reload14078; O0-NEXT:    movq %rax, %rbx14079; O0-NEXT:  .Lpcsection495:14080; O0-NEXT:    xorq $42, %rbx14081; O0-NEXT:    movq %rcx, %rdx14082; O0-NEXT:  .Lpcsection496:14083; O0-NEXT:    lock cmpxchg16b (%rsi)14084; O0-NEXT:    movq %rax, {{[-0-9]+}}(%r{{[sb]}}p) # 8-byte Spill14085; O0-NEXT:    movq %rdx, {{[-0-9]+}}(%r{{[sb]}}p) # 8-byte Spill14086; O0-NEXT:  .Lpcsection497:14087; O0-NEXT:    jne .LBB213_114088; O0-NEXT:    jmp .LBB213_214089; O0-NEXT:  .LBB213_2: # %atomicrmw.end14090; O0-NEXT:    movq $1, foo14091; O0-NEXT:    popq %rbx14092; O0-NEXT:    .cfi_def_cfa_offset 814093; O0-NEXT:    retq14094;14095; O1-LABEL: atomic128_xor_monotonic:14096; O1:       # %bb.0: # %entry14097; O1-NEXT:    pushq %rbx14098; O1-NEXT:    .cfi_def_cfa_offset 1614099; O1-NEXT:    .cfi_offset %rbx, -1614100; O1-NEXT:    movq foo(%rip), %rax14101; O1-NEXT:  .Lpcsection448:14102; O1-NEXT:    movq (%rdi), %rax14103; O1-NEXT:  .Lpcsection449:14104; O1-NEXT:    movq 8(%rdi), %rdx14105; O1-NEXT:    .p2align 414106; O1-NEXT:  .LBB213_1: # %atomicrmw.start14107; O1-NEXT:    # =>This Inner Loop Header: Depth=114108; O1-NEXT:    movq %rax, %rbx14109; O1-NEXT:  .Lpcsection450:14110; O1-NEXT:    xorq $42, %rbx14111; O1-NEXT:    movq %rdx, %rcx14112; O1-NEXT:  .Lpcsection451:14113; O1-NEXT:    lock cmpxchg16b (%rdi)14114; O1-NEXT:  .Lpcsection452:14115; O1-NEXT:    jne .LBB213_114116; O1-NEXT:  # %bb.2: # %atomicrmw.end14117; O1-NEXT:    movq $1, foo(%rip)14118; O1-NEXT:    popq %rbx14119; O1-NEXT:    .cfi_def_cfa_offset 814120; O1-NEXT:    retq14121;14122; O2-LABEL: atomic128_xor_monotonic:14123; O2:       # %bb.0: # %entry14124; O2-NEXT:    pushq %rbx14125; O2-NEXT:    .cfi_def_cfa_offset 1614126; O2-NEXT:    .cfi_offset %rbx, -1614127; O2-NEXT:    movq foo(%rip), %rax14128; O2-NEXT:  .Lpcsection448:14129; O2-NEXT:    movq (%rdi), %rax14130; O2-NEXT:  .Lpcsection449:14131; O2-NEXT:    movq 8(%rdi), %rdx14132; O2-NEXT:    .p2align 414133; O2-NEXT:  .LBB213_1: # %atomicrmw.start14134; O2-NEXT:    # =>This Inner Loop Header: Depth=114135; O2-NEXT:    movq %rax, %rbx14136; O2-NEXT:  .Lpcsection450:14137; O2-NEXT:    xorq $42, %rbx14138; O2-NEXT:    movq %rdx, %rcx14139; O2-NEXT:  .Lpcsection451:14140; O2-NEXT:    lock cmpxchg16b (%rdi)14141; O2-NEXT:  .Lpcsection452:14142; O2-NEXT:    jne .LBB213_114143; O2-NEXT:  # %bb.2: # %atomicrmw.end14144; O2-NEXT:    movq $1, foo(%rip)14145; O2-NEXT:    popq %rbx14146; O2-NEXT:    .cfi_def_cfa_offset 814147; O2-NEXT:    retq14148;14149; O3-LABEL: atomic128_xor_monotonic:14150; O3:       # %bb.0: # %entry14151; O3-NEXT:    pushq %rbx14152; O3-NEXT:    .cfi_def_cfa_offset 1614153; O3-NEXT:    .cfi_offset %rbx, -1614154; O3-NEXT:    movq foo(%rip), %rax14155; O3-NEXT:  .Lpcsection448:14156; O3-NEXT:    movq (%rdi), %rax14157; O3-NEXT:  .Lpcsection449:14158; O3-NEXT:    movq 8(%rdi), %rdx14159; O3-NEXT:    .p2align 414160; O3-NEXT:  .LBB213_1: # %atomicrmw.start14161; O3-NEXT:    # =>This Inner Loop Header: Depth=114162; O3-NEXT:    movq %rax, %rbx14163; O3-NEXT:  .Lpcsection450:14164; O3-NEXT:    xorq $42, %rbx14165; O3-NEXT:    movq %rdx, %rcx14166; O3-NEXT:  .Lpcsection451:14167; O3-NEXT:    lock cmpxchg16b (%rdi)14168; O3-NEXT:  .Lpcsection452:14169; O3-NEXT:    jne .LBB213_114170; O3-NEXT:  # %bb.2: # %atomicrmw.end14171; O3-NEXT:    movq $1, foo(%rip)14172; O3-NEXT:    popq %rbx14173; O3-NEXT:    .cfi_def_cfa_offset 814174; O3-NEXT:    retq14175;14176; HASWELL-O3-LABEL: atomic128_xor_monotonic:14177; HASWELL-O3:       # %bb.0: # %entry14178; HASWELL-O3-NEXT:    pushq %rbx14179; HASWELL-O3-NEXT:    .cfi_def_cfa_offset 1614180; HASWELL-O3-NEXT:    .cfi_offset %rbx, -1614181; HASWELL-O3-NEXT:    movq foo(%rip), %rax14182; HASWELL-O3-NEXT:  .Lpcsection425:14183; HASWELL-O3-NEXT:    movq (%rdi), %rax14184; HASWELL-O3-NEXT:  .Lpcsection426:14185; HASWELL-O3-NEXT:    movq 8(%rdi), %rdx14186; HASWELL-O3-NEXT:    .p2align 414187; HASWELL-O3-NEXT:  .LBB213_1: # %atomicrmw.start14188; HASWELL-O3-NEXT:    # =>This Inner Loop Header: Depth=114189; HASWELL-O3-NEXT:    movq %rax, %rbx14190; HASWELL-O3-NEXT:  .Lpcsection427:14191; HASWELL-O3-NEXT:    xorq $42, %rbx14192; HASWELL-O3-NEXT:    movq %rdx, %rcx14193; HASWELL-O3-NEXT:  .Lpcsection428:14194; HASWELL-O3-NEXT:    lock cmpxchg16b (%rdi)14195; HASWELL-O3-NEXT:  .Lpcsection429:14196; HASWELL-O3-NEXT:    jne .LBB213_114197; HASWELL-O3-NEXT:  # %bb.2: # %atomicrmw.end14198; HASWELL-O3-NEXT:    movq $1, foo(%rip)14199; HASWELL-O3-NEXT:    popq %rbx14200; HASWELL-O3-NEXT:    .cfi_def_cfa_offset 814201; HASWELL-O3-NEXT:    retq14202entry:14203  load volatile i64, ptr @foo, align 814204  %x = atomicrmw xor ptr %a, i128 42 monotonic, align 16, !pcsections !014205  store volatile i64 1, ptr @foo, align 814206  ret void14207}14208 14209define void @atomic128_nand_monotonic(ptr %a) {14210; O0-LABEL: atomic128_nand_monotonic:14211; O0:       # %bb.0: # %entry14212; O0-NEXT:    pushq %rbx14213; O0-NEXT:    .cfi_def_cfa_offset 1614214; O0-NEXT:    .cfi_offset %rbx, -1614215; O0-NEXT:    movq %rdi, {{[-0-9]+}}(%r{{[sb]}}p) # 8-byte Spill14216; O0-NEXT:    movq foo(%rip), %rax14217; O0-NEXT:  .Lpcsection498:14218; O0-NEXT:    movq (%rdi), %rax14219; O0-NEXT:  .Lpcsection499:14220; O0-NEXT:    movq 8(%rdi), %rdx14221; O0-NEXT:    movq %rax, {{[-0-9]+}}(%r{{[sb]}}p) # 8-byte Spill14222; O0-NEXT:    movq %rdx, {{[-0-9]+}}(%r{{[sb]}}p) # 8-byte Spill14223; O0-NEXT:  .Lpcsection500:14224; O0-NEXT:    jmp .LBB214_114225; O0-NEXT:  .LBB214_1: # %atomicrmw.start14226; O0-NEXT:    # =>This Inner Loop Header: Depth=114227; O0-NEXT:    movq {{[-0-9]+}}(%r{{[sb]}}p), %rdx # 8-byte Reload14228; O0-NEXT:    movq {{[-0-9]+}}(%r{{[sb]}}p), %rax # 8-byte Reload14229; O0-NEXT:    movq {{[-0-9]+}}(%r{{[sb]}}p), %rsi # 8-byte Reload14230; O0-NEXT:    movl %eax, %ecx14231; O0-NEXT:  .Lpcsection501:14232; O0-NEXT:    notl %ecx14233; O0-NEXT:  .Lpcsection502:14234; O0-NEXT:    # implicit-def: $rbx14235; O0-NEXT:    movl %ecx, %ebx14236; O0-NEXT:  .Lpcsection503:14237; O0-NEXT:    orq $-43, %rbx14238; O0-NEXT:  .Lpcsection504:14239; O0-NEXT:    movq $-1, %rcx14240; O0-NEXT:  .Lpcsection505:14241; O0-NEXT:    lock cmpxchg16b (%rsi)14242; O0-NEXT:    movq %rax, {{[-0-9]+}}(%r{{[sb]}}p) # 8-byte Spill14243; O0-NEXT:    movq %rdx, {{[-0-9]+}}(%r{{[sb]}}p) # 8-byte Spill14244; O0-NEXT:  .Lpcsection506:14245; O0-NEXT:    jne .LBB214_114246; O0-NEXT:    jmp .LBB214_214247; O0-NEXT:  .LBB214_2: # %atomicrmw.end14248; O0-NEXT:    movq $1, foo14249; O0-NEXT:    popq %rbx14250; O0-NEXT:    .cfi_def_cfa_offset 814251; O0-NEXT:    retq14252;14253; O1-LABEL: atomic128_nand_monotonic:14254; O1:       # %bb.0: # %entry14255; O1-NEXT:    pushq %rbx14256; O1-NEXT:    .cfi_def_cfa_offset 1614257; O1-NEXT:    .cfi_offset %rbx, -1614258; O1-NEXT:    movq foo(%rip), %rax14259; O1-NEXT:  .Lpcsection453:14260; O1-NEXT:    movq (%rdi), %rax14261; O1-NEXT:  .Lpcsection454:14262; O1-NEXT:    movq 8(%rdi), %rdx14263; O1-NEXT:  .Lpcsection455:14264; O1-NEXT:    movq $-1, %rcx14265; O1-NEXT:    .p2align 414266; O1-NEXT:  .LBB214_1: # %atomicrmw.start14267; O1-NEXT:    # =>This Inner Loop Header: Depth=114268; O1-NEXT:    movl %eax, %ebx14269; O1-NEXT:  .Lpcsection456:14270; O1-NEXT:    notl %ebx14271; O1-NEXT:  .Lpcsection457:14272; O1-NEXT:    orq $-43, %rbx14273; O1-NEXT:  .Lpcsection458:14274; O1-NEXT:    lock cmpxchg16b (%rdi)14275; O1-NEXT:  .Lpcsection459:14276; O1-NEXT:    jne .LBB214_114277; O1-NEXT:  # %bb.2: # %atomicrmw.end14278; O1-NEXT:    movq $1, foo(%rip)14279; O1-NEXT:    popq %rbx14280; O1-NEXT:    .cfi_def_cfa_offset 814281; O1-NEXT:    retq14282;14283; O2-LABEL: atomic128_nand_monotonic:14284; O2:       # %bb.0: # %entry14285; O2-NEXT:    pushq %rbx14286; O2-NEXT:    .cfi_def_cfa_offset 1614287; O2-NEXT:    .cfi_offset %rbx, -1614288; O2-NEXT:    movq foo(%rip), %rax14289; O2-NEXT:  .Lpcsection453:14290; O2-NEXT:    movq (%rdi), %rax14291; O2-NEXT:  .Lpcsection454:14292; O2-NEXT:    movq 8(%rdi), %rdx14293; O2-NEXT:  .Lpcsection455:14294; O2-NEXT:    movq $-1, %rcx14295; O2-NEXT:    .p2align 414296; O2-NEXT:  .LBB214_1: # %atomicrmw.start14297; O2-NEXT:    # =>This Inner Loop Header: Depth=114298; O2-NEXT:    movl %eax, %ebx14299; O2-NEXT:  .Lpcsection456:14300; O2-NEXT:    notl %ebx14301; O2-NEXT:  .Lpcsection457:14302; O2-NEXT:    orq $-43, %rbx14303; O2-NEXT:  .Lpcsection458:14304; O2-NEXT:    lock cmpxchg16b (%rdi)14305; O2-NEXT:  .Lpcsection459:14306; O2-NEXT:    jne .LBB214_114307; O2-NEXT:  # %bb.2: # %atomicrmw.end14308; O2-NEXT:    movq $1, foo(%rip)14309; O2-NEXT:    popq %rbx14310; O2-NEXT:    .cfi_def_cfa_offset 814311; O2-NEXT:    retq14312;14313; O3-LABEL: atomic128_nand_monotonic:14314; O3:       # %bb.0: # %entry14315; O3-NEXT:    pushq %rbx14316; O3-NEXT:    .cfi_def_cfa_offset 1614317; O3-NEXT:    .cfi_offset %rbx, -1614318; O3-NEXT:    movq foo(%rip), %rax14319; O3-NEXT:  .Lpcsection453:14320; O3-NEXT:    movq (%rdi), %rax14321; O3-NEXT:  .Lpcsection454:14322; O3-NEXT:    movq 8(%rdi), %rdx14323; O3-NEXT:  .Lpcsection455:14324; O3-NEXT:    movq $-1, %rcx14325; O3-NEXT:    .p2align 414326; O3-NEXT:  .LBB214_1: # %atomicrmw.start14327; O3-NEXT:    # =>This Inner Loop Header: Depth=114328; O3-NEXT:    movl %eax, %ebx14329; O3-NEXT:  .Lpcsection456:14330; O3-NEXT:    notl %ebx14331; O3-NEXT:  .Lpcsection457:14332; O3-NEXT:    orq $-43, %rbx14333; O3-NEXT:  .Lpcsection458:14334; O3-NEXT:    lock cmpxchg16b (%rdi)14335; O3-NEXT:  .Lpcsection459:14336; O3-NEXT:    jne .LBB214_114337; O3-NEXT:  # %bb.2: # %atomicrmw.end14338; O3-NEXT:    movq $1, foo(%rip)14339; O3-NEXT:    popq %rbx14340; O3-NEXT:    .cfi_def_cfa_offset 814341; O3-NEXT:    retq14342;14343; HASWELL-O3-LABEL: atomic128_nand_monotonic:14344; HASWELL-O3:       # %bb.0: # %entry14345; HASWELL-O3-NEXT:    pushq %rbx14346; HASWELL-O3-NEXT:    .cfi_def_cfa_offset 1614347; HASWELL-O3-NEXT:    .cfi_offset %rbx, -1614348; HASWELL-O3-NEXT:    movq foo(%rip), %rax14349; HASWELL-O3-NEXT:  .Lpcsection430:14350; HASWELL-O3-NEXT:    movq (%rdi), %rax14351; HASWELL-O3-NEXT:  .Lpcsection431:14352; HASWELL-O3-NEXT:    movq 8(%rdi), %rdx14353; HASWELL-O3-NEXT:  .Lpcsection432:14354; HASWELL-O3-NEXT:    movq $-1, %rcx14355; HASWELL-O3-NEXT:    .p2align 414356; HASWELL-O3-NEXT:  .LBB214_1: # %atomicrmw.start14357; HASWELL-O3-NEXT:    # =>This Inner Loop Header: Depth=114358; HASWELL-O3-NEXT:    movl %eax, %ebx14359; HASWELL-O3-NEXT:  .Lpcsection433:14360; HASWELL-O3-NEXT:    notl %ebx14361; HASWELL-O3-NEXT:  .Lpcsection434:14362; HASWELL-O3-NEXT:    orq $-43, %rbx14363; HASWELL-O3-NEXT:  .Lpcsection435:14364; HASWELL-O3-NEXT:    lock cmpxchg16b (%rdi)14365; HASWELL-O3-NEXT:  .Lpcsection436:14366; HASWELL-O3-NEXT:    jne .LBB214_114367; HASWELL-O3-NEXT:  # %bb.2: # %atomicrmw.end14368; HASWELL-O3-NEXT:    movq $1, foo(%rip)14369; HASWELL-O3-NEXT:    popq %rbx14370; HASWELL-O3-NEXT:    .cfi_def_cfa_offset 814371; HASWELL-O3-NEXT:    retq14372entry:14373  load volatile i64, ptr @foo, align 814374  %x = atomicrmw nand ptr %a, i128 42 monotonic, align 16, !pcsections !014375  store volatile i64 1, ptr @foo, align 814376  ret void14377}14378 14379define void @atomic128_xchg_acquire(ptr %a) {14380; O0-LABEL: atomic128_xchg_acquire:14381; O0:       # %bb.0: # %entry14382; O0-NEXT:    pushq %rbx14383; O0-NEXT:    .cfi_def_cfa_offset 1614384; O0-NEXT:    .cfi_offset %rbx, -1614385; O0-NEXT:    movq %rdi, {{[-0-9]+}}(%r{{[sb]}}p) # 8-byte Spill14386; O0-NEXT:    movq foo(%rip), %rax14387; O0-NEXT:  .Lpcsection507:14388; O0-NEXT:    movq (%rdi), %rax14389; O0-NEXT:  .Lpcsection508:14390; O0-NEXT:    movq 8(%rdi), %rdx14391; O0-NEXT:    movq %rax, {{[-0-9]+}}(%r{{[sb]}}p) # 8-byte Spill14392; O0-NEXT:    movq %rdx, {{[-0-9]+}}(%r{{[sb]}}p) # 8-byte Spill14393; O0-NEXT:  .Lpcsection509:14394; O0-NEXT:    jmp .LBB215_114395; O0-NEXT:  .LBB215_1: # %atomicrmw.start14396; O0-NEXT:    # =>This Inner Loop Header: Depth=114397; O0-NEXT:    movq {{[-0-9]+}}(%r{{[sb]}}p), %rdx # 8-byte Reload14398; O0-NEXT:    movq {{[-0-9]+}}(%r{{[sb]}}p), %rax # 8-byte Reload14399; O0-NEXT:    movq {{[-0-9]+}}(%r{{[sb]}}p), %rsi # 8-byte Reload14400; O0-NEXT:  .Lpcsection510:14401; O0-NEXT:    xorl %ecx, %ecx14402; O0-NEXT:  .Lpcsection511:14403; O0-NEXT:    # kill: def $rcx killed $ecx14404; O0-NEXT:  .Lpcsection512:14405; O0-NEXT:    movl $42, %ebx14406; O0-NEXT:  .Lpcsection513:14407; O0-NEXT:    lock cmpxchg16b (%rsi)14408; O0-NEXT:    movq %rax, {{[-0-9]+}}(%r{{[sb]}}p) # 8-byte Spill14409; O0-NEXT:    movq %rdx, {{[-0-9]+}}(%r{{[sb]}}p) # 8-byte Spill14410; O0-NEXT:  .Lpcsection514:14411; O0-NEXT:    jne .LBB215_114412; O0-NEXT:    jmp .LBB215_214413; O0-NEXT:  .LBB215_2: # %atomicrmw.end14414; O0-NEXT:    movq $1, foo14415; O0-NEXT:    popq %rbx14416; O0-NEXT:    .cfi_def_cfa_offset 814417; O0-NEXT:    retq14418;14419; O1-LABEL: atomic128_xchg_acquire:14420; O1:       # %bb.0: # %entry14421; O1-NEXT:    pushq %rbx14422; O1-NEXT:    .cfi_def_cfa_offset 1614423; O1-NEXT:    .cfi_offset %rbx, -1614424; O1-NEXT:    movq foo(%rip), %rax14425; O1-NEXT:  .Lpcsection460:14426; O1-NEXT:    movq (%rdi), %rax14427; O1-NEXT:  .Lpcsection461:14428; O1-NEXT:    movq 8(%rdi), %rdx14429; O1-NEXT:  .Lpcsection462:14430; O1-NEXT:    movl $42, %ebx14431; O1-NEXT:    .p2align 414432; O1-NEXT:  .LBB215_1: # %atomicrmw.start14433; O1-NEXT:    # =>This Inner Loop Header: Depth=114434; O1-NEXT:  .Lpcsection463:14435; O1-NEXT:    xorl %ecx, %ecx14436; O1-NEXT:  .Lpcsection464:14437; O1-NEXT:    lock cmpxchg16b (%rdi)14438; O1-NEXT:  .Lpcsection465:14439; O1-NEXT:    jne .LBB215_114440; O1-NEXT:  # %bb.2: # %atomicrmw.end14441; O1-NEXT:    movq $1, foo(%rip)14442; O1-NEXT:    popq %rbx14443; O1-NEXT:    .cfi_def_cfa_offset 814444; O1-NEXT:    retq14445;14446; O2-LABEL: atomic128_xchg_acquire:14447; O2:       # %bb.0: # %entry14448; O2-NEXT:    pushq %rbx14449; O2-NEXT:    .cfi_def_cfa_offset 1614450; O2-NEXT:    .cfi_offset %rbx, -1614451; O2-NEXT:    movq foo(%rip), %rax14452; O2-NEXT:  .Lpcsection460:14453; O2-NEXT:    movq (%rdi), %rax14454; O2-NEXT:  .Lpcsection461:14455; O2-NEXT:    movq 8(%rdi), %rdx14456; O2-NEXT:  .Lpcsection462:14457; O2-NEXT:    movl $42, %ebx14458; O2-NEXT:    .p2align 414459; O2-NEXT:  .LBB215_1: # %atomicrmw.start14460; O2-NEXT:    # =>This Inner Loop Header: Depth=114461; O2-NEXT:  .Lpcsection463:14462; O2-NEXT:    xorl %ecx, %ecx14463; O2-NEXT:  .Lpcsection464:14464; O2-NEXT:    lock cmpxchg16b (%rdi)14465; O2-NEXT:  .Lpcsection465:14466; O2-NEXT:    jne .LBB215_114467; O2-NEXT:  # %bb.2: # %atomicrmw.end14468; O2-NEXT:    movq $1, foo(%rip)14469; O2-NEXT:    popq %rbx14470; O2-NEXT:    .cfi_def_cfa_offset 814471; O2-NEXT:    retq14472;14473; O3-LABEL: atomic128_xchg_acquire:14474; O3:       # %bb.0: # %entry14475; O3-NEXT:    pushq %rbx14476; O3-NEXT:    .cfi_def_cfa_offset 1614477; O3-NEXT:    .cfi_offset %rbx, -1614478; O3-NEXT:    movq foo(%rip), %rax14479; O3-NEXT:  .Lpcsection460:14480; O3-NEXT:    movq (%rdi), %rax14481; O3-NEXT:  .Lpcsection461:14482; O3-NEXT:    movq 8(%rdi), %rdx14483; O3-NEXT:  .Lpcsection462:14484; O3-NEXT:    movl $42, %ebx14485; O3-NEXT:    .p2align 414486; O3-NEXT:  .LBB215_1: # %atomicrmw.start14487; O3-NEXT:    # =>This Inner Loop Header: Depth=114488; O3-NEXT:  .Lpcsection463:14489; O3-NEXT:    xorl %ecx, %ecx14490; O3-NEXT:  .Lpcsection464:14491; O3-NEXT:    lock cmpxchg16b (%rdi)14492; O3-NEXT:  .Lpcsection465:14493; O3-NEXT:    jne .LBB215_114494; O3-NEXT:  # %bb.2: # %atomicrmw.end14495; O3-NEXT:    movq $1, foo(%rip)14496; O3-NEXT:    popq %rbx14497; O3-NEXT:    .cfi_def_cfa_offset 814498; O3-NEXT:    retq14499;14500; HASWELL-O3-LABEL: atomic128_xchg_acquire:14501; HASWELL-O3:       # %bb.0: # %entry14502; HASWELL-O3-NEXT:    pushq %rbx14503; HASWELL-O3-NEXT:    .cfi_def_cfa_offset 1614504; HASWELL-O3-NEXT:    .cfi_offset %rbx, -1614505; HASWELL-O3-NEXT:    movq foo(%rip), %rax14506; HASWELL-O3-NEXT:  .Lpcsection437:14507; HASWELL-O3-NEXT:    movq (%rdi), %rax14508; HASWELL-O3-NEXT:  .Lpcsection438:14509; HASWELL-O3-NEXT:    movq 8(%rdi), %rdx14510; HASWELL-O3-NEXT:  .Lpcsection439:14511; HASWELL-O3-NEXT:    movl $42, %ebx14512; HASWELL-O3-NEXT:    .p2align 414513; HASWELL-O3-NEXT:  .LBB215_1: # %atomicrmw.start14514; HASWELL-O3-NEXT:    # =>This Inner Loop Header: Depth=114515; HASWELL-O3-NEXT:  .Lpcsection440:14516; HASWELL-O3-NEXT:    xorl %ecx, %ecx14517; HASWELL-O3-NEXT:  .Lpcsection441:14518; HASWELL-O3-NEXT:    lock cmpxchg16b (%rdi)14519; HASWELL-O3-NEXT:  .Lpcsection442:14520; HASWELL-O3-NEXT:    jne .LBB215_114521; HASWELL-O3-NEXT:  # %bb.2: # %atomicrmw.end14522; HASWELL-O3-NEXT:    movq $1, foo(%rip)14523; HASWELL-O3-NEXT:    popq %rbx14524; HASWELL-O3-NEXT:    .cfi_def_cfa_offset 814525; HASWELL-O3-NEXT:    retq14526entry:14527  load volatile i64, ptr @foo, align 814528  %x = atomicrmw xchg ptr %a, i128 42 acquire, align 16, !pcsections !014529  store volatile i64 1, ptr @foo, align 814530  ret void14531}14532 14533define void @atomic128_add_acquire(ptr %a) {14534; O0-LABEL: atomic128_add_acquire:14535; O0:       # %bb.0: # %entry14536; O0-NEXT:    pushq %rbx14537; O0-NEXT:    .cfi_def_cfa_offset 1614538; O0-NEXT:    .cfi_offset %rbx, -1614539; O0-NEXT:    movq %rdi, {{[-0-9]+}}(%r{{[sb]}}p) # 8-byte Spill14540; O0-NEXT:    movq foo(%rip), %rax14541; O0-NEXT:  .Lpcsection515:14542; O0-NEXT:    movq (%rdi), %rax14543; O0-NEXT:  .Lpcsection516:14544; O0-NEXT:    movq 8(%rdi), %rdx14545; O0-NEXT:    movq %rax, {{[-0-9]+}}(%r{{[sb]}}p) # 8-byte Spill14546; O0-NEXT:    movq %rdx, {{[-0-9]+}}(%r{{[sb]}}p) # 8-byte Spill14547; O0-NEXT:  .Lpcsection517:14548; O0-NEXT:    jmp .LBB216_114549; O0-NEXT:  .LBB216_1: # %atomicrmw.start14550; O0-NEXT:    # =>This Inner Loop Header: Depth=114551; O0-NEXT:    movq {{[-0-9]+}}(%r{{[sb]}}p), %rdx # 8-byte Reload14552; O0-NEXT:    movq {{[-0-9]+}}(%r{{[sb]}}p), %rax # 8-byte Reload14553; O0-NEXT:    movq {{[-0-9]+}}(%r{{[sb]}}p), %rsi # 8-byte Reload14554; O0-NEXT:    movq %rax, %rbx14555; O0-NEXT:  .Lpcsection518:14556; O0-NEXT:    addq $42, %rbx14557; O0-NEXT:    movq %rdx, %rcx14558; O0-NEXT:  .Lpcsection519:14559; O0-NEXT:    adcq $0, %rcx14560; O0-NEXT:  .Lpcsection520:14561; O0-NEXT:    lock cmpxchg16b (%rsi)14562; O0-NEXT:    movq %rax, {{[-0-9]+}}(%r{{[sb]}}p) # 8-byte Spill14563; O0-NEXT:    movq %rdx, {{[-0-9]+}}(%r{{[sb]}}p) # 8-byte Spill14564; O0-NEXT:  .Lpcsection521:14565; O0-NEXT:    jne .LBB216_114566; O0-NEXT:    jmp .LBB216_214567; O0-NEXT:  .LBB216_2: # %atomicrmw.end14568; O0-NEXT:    movq $1, foo14569; O0-NEXT:    popq %rbx14570; O0-NEXT:    .cfi_def_cfa_offset 814571; O0-NEXT:    retq14572;14573; O1-LABEL: atomic128_add_acquire:14574; O1:       # %bb.0: # %entry14575; O1-NEXT:    pushq %rbx14576; O1-NEXT:    .cfi_def_cfa_offset 1614577; O1-NEXT:    .cfi_offset %rbx, -1614578; O1-NEXT:    movq foo(%rip), %rax14579; O1-NEXT:  .Lpcsection466:14580; O1-NEXT:    movq (%rdi), %rax14581; O1-NEXT:  .Lpcsection467:14582; O1-NEXT:    movq 8(%rdi), %rdx14583; O1-NEXT:    .p2align 414584; O1-NEXT:  .LBB216_1: # %atomicrmw.start14585; O1-NEXT:    # =>This Inner Loop Header: Depth=114586; O1-NEXT:    movq %rax, %rbx14587; O1-NEXT:  .Lpcsection468:14588; O1-NEXT:    addq $42, %rbx14589; O1-NEXT:    movq %rdx, %rcx14590; O1-NEXT:  .Lpcsection469:14591; O1-NEXT:    adcq $0, %rcx14592; O1-NEXT:  .Lpcsection470:14593; O1-NEXT:    lock cmpxchg16b (%rdi)14594; O1-NEXT:  .Lpcsection471:14595; O1-NEXT:    jne .LBB216_114596; O1-NEXT:  # %bb.2: # %atomicrmw.end14597; O1-NEXT:    movq $1, foo(%rip)14598; O1-NEXT:    popq %rbx14599; O1-NEXT:    .cfi_def_cfa_offset 814600; O1-NEXT:    retq14601;14602; O2-LABEL: atomic128_add_acquire:14603; O2:       # %bb.0: # %entry14604; O2-NEXT:    pushq %rbx14605; O2-NEXT:    .cfi_def_cfa_offset 1614606; O2-NEXT:    .cfi_offset %rbx, -1614607; O2-NEXT:    movq foo(%rip), %rax14608; O2-NEXT:  .Lpcsection466:14609; O2-NEXT:    movq (%rdi), %rax14610; O2-NEXT:  .Lpcsection467:14611; O2-NEXT:    movq 8(%rdi), %rdx14612; O2-NEXT:    .p2align 414613; O2-NEXT:  .LBB216_1: # %atomicrmw.start14614; O2-NEXT:    # =>This Inner Loop Header: Depth=114615; O2-NEXT:    movq %rax, %rbx14616; O2-NEXT:  .Lpcsection468:14617; O2-NEXT:    addq $42, %rbx14618; O2-NEXT:    movq %rdx, %rcx14619; O2-NEXT:  .Lpcsection469:14620; O2-NEXT:    adcq $0, %rcx14621; O2-NEXT:  .Lpcsection470:14622; O2-NEXT:    lock cmpxchg16b (%rdi)14623; O2-NEXT:  .Lpcsection471:14624; O2-NEXT:    jne .LBB216_114625; O2-NEXT:  # %bb.2: # %atomicrmw.end14626; O2-NEXT:    movq $1, foo(%rip)14627; O2-NEXT:    popq %rbx14628; O2-NEXT:    .cfi_def_cfa_offset 814629; O2-NEXT:    retq14630;14631; O3-LABEL: atomic128_add_acquire:14632; O3:       # %bb.0: # %entry14633; O3-NEXT:    pushq %rbx14634; O3-NEXT:    .cfi_def_cfa_offset 1614635; O3-NEXT:    .cfi_offset %rbx, -1614636; O3-NEXT:    movq foo(%rip), %rax14637; O3-NEXT:  .Lpcsection466:14638; O3-NEXT:    movq (%rdi), %rax14639; O3-NEXT:  .Lpcsection467:14640; O3-NEXT:    movq 8(%rdi), %rdx14641; O3-NEXT:    .p2align 414642; O3-NEXT:  .LBB216_1: # %atomicrmw.start14643; O3-NEXT:    # =>This Inner Loop Header: Depth=114644; O3-NEXT:    movq %rax, %rbx14645; O3-NEXT:  .Lpcsection468:14646; O3-NEXT:    addq $42, %rbx14647; O3-NEXT:    movq %rdx, %rcx14648; O3-NEXT:  .Lpcsection469:14649; O3-NEXT:    adcq $0, %rcx14650; O3-NEXT:  .Lpcsection470:14651; O3-NEXT:    lock cmpxchg16b (%rdi)14652; O3-NEXT:  .Lpcsection471:14653; O3-NEXT:    jne .LBB216_114654; O3-NEXT:  # %bb.2: # %atomicrmw.end14655; O3-NEXT:    movq $1, foo(%rip)14656; O3-NEXT:    popq %rbx14657; O3-NEXT:    .cfi_def_cfa_offset 814658; O3-NEXT:    retq14659;14660; HASWELL-O3-LABEL: atomic128_add_acquire:14661; HASWELL-O3:       # %bb.0: # %entry14662; HASWELL-O3-NEXT:    pushq %rbx14663; HASWELL-O3-NEXT:    .cfi_def_cfa_offset 1614664; HASWELL-O3-NEXT:    .cfi_offset %rbx, -1614665; HASWELL-O3-NEXT:    movq foo(%rip), %rax14666; HASWELL-O3-NEXT:  .Lpcsection443:14667; HASWELL-O3-NEXT:    movq (%rdi), %rax14668; HASWELL-O3-NEXT:  .Lpcsection444:14669; HASWELL-O3-NEXT:    movq 8(%rdi), %rdx14670; HASWELL-O3-NEXT:    .p2align 414671; HASWELL-O3-NEXT:  .LBB216_1: # %atomicrmw.start14672; HASWELL-O3-NEXT:    # =>This Inner Loop Header: Depth=114673; HASWELL-O3-NEXT:    movq %rax, %rbx14674; HASWELL-O3-NEXT:  .Lpcsection445:14675; HASWELL-O3-NEXT:    addq $42, %rbx14676; HASWELL-O3-NEXT:    movq %rdx, %rcx14677; HASWELL-O3-NEXT:  .Lpcsection446:14678; HASWELL-O3-NEXT:    adcq $0, %rcx14679; HASWELL-O3-NEXT:  .Lpcsection447:14680; HASWELL-O3-NEXT:    lock cmpxchg16b (%rdi)14681; HASWELL-O3-NEXT:  .Lpcsection448:14682; HASWELL-O3-NEXT:    jne .LBB216_114683; HASWELL-O3-NEXT:  # %bb.2: # %atomicrmw.end14684; HASWELL-O3-NEXT:    movq $1, foo(%rip)14685; HASWELL-O3-NEXT:    popq %rbx14686; HASWELL-O3-NEXT:    .cfi_def_cfa_offset 814687; HASWELL-O3-NEXT:    retq14688entry:14689  load volatile i64, ptr @foo, align 814690  %x = atomicrmw add ptr %a, i128 42 acquire, align 16, !pcsections !014691  store volatile i64 1, ptr @foo, align 814692  ret void14693}14694 14695define void @atomic128_sub_acquire(ptr %a) {14696; O0-LABEL: atomic128_sub_acquire:14697; O0:       # %bb.0: # %entry14698; O0-NEXT:    pushq %rbx14699; O0-NEXT:    .cfi_def_cfa_offset 1614700; O0-NEXT:    .cfi_offset %rbx, -1614701; O0-NEXT:    movq %rdi, {{[-0-9]+}}(%r{{[sb]}}p) # 8-byte Spill14702; O0-NEXT:    movq foo(%rip), %rax14703; O0-NEXT:  .Lpcsection522:14704; O0-NEXT:    movq (%rdi), %rax14705; O0-NEXT:  .Lpcsection523:14706; O0-NEXT:    movq 8(%rdi), %rdx14707; O0-NEXT:    movq %rax, {{[-0-9]+}}(%r{{[sb]}}p) # 8-byte Spill14708; O0-NEXT:    movq %rdx, {{[-0-9]+}}(%r{{[sb]}}p) # 8-byte Spill14709; O0-NEXT:  .Lpcsection524:14710; O0-NEXT:    jmp .LBB217_114711; O0-NEXT:  .LBB217_1: # %atomicrmw.start14712; O0-NEXT:    # =>This Inner Loop Header: Depth=114713; O0-NEXT:    movq {{[-0-9]+}}(%r{{[sb]}}p), %rdx # 8-byte Reload14714; O0-NEXT:    movq {{[-0-9]+}}(%r{{[sb]}}p), %rax # 8-byte Reload14715; O0-NEXT:    movq {{[-0-9]+}}(%r{{[sb]}}p), %rsi # 8-byte Reload14716; O0-NEXT:    movq %rax, %rbx14717; O0-NEXT:  .Lpcsection525:14718; O0-NEXT:    addq $-42, %rbx14719; O0-NEXT:    movq %rdx, %rcx14720; O0-NEXT:  .Lpcsection526:14721; O0-NEXT:    adcq $-1, %rcx14722; O0-NEXT:  .Lpcsection527:14723; O0-NEXT:    lock cmpxchg16b (%rsi)14724; O0-NEXT:    movq %rax, {{[-0-9]+}}(%r{{[sb]}}p) # 8-byte Spill14725; O0-NEXT:    movq %rdx, {{[-0-9]+}}(%r{{[sb]}}p) # 8-byte Spill14726; O0-NEXT:  .Lpcsection528:14727; O0-NEXT:    jne .LBB217_114728; O0-NEXT:    jmp .LBB217_214729; O0-NEXT:  .LBB217_2: # %atomicrmw.end14730; O0-NEXT:    movq $1, foo14731; O0-NEXT:    popq %rbx14732; O0-NEXT:    .cfi_def_cfa_offset 814733; O0-NEXT:    retq14734;14735; O1-LABEL: atomic128_sub_acquire:14736; O1:       # %bb.0: # %entry14737; O1-NEXT:    pushq %rbx14738; O1-NEXT:    .cfi_def_cfa_offset 1614739; O1-NEXT:    .cfi_offset %rbx, -1614740; O1-NEXT:    movq foo(%rip), %rax14741; O1-NEXT:  .Lpcsection472:14742; O1-NEXT:    movq (%rdi), %rax14743; O1-NEXT:  .Lpcsection473:14744; O1-NEXT:    movq 8(%rdi), %rdx14745; O1-NEXT:    .p2align 414746; O1-NEXT:  .LBB217_1: # %atomicrmw.start14747; O1-NEXT:    # =>This Inner Loop Header: Depth=114748; O1-NEXT:    movq %rax, %rbx14749; O1-NEXT:  .Lpcsection474:14750; O1-NEXT:    addq $-42, %rbx14751; O1-NEXT:    movq %rdx, %rcx14752; O1-NEXT:  .Lpcsection475:14753; O1-NEXT:    adcq $-1, %rcx14754; O1-NEXT:  .Lpcsection476:14755; O1-NEXT:    lock cmpxchg16b (%rdi)14756; O1-NEXT:  .Lpcsection477:14757; O1-NEXT:    jne .LBB217_114758; O1-NEXT:  # %bb.2: # %atomicrmw.end14759; O1-NEXT:    movq $1, foo(%rip)14760; O1-NEXT:    popq %rbx14761; O1-NEXT:    .cfi_def_cfa_offset 814762; O1-NEXT:    retq14763;14764; O2-LABEL: atomic128_sub_acquire:14765; O2:       # %bb.0: # %entry14766; O2-NEXT:    pushq %rbx14767; O2-NEXT:    .cfi_def_cfa_offset 1614768; O2-NEXT:    .cfi_offset %rbx, -1614769; O2-NEXT:    movq foo(%rip), %rax14770; O2-NEXT:  .Lpcsection472:14771; O2-NEXT:    movq (%rdi), %rax14772; O2-NEXT:  .Lpcsection473:14773; O2-NEXT:    movq 8(%rdi), %rdx14774; O2-NEXT:    .p2align 414775; O2-NEXT:  .LBB217_1: # %atomicrmw.start14776; O2-NEXT:    # =>This Inner Loop Header: Depth=114777; O2-NEXT:    movq %rax, %rbx14778; O2-NEXT:  .Lpcsection474:14779; O2-NEXT:    addq $-42, %rbx14780; O2-NEXT:    movq %rdx, %rcx14781; O2-NEXT:  .Lpcsection475:14782; O2-NEXT:    adcq $-1, %rcx14783; O2-NEXT:  .Lpcsection476:14784; O2-NEXT:    lock cmpxchg16b (%rdi)14785; O2-NEXT:  .Lpcsection477:14786; O2-NEXT:    jne .LBB217_114787; O2-NEXT:  # %bb.2: # %atomicrmw.end14788; O2-NEXT:    movq $1, foo(%rip)14789; O2-NEXT:    popq %rbx14790; O2-NEXT:    .cfi_def_cfa_offset 814791; O2-NEXT:    retq14792;14793; O3-LABEL: atomic128_sub_acquire:14794; O3:       # %bb.0: # %entry14795; O3-NEXT:    pushq %rbx14796; O3-NEXT:    .cfi_def_cfa_offset 1614797; O3-NEXT:    .cfi_offset %rbx, -1614798; O3-NEXT:    movq foo(%rip), %rax14799; O3-NEXT:  .Lpcsection472:14800; O3-NEXT:    movq (%rdi), %rax14801; O3-NEXT:  .Lpcsection473:14802; O3-NEXT:    movq 8(%rdi), %rdx14803; O3-NEXT:    .p2align 414804; O3-NEXT:  .LBB217_1: # %atomicrmw.start14805; O3-NEXT:    # =>This Inner Loop Header: Depth=114806; O3-NEXT:    movq %rax, %rbx14807; O3-NEXT:  .Lpcsection474:14808; O3-NEXT:    addq $-42, %rbx14809; O3-NEXT:    movq %rdx, %rcx14810; O3-NEXT:  .Lpcsection475:14811; O3-NEXT:    adcq $-1, %rcx14812; O3-NEXT:  .Lpcsection476:14813; O3-NEXT:    lock cmpxchg16b (%rdi)14814; O3-NEXT:  .Lpcsection477:14815; O3-NEXT:    jne .LBB217_114816; O3-NEXT:  # %bb.2: # %atomicrmw.end14817; O3-NEXT:    movq $1, foo(%rip)14818; O3-NEXT:    popq %rbx14819; O3-NEXT:    .cfi_def_cfa_offset 814820; O3-NEXT:    retq14821;14822; HASWELL-O3-LABEL: atomic128_sub_acquire:14823; HASWELL-O3:       # %bb.0: # %entry14824; HASWELL-O3-NEXT:    pushq %rbx14825; HASWELL-O3-NEXT:    .cfi_def_cfa_offset 1614826; HASWELL-O3-NEXT:    .cfi_offset %rbx, -1614827; HASWELL-O3-NEXT:    movq foo(%rip), %rax14828; HASWELL-O3-NEXT:  .Lpcsection449:14829; HASWELL-O3-NEXT:    movq (%rdi), %rax14830; HASWELL-O3-NEXT:  .Lpcsection450:14831; HASWELL-O3-NEXT:    movq 8(%rdi), %rdx14832; HASWELL-O3-NEXT:    .p2align 414833; HASWELL-O3-NEXT:  .LBB217_1: # %atomicrmw.start14834; HASWELL-O3-NEXT:    # =>This Inner Loop Header: Depth=114835; HASWELL-O3-NEXT:    movq %rax, %rbx14836; HASWELL-O3-NEXT:  .Lpcsection451:14837; HASWELL-O3-NEXT:    addq $-42, %rbx14838; HASWELL-O3-NEXT:    movq %rdx, %rcx14839; HASWELL-O3-NEXT:  .Lpcsection452:14840; HASWELL-O3-NEXT:    adcq $-1, %rcx14841; HASWELL-O3-NEXT:  .Lpcsection453:14842; HASWELL-O3-NEXT:    lock cmpxchg16b (%rdi)14843; HASWELL-O3-NEXT:  .Lpcsection454:14844; HASWELL-O3-NEXT:    jne .LBB217_114845; HASWELL-O3-NEXT:  # %bb.2: # %atomicrmw.end14846; HASWELL-O3-NEXT:    movq $1, foo(%rip)14847; HASWELL-O3-NEXT:    popq %rbx14848; HASWELL-O3-NEXT:    .cfi_def_cfa_offset 814849; HASWELL-O3-NEXT:    retq14850entry:14851  load volatile i64, ptr @foo, align 814852  %x = atomicrmw sub ptr %a, i128 42 acquire, align 16, !pcsections !014853  store volatile i64 1, ptr @foo, align 814854  ret void14855}14856 14857define void @atomic128_and_acquire(ptr %a) {14858; O0-LABEL: atomic128_and_acquire:14859; O0:       # %bb.0: # %entry14860; O0-NEXT:    pushq %rbx14861; O0-NEXT:    .cfi_def_cfa_offset 1614862; O0-NEXT:    .cfi_offset %rbx, -1614863; O0-NEXT:    movq %rdi, {{[-0-9]+}}(%r{{[sb]}}p) # 8-byte Spill14864; O0-NEXT:    movq foo(%rip), %rax14865; O0-NEXT:  .Lpcsection529:14866; O0-NEXT:    movq (%rdi), %rax14867; O0-NEXT:  .Lpcsection530:14868; O0-NEXT:    movq 8(%rdi), %rdx14869; O0-NEXT:    movq %rax, {{[-0-9]+}}(%r{{[sb]}}p) # 8-byte Spill14870; O0-NEXT:    movq %rdx, {{[-0-9]+}}(%r{{[sb]}}p) # 8-byte Spill14871; O0-NEXT:  .Lpcsection531:14872; O0-NEXT:    jmp .LBB218_114873; O0-NEXT:  .LBB218_1: # %atomicrmw.start14874; O0-NEXT:    # =>This Inner Loop Header: Depth=114875; O0-NEXT:    movq {{[-0-9]+}}(%r{{[sb]}}p), %rdx # 8-byte Reload14876; O0-NEXT:    movq {{[-0-9]+}}(%r{{[sb]}}p), %rax # 8-byte Reload14877; O0-NEXT:    movq {{[-0-9]+}}(%r{{[sb]}}p), %rsi # 8-byte Reload14878; O0-NEXT:    movl %eax, %ecx14879; O0-NEXT:  .Lpcsection532:14880; O0-NEXT:    andl $42, %ecx14881; O0-NEXT:    movl %ecx, %ebx14882; O0-NEXT:  .Lpcsection533:14883; O0-NEXT:    xorl %ecx, %ecx14884; O0-NEXT:  .Lpcsection534:14885; O0-NEXT:    # kill: def $rcx killed $ecx14886; O0-NEXT:  .Lpcsection535:14887; O0-NEXT:    lock cmpxchg16b (%rsi)14888; O0-NEXT:    movq %rax, {{[-0-9]+}}(%r{{[sb]}}p) # 8-byte Spill14889; O0-NEXT:    movq %rdx, {{[-0-9]+}}(%r{{[sb]}}p) # 8-byte Spill14890; O0-NEXT:  .Lpcsection536:14891; O0-NEXT:    jne .LBB218_114892; O0-NEXT:    jmp .LBB218_214893; O0-NEXT:  .LBB218_2: # %atomicrmw.end14894; O0-NEXT:    movq $1, foo14895; O0-NEXT:    popq %rbx14896; O0-NEXT:    .cfi_def_cfa_offset 814897; O0-NEXT:    retq14898;14899; O1-LABEL: atomic128_and_acquire:14900; O1:       # %bb.0: # %entry14901; O1-NEXT:    pushq %rbx14902; O1-NEXT:    .cfi_def_cfa_offset 1614903; O1-NEXT:    .cfi_offset %rbx, -1614904; O1-NEXT:    movq foo(%rip), %rax14905; O1-NEXT:  .Lpcsection478:14906; O1-NEXT:    movq (%rdi), %rax14907; O1-NEXT:  .Lpcsection479:14908; O1-NEXT:    movq 8(%rdi), %rdx14909; O1-NEXT:    .p2align 414910; O1-NEXT:  .LBB218_1: # %atomicrmw.start14911; O1-NEXT:    # =>This Inner Loop Header: Depth=114912; O1-NEXT:    movl %eax, %ebx14913; O1-NEXT:  .Lpcsection480:14914; O1-NEXT:    andl $42, %ebx14915; O1-NEXT:  .Lpcsection481:14916; O1-NEXT:    xorl %ecx, %ecx14917; O1-NEXT:  .Lpcsection482:14918; O1-NEXT:    lock cmpxchg16b (%rdi)14919; O1-NEXT:  .Lpcsection483:14920; O1-NEXT:    jne .LBB218_114921; O1-NEXT:  # %bb.2: # %atomicrmw.end14922; O1-NEXT:    movq $1, foo(%rip)14923; O1-NEXT:    popq %rbx14924; O1-NEXT:    .cfi_def_cfa_offset 814925; O1-NEXT:    retq14926;14927; O2-LABEL: atomic128_and_acquire:14928; O2:       # %bb.0: # %entry14929; O2-NEXT:    pushq %rbx14930; O2-NEXT:    .cfi_def_cfa_offset 1614931; O2-NEXT:    .cfi_offset %rbx, -1614932; O2-NEXT:    movq foo(%rip), %rax14933; O2-NEXT:  .Lpcsection478:14934; O2-NEXT:    movq (%rdi), %rax14935; O2-NEXT:  .Lpcsection479:14936; O2-NEXT:    movq 8(%rdi), %rdx14937; O2-NEXT:    .p2align 414938; O2-NEXT:  .LBB218_1: # %atomicrmw.start14939; O2-NEXT:    # =>This Inner Loop Header: Depth=114940; O2-NEXT:    movl %eax, %ebx14941; O2-NEXT:  .Lpcsection480:14942; O2-NEXT:    andl $42, %ebx14943; O2-NEXT:  .Lpcsection481:14944; O2-NEXT:    xorl %ecx, %ecx14945; O2-NEXT:  .Lpcsection482:14946; O2-NEXT:    lock cmpxchg16b (%rdi)14947; O2-NEXT:  .Lpcsection483:14948; O2-NEXT:    jne .LBB218_114949; O2-NEXT:  # %bb.2: # %atomicrmw.end14950; O2-NEXT:    movq $1, foo(%rip)14951; O2-NEXT:    popq %rbx14952; O2-NEXT:    .cfi_def_cfa_offset 814953; O2-NEXT:    retq14954;14955; O3-LABEL: atomic128_and_acquire:14956; O3:       # %bb.0: # %entry14957; O3-NEXT:    pushq %rbx14958; O3-NEXT:    .cfi_def_cfa_offset 1614959; O3-NEXT:    .cfi_offset %rbx, -1614960; O3-NEXT:    movq foo(%rip), %rax14961; O3-NEXT:  .Lpcsection478:14962; O3-NEXT:    movq (%rdi), %rax14963; O3-NEXT:  .Lpcsection479:14964; O3-NEXT:    movq 8(%rdi), %rdx14965; O3-NEXT:    .p2align 414966; O3-NEXT:  .LBB218_1: # %atomicrmw.start14967; O3-NEXT:    # =>This Inner Loop Header: Depth=114968; O3-NEXT:    movl %eax, %ebx14969; O3-NEXT:  .Lpcsection480:14970; O3-NEXT:    andl $42, %ebx14971; O3-NEXT:  .Lpcsection481:14972; O3-NEXT:    xorl %ecx, %ecx14973; O3-NEXT:  .Lpcsection482:14974; O3-NEXT:    lock cmpxchg16b (%rdi)14975; O3-NEXT:  .Lpcsection483:14976; O3-NEXT:    jne .LBB218_114977; O3-NEXT:  # %bb.2: # %atomicrmw.end14978; O3-NEXT:    movq $1, foo(%rip)14979; O3-NEXT:    popq %rbx14980; O3-NEXT:    .cfi_def_cfa_offset 814981; O3-NEXT:    retq14982;14983; HASWELL-O3-LABEL: atomic128_and_acquire:14984; HASWELL-O3:       # %bb.0: # %entry14985; HASWELL-O3-NEXT:    pushq %rbx14986; HASWELL-O3-NEXT:    .cfi_def_cfa_offset 1614987; HASWELL-O3-NEXT:    .cfi_offset %rbx, -1614988; HASWELL-O3-NEXT:    movq foo(%rip), %rax14989; HASWELL-O3-NEXT:  .Lpcsection455:14990; HASWELL-O3-NEXT:    movq (%rdi), %rax14991; HASWELL-O3-NEXT:  .Lpcsection456:14992; HASWELL-O3-NEXT:    movq 8(%rdi), %rdx14993; HASWELL-O3-NEXT:    .p2align 414994; HASWELL-O3-NEXT:  .LBB218_1: # %atomicrmw.start14995; HASWELL-O3-NEXT:    # =>This Inner Loop Header: Depth=114996; HASWELL-O3-NEXT:    movl %eax, %ebx14997; HASWELL-O3-NEXT:  .Lpcsection457:14998; HASWELL-O3-NEXT:    andl $42, %ebx14999; HASWELL-O3-NEXT:  .Lpcsection458:15000; HASWELL-O3-NEXT:    xorl %ecx, %ecx15001; HASWELL-O3-NEXT:  .Lpcsection459:15002; HASWELL-O3-NEXT:    lock cmpxchg16b (%rdi)15003; HASWELL-O3-NEXT:  .Lpcsection460:15004; HASWELL-O3-NEXT:    jne .LBB218_115005; HASWELL-O3-NEXT:  # %bb.2: # %atomicrmw.end15006; HASWELL-O3-NEXT:    movq $1, foo(%rip)15007; HASWELL-O3-NEXT:    popq %rbx15008; HASWELL-O3-NEXT:    .cfi_def_cfa_offset 815009; HASWELL-O3-NEXT:    retq15010entry:15011  load volatile i64, ptr @foo, align 815012  %x = atomicrmw and ptr %a, i128 42 acquire, align 16, !pcsections !015013  store volatile i64 1, ptr @foo, align 815014  ret void15015}15016 15017define void @atomic128_or_acquire(ptr %a) {15018; O0-LABEL: atomic128_or_acquire:15019; O0:       # %bb.0: # %entry15020; O0-NEXT:    pushq %rbx15021; O0-NEXT:    .cfi_def_cfa_offset 1615022; O0-NEXT:    .cfi_offset %rbx, -1615023; O0-NEXT:    movq %rdi, {{[-0-9]+}}(%r{{[sb]}}p) # 8-byte Spill15024; O0-NEXT:    movq foo(%rip), %rax15025; O0-NEXT:  .Lpcsection537:15026; O0-NEXT:    movq (%rdi), %rax15027; O0-NEXT:  .Lpcsection538:15028; O0-NEXT:    movq 8(%rdi), %rdx15029; O0-NEXT:    movq %rax, {{[-0-9]+}}(%r{{[sb]}}p) # 8-byte Spill15030; O0-NEXT:    movq %rdx, {{[-0-9]+}}(%r{{[sb]}}p) # 8-byte Spill15031; O0-NEXT:  .Lpcsection539:15032; O0-NEXT:    jmp .LBB219_115033; O0-NEXT:  .LBB219_1: # %atomicrmw.start15034; O0-NEXT:    # =>This Inner Loop Header: Depth=115035; O0-NEXT:    movq {{[-0-9]+}}(%r{{[sb]}}p), %rcx # 8-byte Reload15036; O0-NEXT:    movq {{[-0-9]+}}(%r{{[sb]}}p), %rax # 8-byte Reload15037; O0-NEXT:    movq {{[-0-9]+}}(%r{{[sb]}}p), %rsi # 8-byte Reload15038; O0-NEXT:    movq %rax, %rbx15039; O0-NEXT:  .Lpcsection540:15040; O0-NEXT:    orq $42, %rbx15041; O0-NEXT:    movq %rcx, %rdx15042; O0-NEXT:  .Lpcsection541:15043; O0-NEXT:    lock cmpxchg16b (%rsi)15044; O0-NEXT:    movq %rax, {{[-0-9]+}}(%r{{[sb]}}p) # 8-byte Spill15045; O0-NEXT:    movq %rdx, {{[-0-9]+}}(%r{{[sb]}}p) # 8-byte Spill15046; O0-NEXT:  .Lpcsection542:15047; O0-NEXT:    jne .LBB219_115048; O0-NEXT:    jmp .LBB219_215049; O0-NEXT:  .LBB219_2: # %atomicrmw.end15050; O0-NEXT:    movq $1, foo15051; O0-NEXT:    popq %rbx15052; O0-NEXT:    .cfi_def_cfa_offset 815053; O0-NEXT:    retq15054;15055; O1-LABEL: atomic128_or_acquire:15056; O1:       # %bb.0: # %entry15057; O1-NEXT:    pushq %rbx15058; O1-NEXT:    .cfi_def_cfa_offset 1615059; O1-NEXT:    .cfi_offset %rbx, -1615060; O1-NEXT:    movq foo(%rip), %rax15061; O1-NEXT:  .Lpcsection484:15062; O1-NEXT:    movq (%rdi), %rax15063; O1-NEXT:  .Lpcsection485:15064; O1-NEXT:    movq 8(%rdi), %rdx15065; O1-NEXT:    .p2align 415066; O1-NEXT:  .LBB219_1: # %atomicrmw.start15067; O1-NEXT:    # =>This Inner Loop Header: Depth=115068; O1-NEXT:    movq %rax, %rbx15069; O1-NEXT:  .Lpcsection486:15070; O1-NEXT:    orq $42, %rbx15071; O1-NEXT:    movq %rdx, %rcx15072; O1-NEXT:  .Lpcsection487:15073; O1-NEXT:    lock cmpxchg16b (%rdi)15074; O1-NEXT:  .Lpcsection488:15075; O1-NEXT:    jne .LBB219_115076; O1-NEXT:  # %bb.2: # %atomicrmw.end15077; O1-NEXT:    movq $1, foo(%rip)15078; O1-NEXT:    popq %rbx15079; O1-NEXT:    .cfi_def_cfa_offset 815080; O1-NEXT:    retq15081;15082; O2-LABEL: atomic128_or_acquire:15083; O2:       # %bb.0: # %entry15084; O2-NEXT:    pushq %rbx15085; O2-NEXT:    .cfi_def_cfa_offset 1615086; O2-NEXT:    .cfi_offset %rbx, -1615087; O2-NEXT:    movq foo(%rip), %rax15088; O2-NEXT:  .Lpcsection484:15089; O2-NEXT:    movq (%rdi), %rax15090; O2-NEXT:  .Lpcsection485:15091; O2-NEXT:    movq 8(%rdi), %rdx15092; O2-NEXT:    .p2align 415093; O2-NEXT:  .LBB219_1: # %atomicrmw.start15094; O2-NEXT:    # =>This Inner Loop Header: Depth=115095; O2-NEXT:    movq %rax, %rbx15096; O2-NEXT:  .Lpcsection486:15097; O2-NEXT:    orq $42, %rbx15098; O2-NEXT:    movq %rdx, %rcx15099; O2-NEXT:  .Lpcsection487:15100; O2-NEXT:    lock cmpxchg16b (%rdi)15101; O2-NEXT:  .Lpcsection488:15102; O2-NEXT:    jne .LBB219_115103; O2-NEXT:  # %bb.2: # %atomicrmw.end15104; O2-NEXT:    movq $1, foo(%rip)15105; O2-NEXT:    popq %rbx15106; O2-NEXT:    .cfi_def_cfa_offset 815107; O2-NEXT:    retq15108;15109; O3-LABEL: atomic128_or_acquire:15110; O3:       # %bb.0: # %entry15111; O3-NEXT:    pushq %rbx15112; O3-NEXT:    .cfi_def_cfa_offset 1615113; O3-NEXT:    .cfi_offset %rbx, -1615114; O3-NEXT:    movq foo(%rip), %rax15115; O3-NEXT:  .Lpcsection484:15116; O3-NEXT:    movq (%rdi), %rax15117; O3-NEXT:  .Lpcsection485:15118; O3-NEXT:    movq 8(%rdi), %rdx15119; O3-NEXT:    .p2align 415120; O3-NEXT:  .LBB219_1: # %atomicrmw.start15121; O3-NEXT:    # =>This Inner Loop Header: Depth=115122; O3-NEXT:    movq %rax, %rbx15123; O3-NEXT:  .Lpcsection486:15124; O3-NEXT:    orq $42, %rbx15125; O3-NEXT:    movq %rdx, %rcx15126; O3-NEXT:  .Lpcsection487:15127; O3-NEXT:    lock cmpxchg16b (%rdi)15128; O3-NEXT:  .Lpcsection488:15129; O3-NEXT:    jne .LBB219_115130; O3-NEXT:  # %bb.2: # %atomicrmw.end15131; O3-NEXT:    movq $1, foo(%rip)15132; O3-NEXT:    popq %rbx15133; O3-NEXT:    .cfi_def_cfa_offset 815134; O3-NEXT:    retq15135;15136; HASWELL-O3-LABEL: atomic128_or_acquire:15137; HASWELL-O3:       # %bb.0: # %entry15138; HASWELL-O3-NEXT:    pushq %rbx15139; HASWELL-O3-NEXT:    .cfi_def_cfa_offset 1615140; HASWELL-O3-NEXT:    .cfi_offset %rbx, -1615141; HASWELL-O3-NEXT:    movq foo(%rip), %rax15142; HASWELL-O3-NEXT:  .Lpcsection461:15143; HASWELL-O3-NEXT:    movq (%rdi), %rax15144; HASWELL-O3-NEXT:  .Lpcsection462:15145; HASWELL-O3-NEXT:    movq 8(%rdi), %rdx15146; HASWELL-O3-NEXT:    .p2align 415147; HASWELL-O3-NEXT:  .LBB219_1: # %atomicrmw.start15148; HASWELL-O3-NEXT:    # =>This Inner Loop Header: Depth=115149; HASWELL-O3-NEXT:    movq %rax, %rbx15150; HASWELL-O3-NEXT:  .Lpcsection463:15151; HASWELL-O3-NEXT:    orq $42, %rbx15152; HASWELL-O3-NEXT:    movq %rdx, %rcx15153; HASWELL-O3-NEXT:  .Lpcsection464:15154; HASWELL-O3-NEXT:    lock cmpxchg16b (%rdi)15155; HASWELL-O3-NEXT:  .Lpcsection465:15156; HASWELL-O3-NEXT:    jne .LBB219_115157; HASWELL-O3-NEXT:  # %bb.2: # %atomicrmw.end15158; HASWELL-O3-NEXT:    movq $1, foo(%rip)15159; HASWELL-O3-NEXT:    popq %rbx15160; HASWELL-O3-NEXT:    .cfi_def_cfa_offset 815161; HASWELL-O3-NEXT:    retq15162entry:15163  load volatile i64, ptr @foo, align 815164  %x = atomicrmw or ptr %a, i128 42 acquire, align 16, !pcsections !015165  store volatile i64 1, ptr @foo, align 815166  ret void15167}15168 15169define void @atomic128_xor_acquire(ptr %a) {15170; O0-LABEL: atomic128_xor_acquire:15171; O0:       # %bb.0: # %entry15172; O0-NEXT:    pushq %rbx15173; O0-NEXT:    .cfi_def_cfa_offset 1615174; O0-NEXT:    .cfi_offset %rbx, -1615175; O0-NEXT:    movq %rdi, {{[-0-9]+}}(%r{{[sb]}}p) # 8-byte Spill15176; O0-NEXT:    movq foo(%rip), %rax15177; O0-NEXT:  .Lpcsection543:15178; O0-NEXT:    movq (%rdi), %rax15179; O0-NEXT:  .Lpcsection544:15180; O0-NEXT:    movq 8(%rdi), %rdx15181; O0-NEXT:    movq %rax, {{[-0-9]+}}(%r{{[sb]}}p) # 8-byte Spill15182; O0-NEXT:    movq %rdx, {{[-0-9]+}}(%r{{[sb]}}p) # 8-byte Spill15183; O0-NEXT:  .Lpcsection545:15184; O0-NEXT:    jmp .LBB220_115185; O0-NEXT:  .LBB220_1: # %atomicrmw.start15186; O0-NEXT:    # =>This Inner Loop Header: Depth=115187; O0-NEXT:    movq {{[-0-9]+}}(%r{{[sb]}}p), %rcx # 8-byte Reload15188; O0-NEXT:    movq {{[-0-9]+}}(%r{{[sb]}}p), %rax # 8-byte Reload15189; O0-NEXT:    movq {{[-0-9]+}}(%r{{[sb]}}p), %rsi # 8-byte Reload15190; O0-NEXT:    movq %rax, %rbx15191; O0-NEXT:  .Lpcsection546:15192; O0-NEXT:    xorq $42, %rbx15193; O0-NEXT:    movq %rcx, %rdx15194; O0-NEXT:  .Lpcsection547:15195; O0-NEXT:    lock cmpxchg16b (%rsi)15196; O0-NEXT:    movq %rax, {{[-0-9]+}}(%r{{[sb]}}p) # 8-byte Spill15197; O0-NEXT:    movq %rdx, {{[-0-9]+}}(%r{{[sb]}}p) # 8-byte Spill15198; O0-NEXT:  .Lpcsection548:15199; O0-NEXT:    jne .LBB220_115200; O0-NEXT:    jmp .LBB220_215201; O0-NEXT:  .LBB220_2: # %atomicrmw.end15202; O0-NEXT:    movq $1, foo15203; O0-NEXT:    popq %rbx15204; O0-NEXT:    .cfi_def_cfa_offset 815205; O0-NEXT:    retq15206;15207; O1-LABEL: atomic128_xor_acquire:15208; O1:       # %bb.0: # %entry15209; O1-NEXT:    pushq %rbx15210; O1-NEXT:    .cfi_def_cfa_offset 1615211; O1-NEXT:    .cfi_offset %rbx, -1615212; O1-NEXT:    movq foo(%rip), %rax15213; O1-NEXT:  .Lpcsection489:15214; O1-NEXT:    movq (%rdi), %rax15215; O1-NEXT:  .Lpcsection490:15216; O1-NEXT:    movq 8(%rdi), %rdx15217; O1-NEXT:    .p2align 415218; O1-NEXT:  .LBB220_1: # %atomicrmw.start15219; O1-NEXT:    # =>This Inner Loop Header: Depth=115220; O1-NEXT:    movq %rax, %rbx15221; O1-NEXT:  .Lpcsection491:15222; O1-NEXT:    xorq $42, %rbx15223; O1-NEXT:    movq %rdx, %rcx15224; O1-NEXT:  .Lpcsection492:15225; O1-NEXT:    lock cmpxchg16b (%rdi)15226; O1-NEXT:  .Lpcsection493:15227; O1-NEXT:    jne .LBB220_115228; O1-NEXT:  # %bb.2: # %atomicrmw.end15229; O1-NEXT:    movq $1, foo(%rip)15230; O1-NEXT:    popq %rbx15231; O1-NEXT:    .cfi_def_cfa_offset 815232; O1-NEXT:    retq15233;15234; O2-LABEL: atomic128_xor_acquire:15235; O2:       # %bb.0: # %entry15236; O2-NEXT:    pushq %rbx15237; O2-NEXT:    .cfi_def_cfa_offset 1615238; O2-NEXT:    .cfi_offset %rbx, -1615239; O2-NEXT:    movq foo(%rip), %rax15240; O2-NEXT:  .Lpcsection489:15241; O2-NEXT:    movq (%rdi), %rax15242; O2-NEXT:  .Lpcsection490:15243; O2-NEXT:    movq 8(%rdi), %rdx15244; O2-NEXT:    .p2align 415245; O2-NEXT:  .LBB220_1: # %atomicrmw.start15246; O2-NEXT:    # =>This Inner Loop Header: Depth=115247; O2-NEXT:    movq %rax, %rbx15248; O2-NEXT:  .Lpcsection491:15249; O2-NEXT:    xorq $42, %rbx15250; O2-NEXT:    movq %rdx, %rcx15251; O2-NEXT:  .Lpcsection492:15252; O2-NEXT:    lock cmpxchg16b (%rdi)15253; O2-NEXT:  .Lpcsection493:15254; O2-NEXT:    jne .LBB220_115255; O2-NEXT:  # %bb.2: # %atomicrmw.end15256; O2-NEXT:    movq $1, foo(%rip)15257; O2-NEXT:    popq %rbx15258; O2-NEXT:    .cfi_def_cfa_offset 815259; O2-NEXT:    retq15260;15261; O3-LABEL: atomic128_xor_acquire:15262; O3:       # %bb.0: # %entry15263; O3-NEXT:    pushq %rbx15264; O3-NEXT:    .cfi_def_cfa_offset 1615265; O3-NEXT:    .cfi_offset %rbx, -1615266; O3-NEXT:    movq foo(%rip), %rax15267; O3-NEXT:  .Lpcsection489:15268; O3-NEXT:    movq (%rdi), %rax15269; O3-NEXT:  .Lpcsection490:15270; O3-NEXT:    movq 8(%rdi), %rdx15271; O3-NEXT:    .p2align 415272; O3-NEXT:  .LBB220_1: # %atomicrmw.start15273; O3-NEXT:    # =>This Inner Loop Header: Depth=115274; O3-NEXT:    movq %rax, %rbx15275; O3-NEXT:  .Lpcsection491:15276; O3-NEXT:    xorq $42, %rbx15277; O3-NEXT:    movq %rdx, %rcx15278; O3-NEXT:  .Lpcsection492:15279; O3-NEXT:    lock cmpxchg16b (%rdi)15280; O3-NEXT:  .Lpcsection493:15281; O3-NEXT:    jne .LBB220_115282; O3-NEXT:  # %bb.2: # %atomicrmw.end15283; O3-NEXT:    movq $1, foo(%rip)15284; O3-NEXT:    popq %rbx15285; O3-NEXT:    .cfi_def_cfa_offset 815286; O3-NEXT:    retq15287;15288; HASWELL-O3-LABEL: atomic128_xor_acquire:15289; HASWELL-O3:       # %bb.0: # %entry15290; HASWELL-O3-NEXT:    pushq %rbx15291; HASWELL-O3-NEXT:    .cfi_def_cfa_offset 1615292; HASWELL-O3-NEXT:    .cfi_offset %rbx, -1615293; HASWELL-O3-NEXT:    movq foo(%rip), %rax15294; HASWELL-O3-NEXT:  .Lpcsection466:15295; HASWELL-O3-NEXT:    movq (%rdi), %rax15296; HASWELL-O3-NEXT:  .Lpcsection467:15297; HASWELL-O3-NEXT:    movq 8(%rdi), %rdx15298; HASWELL-O3-NEXT:    .p2align 415299; HASWELL-O3-NEXT:  .LBB220_1: # %atomicrmw.start15300; HASWELL-O3-NEXT:    # =>This Inner Loop Header: Depth=115301; HASWELL-O3-NEXT:    movq %rax, %rbx15302; HASWELL-O3-NEXT:  .Lpcsection468:15303; HASWELL-O3-NEXT:    xorq $42, %rbx15304; HASWELL-O3-NEXT:    movq %rdx, %rcx15305; HASWELL-O3-NEXT:  .Lpcsection469:15306; HASWELL-O3-NEXT:    lock cmpxchg16b (%rdi)15307; HASWELL-O3-NEXT:  .Lpcsection470:15308; HASWELL-O3-NEXT:    jne .LBB220_115309; HASWELL-O3-NEXT:  # %bb.2: # %atomicrmw.end15310; HASWELL-O3-NEXT:    movq $1, foo(%rip)15311; HASWELL-O3-NEXT:    popq %rbx15312; HASWELL-O3-NEXT:    .cfi_def_cfa_offset 815313; HASWELL-O3-NEXT:    retq15314entry:15315  load volatile i64, ptr @foo, align 815316  %x = atomicrmw xor ptr %a, i128 42 acquire, align 16, !pcsections !015317  store volatile i64 1, ptr @foo, align 815318  ret void15319}15320 15321define void @atomic128_nand_acquire(ptr %a) {15322; O0-LABEL: atomic128_nand_acquire:15323; O0:       # %bb.0: # %entry15324; O0-NEXT:    pushq %rbx15325; O0-NEXT:    .cfi_def_cfa_offset 1615326; O0-NEXT:    .cfi_offset %rbx, -1615327; O0-NEXT:    movq %rdi, {{[-0-9]+}}(%r{{[sb]}}p) # 8-byte Spill15328; O0-NEXT:    movq foo(%rip), %rax15329; O0-NEXT:  .Lpcsection549:15330; O0-NEXT:    movq (%rdi), %rax15331; O0-NEXT:  .Lpcsection550:15332; O0-NEXT:    movq 8(%rdi), %rdx15333; O0-NEXT:    movq %rax, {{[-0-9]+}}(%r{{[sb]}}p) # 8-byte Spill15334; O0-NEXT:    movq %rdx, {{[-0-9]+}}(%r{{[sb]}}p) # 8-byte Spill15335; O0-NEXT:  .Lpcsection551:15336; O0-NEXT:    jmp .LBB221_115337; O0-NEXT:  .LBB221_1: # %atomicrmw.start15338; O0-NEXT:    # =>This Inner Loop Header: Depth=115339; O0-NEXT:    movq {{[-0-9]+}}(%r{{[sb]}}p), %rdx # 8-byte Reload15340; O0-NEXT:    movq {{[-0-9]+}}(%r{{[sb]}}p), %rax # 8-byte Reload15341; O0-NEXT:    movq {{[-0-9]+}}(%r{{[sb]}}p), %rsi # 8-byte Reload15342; O0-NEXT:    movl %eax, %ecx15343; O0-NEXT:  .Lpcsection552:15344; O0-NEXT:    notl %ecx15345; O0-NEXT:  .Lpcsection553:15346; O0-NEXT:    # implicit-def: $rbx15347; O0-NEXT:    movl %ecx, %ebx15348; O0-NEXT:  .Lpcsection554:15349; O0-NEXT:    orq $-43, %rbx15350; O0-NEXT:  .Lpcsection555:15351; O0-NEXT:    movq $-1, %rcx15352; O0-NEXT:  .Lpcsection556:15353; O0-NEXT:    lock cmpxchg16b (%rsi)15354; O0-NEXT:    movq %rax, {{[-0-9]+}}(%r{{[sb]}}p) # 8-byte Spill15355; O0-NEXT:    movq %rdx, {{[-0-9]+}}(%r{{[sb]}}p) # 8-byte Spill15356; O0-NEXT:  .Lpcsection557:15357; O0-NEXT:    jne .LBB221_115358; O0-NEXT:    jmp .LBB221_215359; O0-NEXT:  .LBB221_2: # %atomicrmw.end15360; O0-NEXT:    movq $1, foo15361; O0-NEXT:    popq %rbx15362; O0-NEXT:    .cfi_def_cfa_offset 815363; O0-NEXT:    retq15364;15365; O1-LABEL: atomic128_nand_acquire:15366; O1:       # %bb.0: # %entry15367; O1-NEXT:    pushq %rbx15368; O1-NEXT:    .cfi_def_cfa_offset 1615369; O1-NEXT:    .cfi_offset %rbx, -1615370; O1-NEXT:    movq foo(%rip), %rax15371; O1-NEXT:  .Lpcsection494:15372; O1-NEXT:    movq (%rdi), %rax15373; O1-NEXT:  .Lpcsection495:15374; O1-NEXT:    movq 8(%rdi), %rdx15375; O1-NEXT:  .Lpcsection496:15376; O1-NEXT:    movq $-1, %rcx15377; O1-NEXT:    .p2align 415378; O1-NEXT:  .LBB221_1: # %atomicrmw.start15379; O1-NEXT:    # =>This Inner Loop Header: Depth=115380; O1-NEXT:    movl %eax, %ebx15381; O1-NEXT:  .Lpcsection497:15382; O1-NEXT:    notl %ebx15383; O1-NEXT:  .Lpcsection498:15384; O1-NEXT:    orq $-43, %rbx15385; O1-NEXT:  .Lpcsection499:15386; O1-NEXT:    lock cmpxchg16b (%rdi)15387; O1-NEXT:  .Lpcsection500:15388; O1-NEXT:    jne .LBB221_115389; O1-NEXT:  # %bb.2: # %atomicrmw.end15390; O1-NEXT:    movq $1, foo(%rip)15391; O1-NEXT:    popq %rbx15392; O1-NEXT:    .cfi_def_cfa_offset 815393; O1-NEXT:    retq15394;15395; O2-LABEL: atomic128_nand_acquire:15396; O2:       # %bb.0: # %entry15397; O2-NEXT:    pushq %rbx15398; O2-NEXT:    .cfi_def_cfa_offset 1615399; O2-NEXT:    .cfi_offset %rbx, -1615400; O2-NEXT:    movq foo(%rip), %rax15401; O2-NEXT:  .Lpcsection494:15402; O2-NEXT:    movq (%rdi), %rax15403; O2-NEXT:  .Lpcsection495:15404; O2-NEXT:    movq 8(%rdi), %rdx15405; O2-NEXT:  .Lpcsection496:15406; O2-NEXT:    movq $-1, %rcx15407; O2-NEXT:    .p2align 415408; O2-NEXT:  .LBB221_1: # %atomicrmw.start15409; O2-NEXT:    # =>This Inner Loop Header: Depth=115410; O2-NEXT:    movl %eax, %ebx15411; O2-NEXT:  .Lpcsection497:15412; O2-NEXT:    notl %ebx15413; O2-NEXT:  .Lpcsection498:15414; O2-NEXT:    orq $-43, %rbx15415; O2-NEXT:  .Lpcsection499:15416; O2-NEXT:    lock cmpxchg16b (%rdi)15417; O2-NEXT:  .Lpcsection500:15418; O2-NEXT:    jne .LBB221_115419; O2-NEXT:  # %bb.2: # %atomicrmw.end15420; O2-NEXT:    movq $1, foo(%rip)15421; O2-NEXT:    popq %rbx15422; O2-NEXT:    .cfi_def_cfa_offset 815423; O2-NEXT:    retq15424;15425; O3-LABEL: atomic128_nand_acquire:15426; O3:       # %bb.0: # %entry15427; O3-NEXT:    pushq %rbx15428; O3-NEXT:    .cfi_def_cfa_offset 1615429; O3-NEXT:    .cfi_offset %rbx, -1615430; O3-NEXT:    movq foo(%rip), %rax15431; O3-NEXT:  .Lpcsection494:15432; O3-NEXT:    movq (%rdi), %rax15433; O3-NEXT:  .Lpcsection495:15434; O3-NEXT:    movq 8(%rdi), %rdx15435; O3-NEXT:  .Lpcsection496:15436; O3-NEXT:    movq $-1, %rcx15437; O3-NEXT:    .p2align 415438; O3-NEXT:  .LBB221_1: # %atomicrmw.start15439; O3-NEXT:    # =>This Inner Loop Header: Depth=115440; O3-NEXT:    movl %eax, %ebx15441; O3-NEXT:  .Lpcsection497:15442; O3-NEXT:    notl %ebx15443; O3-NEXT:  .Lpcsection498:15444; O3-NEXT:    orq $-43, %rbx15445; O3-NEXT:  .Lpcsection499:15446; O3-NEXT:    lock cmpxchg16b (%rdi)15447; O3-NEXT:  .Lpcsection500:15448; O3-NEXT:    jne .LBB221_115449; O3-NEXT:  # %bb.2: # %atomicrmw.end15450; O3-NEXT:    movq $1, foo(%rip)15451; O3-NEXT:    popq %rbx15452; O3-NEXT:    .cfi_def_cfa_offset 815453; O3-NEXT:    retq15454;15455; HASWELL-O3-LABEL: atomic128_nand_acquire:15456; HASWELL-O3:       # %bb.0: # %entry15457; HASWELL-O3-NEXT:    pushq %rbx15458; HASWELL-O3-NEXT:    .cfi_def_cfa_offset 1615459; HASWELL-O3-NEXT:    .cfi_offset %rbx, -1615460; HASWELL-O3-NEXT:    movq foo(%rip), %rax15461; HASWELL-O3-NEXT:  .Lpcsection471:15462; HASWELL-O3-NEXT:    movq (%rdi), %rax15463; HASWELL-O3-NEXT:  .Lpcsection472:15464; HASWELL-O3-NEXT:    movq 8(%rdi), %rdx15465; HASWELL-O3-NEXT:  .Lpcsection473:15466; HASWELL-O3-NEXT:    movq $-1, %rcx15467; HASWELL-O3-NEXT:    .p2align 415468; HASWELL-O3-NEXT:  .LBB221_1: # %atomicrmw.start15469; HASWELL-O3-NEXT:    # =>This Inner Loop Header: Depth=115470; HASWELL-O3-NEXT:    movl %eax, %ebx15471; HASWELL-O3-NEXT:  .Lpcsection474:15472; HASWELL-O3-NEXT:    notl %ebx15473; HASWELL-O3-NEXT:  .Lpcsection475:15474; HASWELL-O3-NEXT:    orq $-43, %rbx15475; HASWELL-O3-NEXT:  .Lpcsection476:15476; HASWELL-O3-NEXT:    lock cmpxchg16b (%rdi)15477; HASWELL-O3-NEXT:  .Lpcsection477:15478; HASWELL-O3-NEXT:    jne .LBB221_115479; HASWELL-O3-NEXT:  # %bb.2: # %atomicrmw.end15480; HASWELL-O3-NEXT:    movq $1, foo(%rip)15481; HASWELL-O3-NEXT:    popq %rbx15482; HASWELL-O3-NEXT:    .cfi_def_cfa_offset 815483; HASWELL-O3-NEXT:    retq15484entry:15485  load volatile i64, ptr @foo, align 815486  %x = atomicrmw nand ptr %a, i128 42 acquire, align 16, !pcsections !015487  store volatile i64 1, ptr @foo, align 815488  ret void15489}15490 15491define void @atomic128_xchg_release(ptr %a) {15492; O0-LABEL: atomic128_xchg_release:15493; O0:       # %bb.0:15494; O0-NEXT:    pushq %rbx15495; O0-NEXT:    .cfi_def_cfa_offset 1615496; O0-NEXT:    .cfi_offset %rbx, -1615497; O0-NEXT:    movq %rdi, {{[-0-9]+}}(%r{{[sb]}}p) # 8-byte Spill15498; O0-NEXT:    movq foo(%rip), %rax15499; O0-NEXT:  .Lpcsection558:15500; O0-NEXT:    movq (%rdi), %rax15501; O0-NEXT:  .Lpcsection559:15502; O0-NEXT:    movq 8(%rdi), %rdx15503; O0-NEXT:    movq %rax, {{[-0-9]+}}(%r{{[sb]}}p) # 8-byte Spill15504; O0-NEXT:    movq %rdx, {{[-0-9]+}}(%r{{[sb]}}p) # 8-byte Spill15505; O0-NEXT:  .Lpcsection560:15506; O0-NEXT:    jmp .LBB222_115507; O0-NEXT:  .LBB222_1: # %atomicrmw.start15508; O0-NEXT:    # =>This Inner Loop Header: Depth=115509; O0-NEXT:    movq {{[-0-9]+}}(%r{{[sb]}}p), %rdx # 8-byte Reload15510; O0-NEXT:    movq {{[-0-9]+}}(%r{{[sb]}}p), %rax # 8-byte Reload15511; O0-NEXT:    movq {{[-0-9]+}}(%r{{[sb]}}p), %rsi # 8-byte Reload15512; O0-NEXT:  .Lpcsection561:15513; O0-NEXT:    xorl %ecx, %ecx15514; O0-NEXT:  .Lpcsection562:15515; O0-NEXT:    # kill: def $rcx killed $ecx15516; O0-NEXT:  .Lpcsection563:15517; O0-NEXT:    movl $42, %ebx15518; O0-NEXT:  .Lpcsection564:15519; O0-NEXT:    lock cmpxchg16b (%rsi)15520; O0-NEXT:    movq %rax, {{[-0-9]+}}(%r{{[sb]}}p) # 8-byte Spill15521; O0-NEXT:    movq %rdx, {{[-0-9]+}}(%r{{[sb]}}p) # 8-byte Spill15522; O0-NEXT:  .Lpcsection565:15523; O0-NEXT:    jne .LBB222_115524; O0-NEXT:    jmp .LBB222_215525; O0-NEXT:  .LBB222_2: # %atomicrmw.end15526; O0-NEXT:    movq $1, foo15527; O0-NEXT:    popq %rbx15528; O0-NEXT:    .cfi_def_cfa_offset 815529; O0-NEXT:    retq15530;15531; O1-LABEL: atomic128_xchg_release:15532; O1:       # %bb.0:15533; O1-NEXT:    pushq %rbx15534; O1-NEXT:    .cfi_def_cfa_offset 1615535; O1-NEXT:    .cfi_offset %rbx, -1615536; O1-NEXT:    movq foo(%rip), %rax15537; O1-NEXT:  .Lpcsection501:15538; O1-NEXT:    movq (%rdi), %rax15539; O1-NEXT:  .Lpcsection502:15540; O1-NEXT:    movq 8(%rdi), %rdx15541; O1-NEXT:  .Lpcsection503:15542; O1-NEXT:    movl $42, %ebx15543; O1-NEXT:    .p2align 415544; O1-NEXT:  .LBB222_1: # %atomicrmw.start15545; O1-NEXT:    # =>This Inner Loop Header: Depth=115546; O1-NEXT:  .Lpcsection504:15547; O1-NEXT:    xorl %ecx, %ecx15548; O1-NEXT:  .Lpcsection505:15549; O1-NEXT:    lock cmpxchg16b (%rdi)15550; O1-NEXT:  .Lpcsection506:15551; O1-NEXT:    jne .LBB222_115552; O1-NEXT:  # %bb.2: # %atomicrmw.end15553; O1-NEXT:    movq $1, foo(%rip)15554; O1-NEXT:    popq %rbx15555; O1-NEXT:    .cfi_def_cfa_offset 815556; O1-NEXT:    retq15557;15558; O2-LABEL: atomic128_xchg_release:15559; O2:       # %bb.0:15560; O2-NEXT:    pushq %rbx15561; O2-NEXT:    .cfi_def_cfa_offset 1615562; O2-NEXT:    .cfi_offset %rbx, -1615563; O2-NEXT:    movq foo(%rip), %rax15564; O2-NEXT:  .Lpcsection501:15565; O2-NEXT:    movq (%rdi), %rax15566; O2-NEXT:  .Lpcsection502:15567; O2-NEXT:    movq 8(%rdi), %rdx15568; O2-NEXT:  .Lpcsection503:15569; O2-NEXT:    movl $42, %ebx15570; O2-NEXT:    .p2align 415571; O2-NEXT:  .LBB222_1: # %atomicrmw.start15572; O2-NEXT:    # =>This Inner Loop Header: Depth=115573; O2-NEXT:  .Lpcsection504:15574; O2-NEXT:    xorl %ecx, %ecx15575; O2-NEXT:  .Lpcsection505:15576; O2-NEXT:    lock cmpxchg16b (%rdi)15577; O2-NEXT:  .Lpcsection506:15578; O2-NEXT:    jne .LBB222_115579; O2-NEXT:  # %bb.2: # %atomicrmw.end15580; O2-NEXT:    movq $1, foo(%rip)15581; O2-NEXT:    popq %rbx15582; O2-NEXT:    .cfi_def_cfa_offset 815583; O2-NEXT:    retq15584;15585; O3-LABEL: atomic128_xchg_release:15586; O3:       # %bb.0:15587; O3-NEXT:    pushq %rbx15588; O3-NEXT:    .cfi_def_cfa_offset 1615589; O3-NEXT:    .cfi_offset %rbx, -1615590; O3-NEXT:    movq foo(%rip), %rax15591; O3-NEXT:  .Lpcsection501:15592; O3-NEXT:    movq (%rdi), %rax15593; O3-NEXT:  .Lpcsection502:15594; O3-NEXT:    movq 8(%rdi), %rdx15595; O3-NEXT:  .Lpcsection503:15596; O3-NEXT:    movl $42, %ebx15597; O3-NEXT:    .p2align 415598; O3-NEXT:  .LBB222_1: # %atomicrmw.start15599; O3-NEXT:    # =>This Inner Loop Header: Depth=115600; O3-NEXT:  .Lpcsection504:15601; O3-NEXT:    xorl %ecx, %ecx15602; O3-NEXT:  .Lpcsection505:15603; O3-NEXT:    lock cmpxchg16b (%rdi)15604; O3-NEXT:  .Lpcsection506:15605; O3-NEXT:    jne .LBB222_115606; O3-NEXT:  # %bb.2: # %atomicrmw.end15607; O3-NEXT:    movq $1, foo(%rip)15608; O3-NEXT:    popq %rbx15609; O3-NEXT:    .cfi_def_cfa_offset 815610; O3-NEXT:    retq15611;15612; HASWELL-O3-LABEL: atomic128_xchg_release:15613; HASWELL-O3:       # %bb.0:15614; HASWELL-O3-NEXT:    pushq %rbx15615; HASWELL-O3-NEXT:    .cfi_def_cfa_offset 1615616; HASWELL-O3-NEXT:    .cfi_offset %rbx, -1615617; HASWELL-O3-NEXT:    movq foo(%rip), %rax15618; HASWELL-O3-NEXT:  .Lpcsection478:15619; HASWELL-O3-NEXT:    movq (%rdi), %rax15620; HASWELL-O3-NEXT:  .Lpcsection479:15621; HASWELL-O3-NEXT:    movq 8(%rdi), %rdx15622; HASWELL-O3-NEXT:  .Lpcsection480:15623; HASWELL-O3-NEXT:    movl $42, %ebx15624; HASWELL-O3-NEXT:    .p2align 415625; HASWELL-O3-NEXT:  .LBB222_1: # %atomicrmw.start15626; HASWELL-O3-NEXT:    # =>This Inner Loop Header: Depth=115627; HASWELL-O3-NEXT:  .Lpcsection481:15628; HASWELL-O3-NEXT:    xorl %ecx, %ecx15629; HASWELL-O3-NEXT:  .Lpcsection482:15630; HASWELL-O3-NEXT:    lock cmpxchg16b (%rdi)15631; HASWELL-O3-NEXT:  .Lpcsection483:15632; HASWELL-O3-NEXT:    jne .LBB222_115633; HASWELL-O3-NEXT:  # %bb.2: # %atomicrmw.end15634; HASWELL-O3-NEXT:    movq $1, foo(%rip)15635; HASWELL-O3-NEXT:    popq %rbx15636; HASWELL-O3-NEXT:    .cfi_def_cfa_offset 815637; HASWELL-O3-NEXT:    retq15638  load volatile i64, ptr @foo, align 815639  %x = atomicrmw xchg ptr %a, i128 42 release, align 16, !pcsections !015640  store volatile i64 1, ptr @foo, align 815641  ret void15642}15643 15644define void @atomic128_add_release(ptr %a) {15645; O0-LABEL: atomic128_add_release:15646; O0:       # %bb.0: # %entry15647; O0-NEXT:    pushq %rbx15648; O0-NEXT:    .cfi_def_cfa_offset 1615649; O0-NEXT:    .cfi_offset %rbx, -1615650; O0-NEXT:    movq %rdi, {{[-0-9]+}}(%r{{[sb]}}p) # 8-byte Spill15651; O0-NEXT:    movq foo(%rip), %rax15652; O0-NEXT:  .Lpcsection566:15653; O0-NEXT:    movq (%rdi), %rax15654; O0-NEXT:  .Lpcsection567:15655; O0-NEXT:    movq 8(%rdi), %rdx15656; O0-NEXT:    movq %rax, {{[-0-9]+}}(%r{{[sb]}}p) # 8-byte Spill15657; O0-NEXT:    movq %rdx, {{[-0-9]+}}(%r{{[sb]}}p) # 8-byte Spill15658; O0-NEXT:  .Lpcsection568:15659; O0-NEXT:    jmp .LBB223_115660; O0-NEXT:  .LBB223_1: # %atomicrmw.start15661; O0-NEXT:    # =>This Inner Loop Header: Depth=115662; O0-NEXT:    movq {{[-0-9]+}}(%r{{[sb]}}p), %rdx # 8-byte Reload15663; O0-NEXT:    movq {{[-0-9]+}}(%r{{[sb]}}p), %rax # 8-byte Reload15664; O0-NEXT:    movq {{[-0-9]+}}(%r{{[sb]}}p), %rsi # 8-byte Reload15665; O0-NEXT:    movq %rax, %rbx15666; O0-NEXT:  .Lpcsection569:15667; O0-NEXT:    addq $42, %rbx15668; O0-NEXT:    movq %rdx, %rcx15669; O0-NEXT:  .Lpcsection570:15670; O0-NEXT:    adcq $0, %rcx15671; O0-NEXT:  .Lpcsection571:15672; O0-NEXT:    lock cmpxchg16b (%rsi)15673; O0-NEXT:    movq %rax, {{[-0-9]+}}(%r{{[sb]}}p) # 8-byte Spill15674; O0-NEXT:    movq %rdx, {{[-0-9]+}}(%r{{[sb]}}p) # 8-byte Spill15675; O0-NEXT:  .Lpcsection572:15676; O0-NEXT:    jne .LBB223_115677; O0-NEXT:    jmp .LBB223_215678; O0-NEXT:  .LBB223_2: # %atomicrmw.end15679; O0-NEXT:    movq $1, foo15680; O0-NEXT:    popq %rbx15681; O0-NEXT:    .cfi_def_cfa_offset 815682; O0-NEXT:    retq15683;15684; O1-LABEL: atomic128_add_release:15685; O1:       # %bb.0: # %entry15686; O1-NEXT:    pushq %rbx15687; O1-NEXT:    .cfi_def_cfa_offset 1615688; O1-NEXT:    .cfi_offset %rbx, -1615689; O1-NEXT:    movq foo(%rip), %rax15690; O1-NEXT:  .Lpcsection507:15691; O1-NEXT:    movq (%rdi), %rax15692; O1-NEXT:  .Lpcsection508:15693; O1-NEXT:    movq 8(%rdi), %rdx15694; O1-NEXT:    .p2align 415695; O1-NEXT:  .LBB223_1: # %atomicrmw.start15696; O1-NEXT:    # =>This Inner Loop Header: Depth=115697; O1-NEXT:    movq %rax, %rbx15698; O1-NEXT:  .Lpcsection509:15699; O1-NEXT:    addq $42, %rbx15700; O1-NEXT:    movq %rdx, %rcx15701; O1-NEXT:  .Lpcsection510:15702; O1-NEXT:    adcq $0, %rcx15703; O1-NEXT:  .Lpcsection511:15704; O1-NEXT:    lock cmpxchg16b (%rdi)15705; O1-NEXT:  .Lpcsection512:15706; O1-NEXT:    jne .LBB223_115707; O1-NEXT:  # %bb.2: # %atomicrmw.end15708; O1-NEXT:    movq $1, foo(%rip)15709; O1-NEXT:    popq %rbx15710; O1-NEXT:    .cfi_def_cfa_offset 815711; O1-NEXT:    retq15712;15713; O2-LABEL: atomic128_add_release:15714; O2:       # %bb.0: # %entry15715; O2-NEXT:    pushq %rbx15716; O2-NEXT:    .cfi_def_cfa_offset 1615717; O2-NEXT:    .cfi_offset %rbx, -1615718; O2-NEXT:    movq foo(%rip), %rax15719; O2-NEXT:  .Lpcsection507:15720; O2-NEXT:    movq (%rdi), %rax15721; O2-NEXT:  .Lpcsection508:15722; O2-NEXT:    movq 8(%rdi), %rdx15723; O2-NEXT:    .p2align 415724; O2-NEXT:  .LBB223_1: # %atomicrmw.start15725; O2-NEXT:    # =>This Inner Loop Header: Depth=115726; O2-NEXT:    movq %rax, %rbx15727; O2-NEXT:  .Lpcsection509:15728; O2-NEXT:    addq $42, %rbx15729; O2-NEXT:    movq %rdx, %rcx15730; O2-NEXT:  .Lpcsection510:15731; O2-NEXT:    adcq $0, %rcx15732; O2-NEXT:  .Lpcsection511:15733; O2-NEXT:    lock cmpxchg16b (%rdi)15734; O2-NEXT:  .Lpcsection512:15735; O2-NEXT:    jne .LBB223_115736; O2-NEXT:  # %bb.2: # %atomicrmw.end15737; O2-NEXT:    movq $1, foo(%rip)15738; O2-NEXT:    popq %rbx15739; O2-NEXT:    .cfi_def_cfa_offset 815740; O2-NEXT:    retq15741;15742; O3-LABEL: atomic128_add_release:15743; O3:       # %bb.0: # %entry15744; O3-NEXT:    pushq %rbx15745; O3-NEXT:    .cfi_def_cfa_offset 1615746; O3-NEXT:    .cfi_offset %rbx, -1615747; O3-NEXT:    movq foo(%rip), %rax15748; O3-NEXT:  .Lpcsection507:15749; O3-NEXT:    movq (%rdi), %rax15750; O3-NEXT:  .Lpcsection508:15751; O3-NEXT:    movq 8(%rdi), %rdx15752; O3-NEXT:    .p2align 415753; O3-NEXT:  .LBB223_1: # %atomicrmw.start15754; O3-NEXT:    # =>This Inner Loop Header: Depth=115755; O3-NEXT:    movq %rax, %rbx15756; O3-NEXT:  .Lpcsection509:15757; O3-NEXT:    addq $42, %rbx15758; O3-NEXT:    movq %rdx, %rcx15759; O3-NEXT:  .Lpcsection510:15760; O3-NEXT:    adcq $0, %rcx15761; O3-NEXT:  .Lpcsection511:15762; O3-NEXT:    lock cmpxchg16b (%rdi)15763; O3-NEXT:  .Lpcsection512:15764; O3-NEXT:    jne .LBB223_115765; O3-NEXT:  # %bb.2: # %atomicrmw.end15766; O3-NEXT:    movq $1, foo(%rip)15767; O3-NEXT:    popq %rbx15768; O3-NEXT:    .cfi_def_cfa_offset 815769; O3-NEXT:    retq15770;15771; HASWELL-O3-LABEL: atomic128_add_release:15772; HASWELL-O3:       # %bb.0: # %entry15773; HASWELL-O3-NEXT:    pushq %rbx15774; HASWELL-O3-NEXT:    .cfi_def_cfa_offset 1615775; HASWELL-O3-NEXT:    .cfi_offset %rbx, -1615776; HASWELL-O3-NEXT:    movq foo(%rip), %rax15777; HASWELL-O3-NEXT:  .Lpcsection484:15778; HASWELL-O3-NEXT:    movq (%rdi), %rax15779; HASWELL-O3-NEXT:  .Lpcsection485:15780; HASWELL-O3-NEXT:    movq 8(%rdi), %rdx15781; HASWELL-O3-NEXT:    .p2align 415782; HASWELL-O3-NEXT:  .LBB223_1: # %atomicrmw.start15783; HASWELL-O3-NEXT:    # =>This Inner Loop Header: Depth=115784; HASWELL-O3-NEXT:    movq %rax, %rbx15785; HASWELL-O3-NEXT:  .Lpcsection486:15786; HASWELL-O3-NEXT:    addq $42, %rbx15787; HASWELL-O3-NEXT:    movq %rdx, %rcx15788; HASWELL-O3-NEXT:  .Lpcsection487:15789; HASWELL-O3-NEXT:    adcq $0, %rcx15790; HASWELL-O3-NEXT:  .Lpcsection488:15791; HASWELL-O3-NEXT:    lock cmpxchg16b (%rdi)15792; HASWELL-O3-NEXT:  .Lpcsection489:15793; HASWELL-O3-NEXT:    jne .LBB223_115794; HASWELL-O3-NEXT:  # %bb.2: # %atomicrmw.end15795; HASWELL-O3-NEXT:    movq $1, foo(%rip)15796; HASWELL-O3-NEXT:    popq %rbx15797; HASWELL-O3-NEXT:    .cfi_def_cfa_offset 815798; HASWELL-O3-NEXT:    retq15799entry:15800  load volatile i64, ptr @foo, align 815801  %x = atomicrmw add ptr %a, i128 42 release, align 16, !pcsections !015802  store volatile i64 1, ptr @foo, align 815803  ret void15804}15805 15806define void @atomic128_sub_release(ptr %a) {15807; O0-LABEL: atomic128_sub_release:15808; O0:       # %bb.0: # %entry15809; O0-NEXT:    pushq %rbx15810; O0-NEXT:    .cfi_def_cfa_offset 1615811; O0-NEXT:    .cfi_offset %rbx, -1615812; O0-NEXT:    movq %rdi, {{[-0-9]+}}(%r{{[sb]}}p) # 8-byte Spill15813; O0-NEXT:    movq foo(%rip), %rax15814; O0-NEXT:  .Lpcsection573:15815; O0-NEXT:    movq (%rdi), %rax15816; O0-NEXT:  .Lpcsection574:15817; O0-NEXT:    movq 8(%rdi), %rdx15818; O0-NEXT:    movq %rax, {{[-0-9]+}}(%r{{[sb]}}p) # 8-byte Spill15819; O0-NEXT:    movq %rdx, {{[-0-9]+}}(%r{{[sb]}}p) # 8-byte Spill15820; O0-NEXT:  .Lpcsection575:15821; O0-NEXT:    jmp .LBB224_115822; O0-NEXT:  .LBB224_1: # %atomicrmw.start15823; O0-NEXT:    # =>This Inner Loop Header: Depth=115824; O0-NEXT:    movq {{[-0-9]+}}(%r{{[sb]}}p), %rdx # 8-byte Reload15825; O0-NEXT:    movq {{[-0-9]+}}(%r{{[sb]}}p), %rax # 8-byte Reload15826; O0-NEXT:    movq {{[-0-9]+}}(%r{{[sb]}}p), %rsi # 8-byte Reload15827; O0-NEXT:    movq %rax, %rbx15828; O0-NEXT:  .Lpcsection576:15829; O0-NEXT:    addq $-42, %rbx15830; O0-NEXT:    movq %rdx, %rcx15831; O0-NEXT:  .Lpcsection577:15832; O0-NEXT:    adcq $-1, %rcx15833; O0-NEXT:  .Lpcsection578:15834; O0-NEXT:    lock cmpxchg16b (%rsi)15835; O0-NEXT:    movq %rax, {{[-0-9]+}}(%r{{[sb]}}p) # 8-byte Spill15836; O0-NEXT:    movq %rdx, {{[-0-9]+}}(%r{{[sb]}}p) # 8-byte Spill15837; O0-NEXT:  .Lpcsection579:15838; O0-NEXT:    jne .LBB224_115839; O0-NEXT:    jmp .LBB224_215840; O0-NEXT:  .LBB224_2: # %atomicrmw.end15841; O0-NEXT:    movq $1, foo15842; O0-NEXT:    popq %rbx15843; O0-NEXT:    .cfi_def_cfa_offset 815844; O0-NEXT:    retq15845;15846; O1-LABEL: atomic128_sub_release:15847; O1:       # %bb.0: # %entry15848; O1-NEXT:    pushq %rbx15849; O1-NEXT:    .cfi_def_cfa_offset 1615850; O1-NEXT:    .cfi_offset %rbx, -1615851; O1-NEXT:    movq foo(%rip), %rax15852; O1-NEXT:  .Lpcsection513:15853; O1-NEXT:    movq (%rdi), %rax15854; O1-NEXT:  .Lpcsection514:15855; O1-NEXT:    movq 8(%rdi), %rdx15856; O1-NEXT:    .p2align 415857; O1-NEXT:  .LBB224_1: # %atomicrmw.start15858; O1-NEXT:    # =>This Inner Loop Header: Depth=115859; O1-NEXT:    movq %rax, %rbx15860; O1-NEXT:  .Lpcsection515:15861; O1-NEXT:    addq $-42, %rbx15862; O1-NEXT:    movq %rdx, %rcx15863; O1-NEXT:  .Lpcsection516:15864; O1-NEXT:    adcq $-1, %rcx15865; O1-NEXT:  .Lpcsection517:15866; O1-NEXT:    lock cmpxchg16b (%rdi)15867; O1-NEXT:  .Lpcsection518:15868; O1-NEXT:    jne .LBB224_115869; O1-NEXT:  # %bb.2: # %atomicrmw.end15870; O1-NEXT:    movq $1, foo(%rip)15871; O1-NEXT:    popq %rbx15872; O1-NEXT:    .cfi_def_cfa_offset 815873; O1-NEXT:    retq15874;15875; O2-LABEL: atomic128_sub_release:15876; O2:       # %bb.0: # %entry15877; O2-NEXT:    pushq %rbx15878; O2-NEXT:    .cfi_def_cfa_offset 1615879; O2-NEXT:    .cfi_offset %rbx, -1615880; O2-NEXT:    movq foo(%rip), %rax15881; O2-NEXT:  .Lpcsection513:15882; O2-NEXT:    movq (%rdi), %rax15883; O2-NEXT:  .Lpcsection514:15884; O2-NEXT:    movq 8(%rdi), %rdx15885; O2-NEXT:    .p2align 415886; O2-NEXT:  .LBB224_1: # %atomicrmw.start15887; O2-NEXT:    # =>This Inner Loop Header: Depth=115888; O2-NEXT:    movq %rax, %rbx15889; O2-NEXT:  .Lpcsection515:15890; O2-NEXT:    addq $-42, %rbx15891; O2-NEXT:    movq %rdx, %rcx15892; O2-NEXT:  .Lpcsection516:15893; O2-NEXT:    adcq $-1, %rcx15894; O2-NEXT:  .Lpcsection517:15895; O2-NEXT:    lock cmpxchg16b (%rdi)15896; O2-NEXT:  .Lpcsection518:15897; O2-NEXT:    jne .LBB224_115898; O2-NEXT:  # %bb.2: # %atomicrmw.end15899; O2-NEXT:    movq $1, foo(%rip)15900; O2-NEXT:    popq %rbx15901; O2-NEXT:    .cfi_def_cfa_offset 815902; O2-NEXT:    retq15903;15904; O3-LABEL: atomic128_sub_release:15905; O3:       # %bb.0: # %entry15906; O3-NEXT:    pushq %rbx15907; O3-NEXT:    .cfi_def_cfa_offset 1615908; O3-NEXT:    .cfi_offset %rbx, -1615909; O3-NEXT:    movq foo(%rip), %rax15910; O3-NEXT:  .Lpcsection513:15911; O3-NEXT:    movq (%rdi), %rax15912; O3-NEXT:  .Lpcsection514:15913; O3-NEXT:    movq 8(%rdi), %rdx15914; O3-NEXT:    .p2align 415915; O3-NEXT:  .LBB224_1: # %atomicrmw.start15916; O3-NEXT:    # =>This Inner Loop Header: Depth=115917; O3-NEXT:    movq %rax, %rbx15918; O3-NEXT:  .Lpcsection515:15919; O3-NEXT:    addq $-42, %rbx15920; O3-NEXT:    movq %rdx, %rcx15921; O3-NEXT:  .Lpcsection516:15922; O3-NEXT:    adcq $-1, %rcx15923; O3-NEXT:  .Lpcsection517:15924; O3-NEXT:    lock cmpxchg16b (%rdi)15925; O3-NEXT:  .Lpcsection518:15926; O3-NEXT:    jne .LBB224_115927; O3-NEXT:  # %bb.2: # %atomicrmw.end15928; O3-NEXT:    movq $1, foo(%rip)15929; O3-NEXT:    popq %rbx15930; O3-NEXT:    .cfi_def_cfa_offset 815931; O3-NEXT:    retq15932;15933; HASWELL-O3-LABEL: atomic128_sub_release:15934; HASWELL-O3:       # %bb.0: # %entry15935; HASWELL-O3-NEXT:    pushq %rbx15936; HASWELL-O3-NEXT:    .cfi_def_cfa_offset 1615937; HASWELL-O3-NEXT:    .cfi_offset %rbx, -1615938; HASWELL-O3-NEXT:    movq foo(%rip), %rax15939; HASWELL-O3-NEXT:  .Lpcsection490:15940; HASWELL-O3-NEXT:    movq (%rdi), %rax15941; HASWELL-O3-NEXT:  .Lpcsection491:15942; HASWELL-O3-NEXT:    movq 8(%rdi), %rdx15943; HASWELL-O3-NEXT:    .p2align 415944; HASWELL-O3-NEXT:  .LBB224_1: # %atomicrmw.start15945; HASWELL-O3-NEXT:    # =>This Inner Loop Header: Depth=115946; HASWELL-O3-NEXT:    movq %rax, %rbx15947; HASWELL-O3-NEXT:  .Lpcsection492:15948; HASWELL-O3-NEXT:    addq $-42, %rbx15949; HASWELL-O3-NEXT:    movq %rdx, %rcx15950; HASWELL-O3-NEXT:  .Lpcsection493:15951; HASWELL-O3-NEXT:    adcq $-1, %rcx15952; HASWELL-O3-NEXT:  .Lpcsection494:15953; HASWELL-O3-NEXT:    lock cmpxchg16b (%rdi)15954; HASWELL-O3-NEXT:  .Lpcsection495:15955; HASWELL-O3-NEXT:    jne .LBB224_115956; HASWELL-O3-NEXT:  # %bb.2: # %atomicrmw.end15957; HASWELL-O3-NEXT:    movq $1, foo(%rip)15958; HASWELL-O3-NEXT:    popq %rbx15959; HASWELL-O3-NEXT:    .cfi_def_cfa_offset 815960; HASWELL-O3-NEXT:    retq15961entry:15962  load volatile i64, ptr @foo, align 815963  %x = atomicrmw sub ptr %a, i128 42 release, align 16, !pcsections !015964  store volatile i64 1, ptr @foo, align 815965  ret void15966}15967 15968define void @atomic128_and_release(ptr %a) {15969; O0-LABEL: atomic128_and_release:15970; O0:       # %bb.0: # %entry15971; O0-NEXT:    pushq %rbx15972; O0-NEXT:    .cfi_def_cfa_offset 1615973; O0-NEXT:    .cfi_offset %rbx, -1615974; O0-NEXT:    movq %rdi, {{[-0-9]+}}(%r{{[sb]}}p) # 8-byte Spill15975; O0-NEXT:    movq foo(%rip), %rax15976; O0-NEXT:  .Lpcsection580:15977; O0-NEXT:    movq (%rdi), %rax15978; O0-NEXT:  .Lpcsection581:15979; O0-NEXT:    movq 8(%rdi), %rdx15980; O0-NEXT:    movq %rax, {{[-0-9]+}}(%r{{[sb]}}p) # 8-byte Spill15981; O0-NEXT:    movq %rdx, {{[-0-9]+}}(%r{{[sb]}}p) # 8-byte Spill15982; O0-NEXT:  .Lpcsection582:15983; O0-NEXT:    jmp .LBB225_115984; O0-NEXT:  .LBB225_1: # %atomicrmw.start15985; O0-NEXT:    # =>This Inner Loop Header: Depth=115986; O0-NEXT:    movq {{[-0-9]+}}(%r{{[sb]}}p), %rdx # 8-byte Reload15987; O0-NEXT:    movq {{[-0-9]+}}(%r{{[sb]}}p), %rax # 8-byte Reload15988; O0-NEXT:    movq {{[-0-9]+}}(%r{{[sb]}}p), %rsi # 8-byte Reload15989; O0-NEXT:    movl %eax, %ecx15990; O0-NEXT:  .Lpcsection583:15991; O0-NEXT:    andl $42, %ecx15992; O0-NEXT:    movl %ecx, %ebx15993; O0-NEXT:  .Lpcsection584:15994; O0-NEXT:    xorl %ecx, %ecx15995; O0-NEXT:  .Lpcsection585:15996; O0-NEXT:    # kill: def $rcx killed $ecx15997; O0-NEXT:  .Lpcsection586:15998; O0-NEXT:    lock cmpxchg16b (%rsi)15999; O0-NEXT:    movq %rax, {{[-0-9]+}}(%r{{[sb]}}p) # 8-byte Spill16000; O0-NEXT:    movq %rdx, {{[-0-9]+}}(%r{{[sb]}}p) # 8-byte Spill16001; O0-NEXT:  .Lpcsection587:16002; O0-NEXT:    jne .LBB225_116003; O0-NEXT:    jmp .LBB225_216004; O0-NEXT:  .LBB225_2: # %atomicrmw.end16005; O0-NEXT:    movq $1, foo16006; O0-NEXT:    popq %rbx16007; O0-NEXT:    .cfi_def_cfa_offset 816008; O0-NEXT:    retq16009;16010; O1-LABEL: atomic128_and_release:16011; O1:       # %bb.0: # %entry16012; O1-NEXT:    pushq %rbx16013; O1-NEXT:    .cfi_def_cfa_offset 1616014; O1-NEXT:    .cfi_offset %rbx, -1616015; O1-NEXT:    movq foo(%rip), %rax16016; O1-NEXT:  .Lpcsection519:16017; O1-NEXT:    movq (%rdi), %rax16018; O1-NEXT:  .Lpcsection520:16019; O1-NEXT:    movq 8(%rdi), %rdx16020; O1-NEXT:    .p2align 416021; O1-NEXT:  .LBB225_1: # %atomicrmw.start16022; O1-NEXT:    # =>This Inner Loop Header: Depth=116023; O1-NEXT:    movl %eax, %ebx16024; O1-NEXT:  .Lpcsection521:16025; O1-NEXT:    andl $42, %ebx16026; O1-NEXT:  .Lpcsection522:16027; O1-NEXT:    xorl %ecx, %ecx16028; O1-NEXT:  .Lpcsection523:16029; O1-NEXT:    lock cmpxchg16b (%rdi)16030; O1-NEXT:  .Lpcsection524:16031; O1-NEXT:    jne .LBB225_116032; O1-NEXT:  # %bb.2: # %atomicrmw.end16033; O1-NEXT:    movq $1, foo(%rip)16034; O1-NEXT:    popq %rbx16035; O1-NEXT:    .cfi_def_cfa_offset 816036; O1-NEXT:    retq16037;16038; O2-LABEL: atomic128_and_release:16039; O2:       # %bb.0: # %entry16040; O2-NEXT:    pushq %rbx16041; O2-NEXT:    .cfi_def_cfa_offset 1616042; O2-NEXT:    .cfi_offset %rbx, -1616043; O2-NEXT:    movq foo(%rip), %rax16044; O2-NEXT:  .Lpcsection519:16045; O2-NEXT:    movq (%rdi), %rax16046; O2-NEXT:  .Lpcsection520:16047; O2-NEXT:    movq 8(%rdi), %rdx16048; O2-NEXT:    .p2align 416049; O2-NEXT:  .LBB225_1: # %atomicrmw.start16050; O2-NEXT:    # =>This Inner Loop Header: Depth=116051; O2-NEXT:    movl %eax, %ebx16052; O2-NEXT:  .Lpcsection521:16053; O2-NEXT:    andl $42, %ebx16054; O2-NEXT:  .Lpcsection522:16055; O2-NEXT:    xorl %ecx, %ecx16056; O2-NEXT:  .Lpcsection523:16057; O2-NEXT:    lock cmpxchg16b (%rdi)16058; O2-NEXT:  .Lpcsection524:16059; O2-NEXT:    jne .LBB225_116060; O2-NEXT:  # %bb.2: # %atomicrmw.end16061; O2-NEXT:    movq $1, foo(%rip)16062; O2-NEXT:    popq %rbx16063; O2-NEXT:    .cfi_def_cfa_offset 816064; O2-NEXT:    retq16065;16066; O3-LABEL: atomic128_and_release:16067; O3:       # %bb.0: # %entry16068; O3-NEXT:    pushq %rbx16069; O3-NEXT:    .cfi_def_cfa_offset 1616070; O3-NEXT:    .cfi_offset %rbx, -1616071; O3-NEXT:    movq foo(%rip), %rax16072; O3-NEXT:  .Lpcsection519:16073; O3-NEXT:    movq (%rdi), %rax16074; O3-NEXT:  .Lpcsection520:16075; O3-NEXT:    movq 8(%rdi), %rdx16076; O3-NEXT:    .p2align 416077; O3-NEXT:  .LBB225_1: # %atomicrmw.start16078; O3-NEXT:    # =>This Inner Loop Header: Depth=116079; O3-NEXT:    movl %eax, %ebx16080; O3-NEXT:  .Lpcsection521:16081; O3-NEXT:    andl $42, %ebx16082; O3-NEXT:  .Lpcsection522:16083; O3-NEXT:    xorl %ecx, %ecx16084; O3-NEXT:  .Lpcsection523:16085; O3-NEXT:    lock cmpxchg16b (%rdi)16086; O3-NEXT:  .Lpcsection524:16087; O3-NEXT:    jne .LBB225_116088; O3-NEXT:  # %bb.2: # %atomicrmw.end16089; O3-NEXT:    movq $1, foo(%rip)16090; O3-NEXT:    popq %rbx16091; O3-NEXT:    .cfi_def_cfa_offset 816092; O3-NEXT:    retq16093;16094; HASWELL-O3-LABEL: atomic128_and_release:16095; HASWELL-O3:       # %bb.0: # %entry16096; HASWELL-O3-NEXT:    pushq %rbx16097; HASWELL-O3-NEXT:    .cfi_def_cfa_offset 1616098; HASWELL-O3-NEXT:    .cfi_offset %rbx, -1616099; HASWELL-O3-NEXT:    movq foo(%rip), %rax16100; HASWELL-O3-NEXT:  .Lpcsection496:16101; HASWELL-O3-NEXT:    movq (%rdi), %rax16102; HASWELL-O3-NEXT:  .Lpcsection497:16103; HASWELL-O3-NEXT:    movq 8(%rdi), %rdx16104; HASWELL-O3-NEXT:    .p2align 416105; HASWELL-O3-NEXT:  .LBB225_1: # %atomicrmw.start16106; HASWELL-O3-NEXT:    # =>This Inner Loop Header: Depth=116107; HASWELL-O3-NEXT:    movl %eax, %ebx16108; HASWELL-O3-NEXT:  .Lpcsection498:16109; HASWELL-O3-NEXT:    andl $42, %ebx16110; HASWELL-O3-NEXT:  .Lpcsection499:16111; HASWELL-O3-NEXT:    xorl %ecx, %ecx16112; HASWELL-O3-NEXT:  .Lpcsection500:16113; HASWELL-O3-NEXT:    lock cmpxchg16b (%rdi)16114; HASWELL-O3-NEXT:  .Lpcsection501:16115; HASWELL-O3-NEXT:    jne .LBB225_116116; HASWELL-O3-NEXT:  # %bb.2: # %atomicrmw.end16117; HASWELL-O3-NEXT:    movq $1, foo(%rip)16118; HASWELL-O3-NEXT:    popq %rbx16119; HASWELL-O3-NEXT:    .cfi_def_cfa_offset 816120; HASWELL-O3-NEXT:    retq16121entry:16122  load volatile i64, ptr @foo, align 816123  %x = atomicrmw and ptr %a, i128 42 release, align 16, !pcsections !016124  store volatile i64 1, ptr @foo, align 816125  ret void16126}16127 16128define void @atomic128_or_release(ptr %a) {16129; O0-LABEL: atomic128_or_release:16130; O0:       # %bb.0: # %entry16131; O0-NEXT:    pushq %rbx16132; O0-NEXT:    .cfi_def_cfa_offset 1616133; O0-NEXT:    .cfi_offset %rbx, -1616134; O0-NEXT:    movq %rdi, {{[-0-9]+}}(%r{{[sb]}}p) # 8-byte Spill16135; O0-NEXT:    movq foo(%rip), %rax16136; O0-NEXT:  .Lpcsection588:16137; O0-NEXT:    movq (%rdi), %rax16138; O0-NEXT:  .Lpcsection589:16139; O0-NEXT:    movq 8(%rdi), %rdx16140; O0-NEXT:    movq %rax, {{[-0-9]+}}(%r{{[sb]}}p) # 8-byte Spill16141; O0-NEXT:    movq %rdx, {{[-0-9]+}}(%r{{[sb]}}p) # 8-byte Spill16142; O0-NEXT:  .Lpcsection590:16143; O0-NEXT:    jmp .LBB226_116144; O0-NEXT:  .LBB226_1: # %atomicrmw.start16145; O0-NEXT:    # =>This Inner Loop Header: Depth=116146; O0-NEXT:    movq {{[-0-9]+}}(%r{{[sb]}}p), %rcx # 8-byte Reload16147; O0-NEXT:    movq {{[-0-9]+}}(%r{{[sb]}}p), %rax # 8-byte Reload16148; O0-NEXT:    movq {{[-0-9]+}}(%r{{[sb]}}p), %rsi # 8-byte Reload16149; O0-NEXT:    movq %rax, %rbx16150; O0-NEXT:  .Lpcsection591:16151; O0-NEXT:    orq $42, %rbx16152; O0-NEXT:    movq %rcx, %rdx16153; O0-NEXT:  .Lpcsection592:16154; O0-NEXT:    lock cmpxchg16b (%rsi)16155; O0-NEXT:    movq %rax, {{[-0-9]+}}(%r{{[sb]}}p) # 8-byte Spill16156; O0-NEXT:    movq %rdx, {{[-0-9]+}}(%r{{[sb]}}p) # 8-byte Spill16157; O0-NEXT:  .Lpcsection593:16158; O0-NEXT:    jne .LBB226_116159; O0-NEXT:    jmp .LBB226_216160; O0-NEXT:  .LBB226_2: # %atomicrmw.end16161; O0-NEXT:    movq $1, foo16162; O0-NEXT:    popq %rbx16163; O0-NEXT:    .cfi_def_cfa_offset 816164; O0-NEXT:    retq16165;16166; O1-LABEL: atomic128_or_release:16167; O1:       # %bb.0: # %entry16168; O1-NEXT:    pushq %rbx16169; O1-NEXT:    .cfi_def_cfa_offset 1616170; O1-NEXT:    .cfi_offset %rbx, -1616171; O1-NEXT:    movq foo(%rip), %rax16172; O1-NEXT:  .Lpcsection525:16173; O1-NEXT:    movq (%rdi), %rax16174; O1-NEXT:  .Lpcsection526:16175; O1-NEXT:    movq 8(%rdi), %rdx16176; O1-NEXT:    .p2align 416177; O1-NEXT:  .LBB226_1: # %atomicrmw.start16178; O1-NEXT:    # =>This Inner Loop Header: Depth=116179; O1-NEXT:    movq %rax, %rbx16180; O1-NEXT:  .Lpcsection527:16181; O1-NEXT:    orq $42, %rbx16182; O1-NEXT:    movq %rdx, %rcx16183; O1-NEXT:  .Lpcsection528:16184; O1-NEXT:    lock cmpxchg16b (%rdi)16185; O1-NEXT:  .Lpcsection529:16186; O1-NEXT:    jne .LBB226_116187; O1-NEXT:  # %bb.2: # %atomicrmw.end16188; O1-NEXT:    movq $1, foo(%rip)16189; O1-NEXT:    popq %rbx16190; O1-NEXT:    .cfi_def_cfa_offset 816191; O1-NEXT:    retq16192;16193; O2-LABEL: atomic128_or_release:16194; O2:       # %bb.0: # %entry16195; O2-NEXT:    pushq %rbx16196; O2-NEXT:    .cfi_def_cfa_offset 1616197; O2-NEXT:    .cfi_offset %rbx, -1616198; O2-NEXT:    movq foo(%rip), %rax16199; O2-NEXT:  .Lpcsection525:16200; O2-NEXT:    movq (%rdi), %rax16201; O2-NEXT:  .Lpcsection526:16202; O2-NEXT:    movq 8(%rdi), %rdx16203; O2-NEXT:    .p2align 416204; O2-NEXT:  .LBB226_1: # %atomicrmw.start16205; O2-NEXT:    # =>This Inner Loop Header: Depth=116206; O2-NEXT:    movq %rax, %rbx16207; O2-NEXT:  .Lpcsection527:16208; O2-NEXT:    orq $42, %rbx16209; O2-NEXT:    movq %rdx, %rcx16210; O2-NEXT:  .Lpcsection528:16211; O2-NEXT:    lock cmpxchg16b (%rdi)16212; O2-NEXT:  .Lpcsection529:16213; O2-NEXT:    jne .LBB226_116214; O2-NEXT:  # %bb.2: # %atomicrmw.end16215; O2-NEXT:    movq $1, foo(%rip)16216; O2-NEXT:    popq %rbx16217; O2-NEXT:    .cfi_def_cfa_offset 816218; O2-NEXT:    retq16219;16220; O3-LABEL: atomic128_or_release:16221; O3:       # %bb.0: # %entry16222; O3-NEXT:    pushq %rbx16223; O3-NEXT:    .cfi_def_cfa_offset 1616224; O3-NEXT:    .cfi_offset %rbx, -1616225; O3-NEXT:    movq foo(%rip), %rax16226; O3-NEXT:  .Lpcsection525:16227; O3-NEXT:    movq (%rdi), %rax16228; O3-NEXT:  .Lpcsection526:16229; O3-NEXT:    movq 8(%rdi), %rdx16230; O3-NEXT:    .p2align 416231; O3-NEXT:  .LBB226_1: # %atomicrmw.start16232; O3-NEXT:    # =>This Inner Loop Header: Depth=116233; O3-NEXT:    movq %rax, %rbx16234; O3-NEXT:  .Lpcsection527:16235; O3-NEXT:    orq $42, %rbx16236; O3-NEXT:    movq %rdx, %rcx16237; O3-NEXT:  .Lpcsection528:16238; O3-NEXT:    lock cmpxchg16b (%rdi)16239; O3-NEXT:  .Lpcsection529:16240; O3-NEXT:    jne .LBB226_116241; O3-NEXT:  # %bb.2: # %atomicrmw.end16242; O3-NEXT:    movq $1, foo(%rip)16243; O3-NEXT:    popq %rbx16244; O3-NEXT:    .cfi_def_cfa_offset 816245; O3-NEXT:    retq16246;16247; HASWELL-O3-LABEL: atomic128_or_release:16248; HASWELL-O3:       # %bb.0: # %entry16249; HASWELL-O3-NEXT:    pushq %rbx16250; HASWELL-O3-NEXT:    .cfi_def_cfa_offset 1616251; HASWELL-O3-NEXT:    .cfi_offset %rbx, -1616252; HASWELL-O3-NEXT:    movq foo(%rip), %rax16253; HASWELL-O3-NEXT:  .Lpcsection502:16254; HASWELL-O3-NEXT:    movq (%rdi), %rax16255; HASWELL-O3-NEXT:  .Lpcsection503:16256; HASWELL-O3-NEXT:    movq 8(%rdi), %rdx16257; HASWELL-O3-NEXT:    .p2align 416258; HASWELL-O3-NEXT:  .LBB226_1: # %atomicrmw.start16259; HASWELL-O3-NEXT:    # =>This Inner Loop Header: Depth=116260; HASWELL-O3-NEXT:    movq %rax, %rbx16261; HASWELL-O3-NEXT:  .Lpcsection504:16262; HASWELL-O3-NEXT:    orq $42, %rbx16263; HASWELL-O3-NEXT:    movq %rdx, %rcx16264; HASWELL-O3-NEXT:  .Lpcsection505:16265; HASWELL-O3-NEXT:    lock cmpxchg16b (%rdi)16266; HASWELL-O3-NEXT:  .Lpcsection506:16267; HASWELL-O3-NEXT:    jne .LBB226_116268; HASWELL-O3-NEXT:  # %bb.2: # %atomicrmw.end16269; HASWELL-O3-NEXT:    movq $1, foo(%rip)16270; HASWELL-O3-NEXT:    popq %rbx16271; HASWELL-O3-NEXT:    .cfi_def_cfa_offset 816272; HASWELL-O3-NEXT:    retq16273entry:16274  load volatile i64, ptr @foo, align 816275  %x = atomicrmw or ptr %a, i128 42 release, align 16, !pcsections !016276  store volatile i64 1, ptr @foo, align 816277  ret void16278}16279 16280define void @atomic128_xor_release(ptr %a) {16281; O0-LABEL: atomic128_xor_release:16282; O0:       # %bb.0: # %entry16283; O0-NEXT:    pushq %rbx16284; O0-NEXT:    .cfi_def_cfa_offset 1616285; O0-NEXT:    .cfi_offset %rbx, -1616286; O0-NEXT:    movq %rdi, {{[-0-9]+}}(%r{{[sb]}}p) # 8-byte Spill16287; O0-NEXT:    movq foo(%rip), %rax16288; O0-NEXT:  .Lpcsection594:16289; O0-NEXT:    movq (%rdi), %rax16290; O0-NEXT:  .Lpcsection595:16291; O0-NEXT:    movq 8(%rdi), %rdx16292; O0-NEXT:    movq %rax, {{[-0-9]+}}(%r{{[sb]}}p) # 8-byte Spill16293; O0-NEXT:    movq %rdx, {{[-0-9]+}}(%r{{[sb]}}p) # 8-byte Spill16294; O0-NEXT:  .Lpcsection596:16295; O0-NEXT:    jmp .LBB227_116296; O0-NEXT:  .LBB227_1: # %atomicrmw.start16297; O0-NEXT:    # =>This Inner Loop Header: Depth=116298; O0-NEXT:    movq {{[-0-9]+}}(%r{{[sb]}}p), %rcx # 8-byte Reload16299; O0-NEXT:    movq {{[-0-9]+}}(%r{{[sb]}}p), %rax # 8-byte Reload16300; O0-NEXT:    movq {{[-0-9]+}}(%r{{[sb]}}p), %rsi # 8-byte Reload16301; O0-NEXT:    movq %rax, %rbx16302; O0-NEXT:  .Lpcsection597:16303; O0-NEXT:    xorq $42, %rbx16304; O0-NEXT:    movq %rcx, %rdx16305; O0-NEXT:  .Lpcsection598:16306; O0-NEXT:    lock cmpxchg16b (%rsi)16307; O0-NEXT:    movq %rax, {{[-0-9]+}}(%r{{[sb]}}p) # 8-byte Spill16308; O0-NEXT:    movq %rdx, {{[-0-9]+}}(%r{{[sb]}}p) # 8-byte Spill16309; O0-NEXT:  .Lpcsection599:16310; O0-NEXT:    jne .LBB227_116311; O0-NEXT:    jmp .LBB227_216312; O0-NEXT:  .LBB227_2: # %atomicrmw.end16313; O0-NEXT:    movq $1, foo16314; O0-NEXT:    popq %rbx16315; O0-NEXT:    .cfi_def_cfa_offset 816316; O0-NEXT:    retq16317;16318; O1-LABEL: atomic128_xor_release:16319; O1:       # %bb.0: # %entry16320; O1-NEXT:    pushq %rbx16321; O1-NEXT:    .cfi_def_cfa_offset 1616322; O1-NEXT:    .cfi_offset %rbx, -1616323; O1-NEXT:    movq foo(%rip), %rax16324; O1-NEXT:  .Lpcsection530:16325; O1-NEXT:    movq (%rdi), %rax16326; O1-NEXT:  .Lpcsection531:16327; O1-NEXT:    movq 8(%rdi), %rdx16328; O1-NEXT:    .p2align 416329; O1-NEXT:  .LBB227_1: # %atomicrmw.start16330; O1-NEXT:    # =>This Inner Loop Header: Depth=116331; O1-NEXT:    movq %rax, %rbx16332; O1-NEXT:  .Lpcsection532:16333; O1-NEXT:    xorq $42, %rbx16334; O1-NEXT:    movq %rdx, %rcx16335; O1-NEXT:  .Lpcsection533:16336; O1-NEXT:    lock cmpxchg16b (%rdi)16337; O1-NEXT:  .Lpcsection534:16338; O1-NEXT:    jne .LBB227_116339; O1-NEXT:  # %bb.2: # %atomicrmw.end16340; O1-NEXT:    movq $1, foo(%rip)16341; O1-NEXT:    popq %rbx16342; O1-NEXT:    .cfi_def_cfa_offset 816343; O1-NEXT:    retq16344;16345; O2-LABEL: atomic128_xor_release:16346; O2:       # %bb.0: # %entry16347; O2-NEXT:    pushq %rbx16348; O2-NEXT:    .cfi_def_cfa_offset 1616349; O2-NEXT:    .cfi_offset %rbx, -1616350; O2-NEXT:    movq foo(%rip), %rax16351; O2-NEXT:  .Lpcsection530:16352; O2-NEXT:    movq (%rdi), %rax16353; O2-NEXT:  .Lpcsection531:16354; O2-NEXT:    movq 8(%rdi), %rdx16355; O2-NEXT:    .p2align 416356; O2-NEXT:  .LBB227_1: # %atomicrmw.start16357; O2-NEXT:    # =>This Inner Loop Header: Depth=116358; O2-NEXT:    movq %rax, %rbx16359; O2-NEXT:  .Lpcsection532:16360; O2-NEXT:    xorq $42, %rbx16361; O2-NEXT:    movq %rdx, %rcx16362; O2-NEXT:  .Lpcsection533:16363; O2-NEXT:    lock cmpxchg16b (%rdi)16364; O2-NEXT:  .Lpcsection534:16365; O2-NEXT:    jne .LBB227_116366; O2-NEXT:  # %bb.2: # %atomicrmw.end16367; O2-NEXT:    movq $1, foo(%rip)16368; O2-NEXT:    popq %rbx16369; O2-NEXT:    .cfi_def_cfa_offset 816370; O2-NEXT:    retq16371;16372; O3-LABEL: atomic128_xor_release:16373; O3:       # %bb.0: # %entry16374; O3-NEXT:    pushq %rbx16375; O3-NEXT:    .cfi_def_cfa_offset 1616376; O3-NEXT:    .cfi_offset %rbx, -1616377; O3-NEXT:    movq foo(%rip), %rax16378; O3-NEXT:  .Lpcsection530:16379; O3-NEXT:    movq (%rdi), %rax16380; O3-NEXT:  .Lpcsection531:16381; O3-NEXT:    movq 8(%rdi), %rdx16382; O3-NEXT:    .p2align 416383; O3-NEXT:  .LBB227_1: # %atomicrmw.start16384; O3-NEXT:    # =>This Inner Loop Header: Depth=116385; O3-NEXT:    movq %rax, %rbx16386; O3-NEXT:  .Lpcsection532:16387; O3-NEXT:    xorq $42, %rbx16388; O3-NEXT:    movq %rdx, %rcx16389; O3-NEXT:  .Lpcsection533:16390; O3-NEXT:    lock cmpxchg16b (%rdi)16391; O3-NEXT:  .Lpcsection534:16392; O3-NEXT:    jne .LBB227_116393; O3-NEXT:  # %bb.2: # %atomicrmw.end16394; O3-NEXT:    movq $1, foo(%rip)16395; O3-NEXT:    popq %rbx16396; O3-NEXT:    .cfi_def_cfa_offset 816397; O3-NEXT:    retq16398;16399; HASWELL-O3-LABEL: atomic128_xor_release:16400; HASWELL-O3:       # %bb.0: # %entry16401; HASWELL-O3-NEXT:    pushq %rbx16402; HASWELL-O3-NEXT:    .cfi_def_cfa_offset 1616403; HASWELL-O3-NEXT:    .cfi_offset %rbx, -1616404; HASWELL-O3-NEXT:    movq foo(%rip), %rax16405; HASWELL-O3-NEXT:  .Lpcsection507:16406; HASWELL-O3-NEXT:    movq (%rdi), %rax16407; HASWELL-O3-NEXT:  .Lpcsection508:16408; HASWELL-O3-NEXT:    movq 8(%rdi), %rdx16409; HASWELL-O3-NEXT:    .p2align 416410; HASWELL-O3-NEXT:  .LBB227_1: # %atomicrmw.start16411; HASWELL-O3-NEXT:    # =>This Inner Loop Header: Depth=116412; HASWELL-O3-NEXT:    movq %rax, %rbx16413; HASWELL-O3-NEXT:  .Lpcsection509:16414; HASWELL-O3-NEXT:    xorq $42, %rbx16415; HASWELL-O3-NEXT:    movq %rdx, %rcx16416; HASWELL-O3-NEXT:  .Lpcsection510:16417; HASWELL-O3-NEXT:    lock cmpxchg16b (%rdi)16418; HASWELL-O3-NEXT:  .Lpcsection511:16419; HASWELL-O3-NEXT:    jne .LBB227_116420; HASWELL-O3-NEXT:  # %bb.2: # %atomicrmw.end16421; HASWELL-O3-NEXT:    movq $1, foo(%rip)16422; HASWELL-O3-NEXT:    popq %rbx16423; HASWELL-O3-NEXT:    .cfi_def_cfa_offset 816424; HASWELL-O3-NEXT:    retq16425entry:16426  load volatile i64, ptr @foo, align 816427  %x = atomicrmw xor ptr %a, i128 42 release, align 16, !pcsections !016428  store volatile i64 1, ptr @foo, align 816429  ret void16430}16431 16432define void @atomic128_nand_release(ptr %a) {16433; O0-LABEL: atomic128_nand_release:16434; O0:       # %bb.0: # %entry16435; O0-NEXT:    pushq %rbx16436; O0-NEXT:    .cfi_def_cfa_offset 1616437; O0-NEXT:    .cfi_offset %rbx, -1616438; O0-NEXT:    movq %rdi, {{[-0-9]+}}(%r{{[sb]}}p) # 8-byte Spill16439; O0-NEXT:    movq foo(%rip), %rax16440; O0-NEXT:  .Lpcsection600:16441; O0-NEXT:    movq (%rdi), %rax16442; O0-NEXT:  .Lpcsection601:16443; O0-NEXT:    movq 8(%rdi), %rdx16444; O0-NEXT:    movq %rax, {{[-0-9]+}}(%r{{[sb]}}p) # 8-byte Spill16445; O0-NEXT:    movq %rdx, {{[-0-9]+}}(%r{{[sb]}}p) # 8-byte Spill16446; O0-NEXT:  .Lpcsection602:16447; O0-NEXT:    jmp .LBB228_116448; O0-NEXT:  .LBB228_1: # %atomicrmw.start16449; O0-NEXT:    # =>This Inner Loop Header: Depth=116450; O0-NEXT:    movq {{[-0-9]+}}(%r{{[sb]}}p), %rdx # 8-byte Reload16451; O0-NEXT:    movq {{[-0-9]+}}(%r{{[sb]}}p), %rax # 8-byte Reload16452; O0-NEXT:    movq {{[-0-9]+}}(%r{{[sb]}}p), %rsi # 8-byte Reload16453; O0-NEXT:    movl %eax, %ecx16454; O0-NEXT:  .Lpcsection603:16455; O0-NEXT:    notl %ecx16456; O0-NEXT:  .Lpcsection604:16457; O0-NEXT:    # implicit-def: $rbx16458; O0-NEXT:    movl %ecx, %ebx16459; O0-NEXT:  .Lpcsection605:16460; O0-NEXT:    orq $-43, %rbx16461; O0-NEXT:  .Lpcsection606:16462; O0-NEXT:    movq $-1, %rcx16463; O0-NEXT:  .Lpcsection607:16464; O0-NEXT:    lock cmpxchg16b (%rsi)16465; O0-NEXT:    movq %rax, {{[-0-9]+}}(%r{{[sb]}}p) # 8-byte Spill16466; O0-NEXT:    movq %rdx, {{[-0-9]+}}(%r{{[sb]}}p) # 8-byte Spill16467; O0-NEXT:  .Lpcsection608:16468; O0-NEXT:    jne .LBB228_116469; O0-NEXT:    jmp .LBB228_216470; O0-NEXT:  .LBB228_2: # %atomicrmw.end16471; O0-NEXT:    movq $1, foo16472; O0-NEXT:    popq %rbx16473; O0-NEXT:    .cfi_def_cfa_offset 816474; O0-NEXT:    retq16475;16476; O1-LABEL: atomic128_nand_release:16477; O1:       # %bb.0: # %entry16478; O1-NEXT:    pushq %rbx16479; O1-NEXT:    .cfi_def_cfa_offset 1616480; O1-NEXT:    .cfi_offset %rbx, -1616481; O1-NEXT:    movq foo(%rip), %rax16482; O1-NEXT:  .Lpcsection535:16483; O1-NEXT:    movq (%rdi), %rax16484; O1-NEXT:  .Lpcsection536:16485; O1-NEXT:    movq 8(%rdi), %rdx16486; O1-NEXT:  .Lpcsection537:16487; O1-NEXT:    movq $-1, %rcx16488; O1-NEXT:    .p2align 416489; O1-NEXT:  .LBB228_1: # %atomicrmw.start16490; O1-NEXT:    # =>This Inner Loop Header: Depth=116491; O1-NEXT:    movl %eax, %ebx16492; O1-NEXT:  .Lpcsection538:16493; O1-NEXT:    notl %ebx16494; O1-NEXT:  .Lpcsection539:16495; O1-NEXT:    orq $-43, %rbx16496; O1-NEXT:  .Lpcsection540:16497; O1-NEXT:    lock cmpxchg16b (%rdi)16498; O1-NEXT:  .Lpcsection541:16499; O1-NEXT:    jne .LBB228_116500; O1-NEXT:  # %bb.2: # %atomicrmw.end16501; O1-NEXT:    movq $1, foo(%rip)16502; O1-NEXT:    popq %rbx16503; O1-NEXT:    .cfi_def_cfa_offset 816504; O1-NEXT:    retq16505;16506; O2-LABEL: atomic128_nand_release:16507; O2:       # %bb.0: # %entry16508; O2-NEXT:    pushq %rbx16509; O2-NEXT:    .cfi_def_cfa_offset 1616510; O2-NEXT:    .cfi_offset %rbx, -1616511; O2-NEXT:    movq foo(%rip), %rax16512; O2-NEXT:  .Lpcsection535:16513; O2-NEXT:    movq (%rdi), %rax16514; O2-NEXT:  .Lpcsection536:16515; O2-NEXT:    movq 8(%rdi), %rdx16516; O2-NEXT:  .Lpcsection537:16517; O2-NEXT:    movq $-1, %rcx16518; O2-NEXT:    .p2align 416519; O2-NEXT:  .LBB228_1: # %atomicrmw.start16520; O2-NEXT:    # =>This Inner Loop Header: Depth=116521; O2-NEXT:    movl %eax, %ebx16522; O2-NEXT:  .Lpcsection538:16523; O2-NEXT:    notl %ebx16524; O2-NEXT:  .Lpcsection539:16525; O2-NEXT:    orq $-43, %rbx16526; O2-NEXT:  .Lpcsection540:16527; O2-NEXT:    lock cmpxchg16b (%rdi)16528; O2-NEXT:  .Lpcsection541:16529; O2-NEXT:    jne .LBB228_116530; O2-NEXT:  # %bb.2: # %atomicrmw.end16531; O2-NEXT:    movq $1, foo(%rip)16532; O2-NEXT:    popq %rbx16533; O2-NEXT:    .cfi_def_cfa_offset 816534; O2-NEXT:    retq16535;16536; O3-LABEL: atomic128_nand_release:16537; O3:       # %bb.0: # %entry16538; O3-NEXT:    pushq %rbx16539; O3-NEXT:    .cfi_def_cfa_offset 1616540; O3-NEXT:    .cfi_offset %rbx, -1616541; O3-NEXT:    movq foo(%rip), %rax16542; O3-NEXT:  .Lpcsection535:16543; O3-NEXT:    movq (%rdi), %rax16544; O3-NEXT:  .Lpcsection536:16545; O3-NEXT:    movq 8(%rdi), %rdx16546; O3-NEXT:  .Lpcsection537:16547; O3-NEXT:    movq $-1, %rcx16548; O3-NEXT:    .p2align 416549; O3-NEXT:  .LBB228_1: # %atomicrmw.start16550; O3-NEXT:    # =>This Inner Loop Header: Depth=116551; O3-NEXT:    movl %eax, %ebx16552; O3-NEXT:  .Lpcsection538:16553; O3-NEXT:    notl %ebx16554; O3-NEXT:  .Lpcsection539:16555; O3-NEXT:    orq $-43, %rbx16556; O3-NEXT:  .Lpcsection540:16557; O3-NEXT:    lock cmpxchg16b (%rdi)16558; O3-NEXT:  .Lpcsection541:16559; O3-NEXT:    jne .LBB228_116560; O3-NEXT:  # %bb.2: # %atomicrmw.end16561; O3-NEXT:    movq $1, foo(%rip)16562; O3-NEXT:    popq %rbx16563; O3-NEXT:    .cfi_def_cfa_offset 816564; O3-NEXT:    retq16565;16566; HASWELL-O3-LABEL: atomic128_nand_release:16567; HASWELL-O3:       # %bb.0: # %entry16568; HASWELL-O3-NEXT:    pushq %rbx16569; HASWELL-O3-NEXT:    .cfi_def_cfa_offset 1616570; HASWELL-O3-NEXT:    .cfi_offset %rbx, -1616571; HASWELL-O3-NEXT:    movq foo(%rip), %rax16572; HASWELL-O3-NEXT:  .Lpcsection512:16573; HASWELL-O3-NEXT:    movq (%rdi), %rax16574; HASWELL-O3-NEXT:  .Lpcsection513:16575; HASWELL-O3-NEXT:    movq 8(%rdi), %rdx16576; HASWELL-O3-NEXT:  .Lpcsection514:16577; HASWELL-O3-NEXT:    movq $-1, %rcx16578; HASWELL-O3-NEXT:    .p2align 416579; HASWELL-O3-NEXT:  .LBB228_1: # %atomicrmw.start16580; HASWELL-O3-NEXT:    # =>This Inner Loop Header: Depth=116581; HASWELL-O3-NEXT:    movl %eax, %ebx16582; HASWELL-O3-NEXT:  .Lpcsection515:16583; HASWELL-O3-NEXT:    notl %ebx16584; HASWELL-O3-NEXT:  .Lpcsection516:16585; HASWELL-O3-NEXT:    orq $-43, %rbx16586; HASWELL-O3-NEXT:  .Lpcsection517:16587; HASWELL-O3-NEXT:    lock cmpxchg16b (%rdi)16588; HASWELL-O3-NEXT:  .Lpcsection518:16589; HASWELL-O3-NEXT:    jne .LBB228_116590; HASWELL-O3-NEXT:  # %bb.2: # %atomicrmw.end16591; HASWELL-O3-NEXT:    movq $1, foo(%rip)16592; HASWELL-O3-NEXT:    popq %rbx16593; HASWELL-O3-NEXT:    .cfi_def_cfa_offset 816594; HASWELL-O3-NEXT:    retq16595entry:16596  load volatile i64, ptr @foo, align 816597  %x = atomicrmw nand ptr %a, i128 42 release, align 16, !pcsections !016598  store volatile i64 1, ptr @foo, align 816599  ret void16600}16601 16602define void @atomic128_xchg_acq_rel(ptr %a) {16603; O0-LABEL: atomic128_xchg_acq_rel:16604; O0:       # %bb.0: # %entry16605; O0-NEXT:    pushq %rbx16606; O0-NEXT:    .cfi_def_cfa_offset 1616607; O0-NEXT:    .cfi_offset %rbx, -1616608; O0-NEXT:    movq %rdi, {{[-0-9]+}}(%r{{[sb]}}p) # 8-byte Spill16609; O0-NEXT:    movq foo(%rip), %rax16610; O0-NEXT:  .Lpcsection609:16611; O0-NEXT:    movq (%rdi), %rax16612; O0-NEXT:  .Lpcsection610:16613; O0-NEXT:    movq 8(%rdi), %rdx16614; O0-NEXT:    movq %rax, {{[-0-9]+}}(%r{{[sb]}}p) # 8-byte Spill16615; O0-NEXT:    movq %rdx, {{[-0-9]+}}(%r{{[sb]}}p) # 8-byte Spill16616; O0-NEXT:  .Lpcsection611:16617; O0-NEXT:    jmp .LBB229_116618; O0-NEXT:  .LBB229_1: # %atomicrmw.start16619; O0-NEXT:    # =>This Inner Loop Header: Depth=116620; O0-NEXT:    movq {{[-0-9]+}}(%r{{[sb]}}p), %rdx # 8-byte Reload16621; O0-NEXT:    movq {{[-0-9]+}}(%r{{[sb]}}p), %rax # 8-byte Reload16622; O0-NEXT:    movq {{[-0-9]+}}(%r{{[sb]}}p), %rsi # 8-byte Reload16623; O0-NEXT:  .Lpcsection612:16624; O0-NEXT:    xorl %ecx, %ecx16625; O0-NEXT:  .Lpcsection613:16626; O0-NEXT:    # kill: def $rcx killed $ecx16627; O0-NEXT:  .Lpcsection614:16628; O0-NEXT:    movl $42, %ebx16629; O0-NEXT:  .Lpcsection615:16630; O0-NEXT:    lock cmpxchg16b (%rsi)16631; O0-NEXT:    movq %rax, {{[-0-9]+}}(%r{{[sb]}}p) # 8-byte Spill16632; O0-NEXT:    movq %rdx, {{[-0-9]+}}(%r{{[sb]}}p) # 8-byte Spill16633; O0-NEXT:  .Lpcsection616:16634; O0-NEXT:    jne .LBB229_116635; O0-NEXT:    jmp .LBB229_216636; O0-NEXT:  .LBB229_2: # %atomicrmw.end16637; O0-NEXT:    movq $1, foo16638; O0-NEXT:    popq %rbx16639; O0-NEXT:    .cfi_def_cfa_offset 816640; O0-NEXT:    retq16641;16642; O1-LABEL: atomic128_xchg_acq_rel:16643; O1:       # %bb.0: # %entry16644; O1-NEXT:    pushq %rbx16645; O1-NEXT:    .cfi_def_cfa_offset 1616646; O1-NEXT:    .cfi_offset %rbx, -1616647; O1-NEXT:    movq foo(%rip), %rax16648; O1-NEXT:  .Lpcsection542:16649; O1-NEXT:    movq (%rdi), %rax16650; O1-NEXT:  .Lpcsection543:16651; O1-NEXT:    movq 8(%rdi), %rdx16652; O1-NEXT:  .Lpcsection544:16653; O1-NEXT:    movl $42, %ebx16654; O1-NEXT:    .p2align 416655; O1-NEXT:  .LBB229_1: # %atomicrmw.start16656; O1-NEXT:    # =>This Inner Loop Header: Depth=116657; O1-NEXT:  .Lpcsection545:16658; O1-NEXT:    xorl %ecx, %ecx16659; O1-NEXT:  .Lpcsection546:16660; O1-NEXT:    lock cmpxchg16b (%rdi)16661; O1-NEXT:  .Lpcsection547:16662; O1-NEXT:    jne .LBB229_116663; O1-NEXT:  # %bb.2: # %atomicrmw.end16664; O1-NEXT:    movq $1, foo(%rip)16665; O1-NEXT:    popq %rbx16666; O1-NEXT:    .cfi_def_cfa_offset 816667; O1-NEXT:    retq16668;16669; O2-LABEL: atomic128_xchg_acq_rel:16670; O2:       # %bb.0: # %entry16671; O2-NEXT:    pushq %rbx16672; O2-NEXT:    .cfi_def_cfa_offset 1616673; O2-NEXT:    .cfi_offset %rbx, -1616674; O2-NEXT:    movq foo(%rip), %rax16675; O2-NEXT:  .Lpcsection542:16676; O2-NEXT:    movq (%rdi), %rax16677; O2-NEXT:  .Lpcsection543:16678; O2-NEXT:    movq 8(%rdi), %rdx16679; O2-NEXT:  .Lpcsection544:16680; O2-NEXT:    movl $42, %ebx16681; O2-NEXT:    .p2align 416682; O2-NEXT:  .LBB229_1: # %atomicrmw.start16683; O2-NEXT:    # =>This Inner Loop Header: Depth=116684; O2-NEXT:  .Lpcsection545:16685; O2-NEXT:    xorl %ecx, %ecx16686; O2-NEXT:  .Lpcsection546:16687; O2-NEXT:    lock cmpxchg16b (%rdi)16688; O2-NEXT:  .Lpcsection547:16689; O2-NEXT:    jne .LBB229_116690; O2-NEXT:  # %bb.2: # %atomicrmw.end16691; O2-NEXT:    movq $1, foo(%rip)16692; O2-NEXT:    popq %rbx16693; O2-NEXT:    .cfi_def_cfa_offset 816694; O2-NEXT:    retq16695;16696; O3-LABEL: atomic128_xchg_acq_rel:16697; O3:       # %bb.0: # %entry16698; O3-NEXT:    pushq %rbx16699; O3-NEXT:    .cfi_def_cfa_offset 1616700; O3-NEXT:    .cfi_offset %rbx, -1616701; O3-NEXT:    movq foo(%rip), %rax16702; O3-NEXT:  .Lpcsection542:16703; O3-NEXT:    movq (%rdi), %rax16704; O3-NEXT:  .Lpcsection543:16705; O3-NEXT:    movq 8(%rdi), %rdx16706; O3-NEXT:  .Lpcsection544:16707; O3-NEXT:    movl $42, %ebx16708; O3-NEXT:    .p2align 416709; O3-NEXT:  .LBB229_1: # %atomicrmw.start16710; O3-NEXT:    # =>This Inner Loop Header: Depth=116711; O3-NEXT:  .Lpcsection545:16712; O3-NEXT:    xorl %ecx, %ecx16713; O3-NEXT:  .Lpcsection546:16714; O3-NEXT:    lock cmpxchg16b (%rdi)16715; O3-NEXT:  .Lpcsection547:16716; O3-NEXT:    jne .LBB229_116717; O3-NEXT:  # %bb.2: # %atomicrmw.end16718; O3-NEXT:    movq $1, foo(%rip)16719; O3-NEXT:    popq %rbx16720; O3-NEXT:    .cfi_def_cfa_offset 816721; O3-NEXT:    retq16722;16723; HASWELL-O3-LABEL: atomic128_xchg_acq_rel:16724; HASWELL-O3:       # %bb.0: # %entry16725; HASWELL-O3-NEXT:    pushq %rbx16726; HASWELL-O3-NEXT:    .cfi_def_cfa_offset 1616727; HASWELL-O3-NEXT:    .cfi_offset %rbx, -1616728; HASWELL-O3-NEXT:    movq foo(%rip), %rax16729; HASWELL-O3-NEXT:  .Lpcsection519:16730; HASWELL-O3-NEXT:    movq (%rdi), %rax16731; HASWELL-O3-NEXT:  .Lpcsection520:16732; HASWELL-O3-NEXT:    movq 8(%rdi), %rdx16733; HASWELL-O3-NEXT:  .Lpcsection521:16734; HASWELL-O3-NEXT:    movl $42, %ebx16735; HASWELL-O3-NEXT:    .p2align 416736; HASWELL-O3-NEXT:  .LBB229_1: # %atomicrmw.start16737; HASWELL-O3-NEXT:    # =>This Inner Loop Header: Depth=116738; HASWELL-O3-NEXT:  .Lpcsection522:16739; HASWELL-O3-NEXT:    xorl %ecx, %ecx16740; HASWELL-O3-NEXT:  .Lpcsection523:16741; HASWELL-O3-NEXT:    lock cmpxchg16b (%rdi)16742; HASWELL-O3-NEXT:  .Lpcsection524:16743; HASWELL-O3-NEXT:    jne .LBB229_116744; HASWELL-O3-NEXT:  # %bb.2: # %atomicrmw.end16745; HASWELL-O3-NEXT:    movq $1, foo(%rip)16746; HASWELL-O3-NEXT:    popq %rbx16747; HASWELL-O3-NEXT:    .cfi_def_cfa_offset 816748; HASWELL-O3-NEXT:    retq16749entry:16750  load volatile i64, ptr @foo, align 816751  %x = atomicrmw xchg ptr %a, i128 42 acq_rel, align 16, !pcsections !016752  store volatile i64 1, ptr @foo, align 816753  ret void16754}16755 16756define void @atomic128_add_acq_rel(ptr %a) {16757; O0-LABEL: atomic128_add_acq_rel:16758; O0:       # %bb.0: # %entry16759; O0-NEXT:    pushq %rbx16760; O0-NEXT:    .cfi_def_cfa_offset 1616761; O0-NEXT:    .cfi_offset %rbx, -1616762; O0-NEXT:    movq %rdi, {{[-0-9]+}}(%r{{[sb]}}p) # 8-byte Spill16763; O0-NEXT:    movq foo(%rip), %rax16764; O0-NEXT:  .Lpcsection617:16765; O0-NEXT:    movq (%rdi), %rax16766; O0-NEXT:  .Lpcsection618:16767; O0-NEXT:    movq 8(%rdi), %rdx16768; O0-NEXT:    movq %rax, {{[-0-9]+}}(%r{{[sb]}}p) # 8-byte Spill16769; O0-NEXT:    movq %rdx, {{[-0-9]+}}(%r{{[sb]}}p) # 8-byte Spill16770; O0-NEXT:  .Lpcsection619:16771; O0-NEXT:    jmp .LBB230_116772; O0-NEXT:  .LBB230_1: # %atomicrmw.start16773; O0-NEXT:    # =>This Inner Loop Header: Depth=116774; O0-NEXT:    movq {{[-0-9]+}}(%r{{[sb]}}p), %rdx # 8-byte Reload16775; O0-NEXT:    movq {{[-0-9]+}}(%r{{[sb]}}p), %rax # 8-byte Reload16776; O0-NEXT:    movq {{[-0-9]+}}(%r{{[sb]}}p), %rsi # 8-byte Reload16777; O0-NEXT:    movq %rax, %rbx16778; O0-NEXT:  .Lpcsection620:16779; O0-NEXT:    addq $42, %rbx16780; O0-NEXT:    movq %rdx, %rcx16781; O0-NEXT:  .Lpcsection621:16782; O0-NEXT:    adcq $0, %rcx16783; O0-NEXT:  .Lpcsection622:16784; O0-NEXT:    lock cmpxchg16b (%rsi)16785; O0-NEXT:    movq %rax, {{[-0-9]+}}(%r{{[sb]}}p) # 8-byte Spill16786; O0-NEXT:    movq %rdx, {{[-0-9]+}}(%r{{[sb]}}p) # 8-byte Spill16787; O0-NEXT:  .Lpcsection623:16788; O0-NEXT:    jne .LBB230_116789; O0-NEXT:    jmp .LBB230_216790; O0-NEXT:  .LBB230_2: # %atomicrmw.end16791; O0-NEXT:    movq $1, foo16792; O0-NEXT:    popq %rbx16793; O0-NEXT:    .cfi_def_cfa_offset 816794; O0-NEXT:    retq16795;16796; O1-LABEL: atomic128_add_acq_rel:16797; O1:       # %bb.0: # %entry16798; O1-NEXT:    pushq %rbx16799; O1-NEXT:    .cfi_def_cfa_offset 1616800; O1-NEXT:    .cfi_offset %rbx, -1616801; O1-NEXT:    movq foo(%rip), %rax16802; O1-NEXT:  .Lpcsection548:16803; O1-NEXT:    movq (%rdi), %rax16804; O1-NEXT:  .Lpcsection549:16805; O1-NEXT:    movq 8(%rdi), %rdx16806; O1-NEXT:    .p2align 416807; O1-NEXT:  .LBB230_1: # %atomicrmw.start16808; O1-NEXT:    # =>This Inner Loop Header: Depth=116809; O1-NEXT:    movq %rax, %rbx16810; O1-NEXT:  .Lpcsection550:16811; O1-NEXT:    addq $42, %rbx16812; O1-NEXT:    movq %rdx, %rcx16813; O1-NEXT:  .Lpcsection551:16814; O1-NEXT:    adcq $0, %rcx16815; O1-NEXT:  .Lpcsection552:16816; O1-NEXT:    lock cmpxchg16b (%rdi)16817; O1-NEXT:  .Lpcsection553:16818; O1-NEXT:    jne .LBB230_116819; O1-NEXT:  # %bb.2: # %atomicrmw.end16820; O1-NEXT:    movq $1, foo(%rip)16821; O1-NEXT:    popq %rbx16822; O1-NEXT:    .cfi_def_cfa_offset 816823; O1-NEXT:    retq16824;16825; O2-LABEL: atomic128_add_acq_rel:16826; O2:       # %bb.0: # %entry16827; O2-NEXT:    pushq %rbx16828; O2-NEXT:    .cfi_def_cfa_offset 1616829; O2-NEXT:    .cfi_offset %rbx, -1616830; O2-NEXT:    movq foo(%rip), %rax16831; O2-NEXT:  .Lpcsection548:16832; O2-NEXT:    movq (%rdi), %rax16833; O2-NEXT:  .Lpcsection549:16834; O2-NEXT:    movq 8(%rdi), %rdx16835; O2-NEXT:    .p2align 416836; O2-NEXT:  .LBB230_1: # %atomicrmw.start16837; O2-NEXT:    # =>This Inner Loop Header: Depth=116838; O2-NEXT:    movq %rax, %rbx16839; O2-NEXT:  .Lpcsection550:16840; O2-NEXT:    addq $42, %rbx16841; O2-NEXT:    movq %rdx, %rcx16842; O2-NEXT:  .Lpcsection551:16843; O2-NEXT:    adcq $0, %rcx16844; O2-NEXT:  .Lpcsection552:16845; O2-NEXT:    lock cmpxchg16b (%rdi)16846; O2-NEXT:  .Lpcsection553:16847; O2-NEXT:    jne .LBB230_116848; O2-NEXT:  # %bb.2: # %atomicrmw.end16849; O2-NEXT:    movq $1, foo(%rip)16850; O2-NEXT:    popq %rbx16851; O2-NEXT:    .cfi_def_cfa_offset 816852; O2-NEXT:    retq16853;16854; O3-LABEL: atomic128_add_acq_rel:16855; O3:       # %bb.0: # %entry16856; O3-NEXT:    pushq %rbx16857; O3-NEXT:    .cfi_def_cfa_offset 1616858; O3-NEXT:    .cfi_offset %rbx, -1616859; O3-NEXT:    movq foo(%rip), %rax16860; O3-NEXT:  .Lpcsection548:16861; O3-NEXT:    movq (%rdi), %rax16862; O3-NEXT:  .Lpcsection549:16863; O3-NEXT:    movq 8(%rdi), %rdx16864; O3-NEXT:    .p2align 416865; O3-NEXT:  .LBB230_1: # %atomicrmw.start16866; O3-NEXT:    # =>This Inner Loop Header: Depth=116867; O3-NEXT:    movq %rax, %rbx16868; O3-NEXT:  .Lpcsection550:16869; O3-NEXT:    addq $42, %rbx16870; O3-NEXT:    movq %rdx, %rcx16871; O3-NEXT:  .Lpcsection551:16872; O3-NEXT:    adcq $0, %rcx16873; O3-NEXT:  .Lpcsection552:16874; O3-NEXT:    lock cmpxchg16b (%rdi)16875; O3-NEXT:  .Lpcsection553:16876; O3-NEXT:    jne .LBB230_116877; O3-NEXT:  # %bb.2: # %atomicrmw.end16878; O3-NEXT:    movq $1, foo(%rip)16879; O3-NEXT:    popq %rbx16880; O3-NEXT:    .cfi_def_cfa_offset 816881; O3-NEXT:    retq16882;16883; HASWELL-O3-LABEL: atomic128_add_acq_rel:16884; HASWELL-O3:       # %bb.0: # %entry16885; HASWELL-O3-NEXT:    pushq %rbx16886; HASWELL-O3-NEXT:    .cfi_def_cfa_offset 1616887; HASWELL-O3-NEXT:    .cfi_offset %rbx, -1616888; HASWELL-O3-NEXT:    movq foo(%rip), %rax16889; HASWELL-O3-NEXT:  .Lpcsection525:16890; HASWELL-O3-NEXT:    movq (%rdi), %rax16891; HASWELL-O3-NEXT:  .Lpcsection526:16892; HASWELL-O3-NEXT:    movq 8(%rdi), %rdx16893; HASWELL-O3-NEXT:    .p2align 416894; HASWELL-O3-NEXT:  .LBB230_1: # %atomicrmw.start16895; HASWELL-O3-NEXT:    # =>This Inner Loop Header: Depth=116896; HASWELL-O3-NEXT:    movq %rax, %rbx16897; HASWELL-O3-NEXT:  .Lpcsection527:16898; HASWELL-O3-NEXT:    addq $42, %rbx16899; HASWELL-O3-NEXT:    movq %rdx, %rcx16900; HASWELL-O3-NEXT:  .Lpcsection528:16901; HASWELL-O3-NEXT:    adcq $0, %rcx16902; HASWELL-O3-NEXT:  .Lpcsection529:16903; HASWELL-O3-NEXT:    lock cmpxchg16b (%rdi)16904; HASWELL-O3-NEXT:  .Lpcsection530:16905; HASWELL-O3-NEXT:    jne .LBB230_116906; HASWELL-O3-NEXT:  # %bb.2: # %atomicrmw.end16907; HASWELL-O3-NEXT:    movq $1, foo(%rip)16908; HASWELL-O3-NEXT:    popq %rbx16909; HASWELL-O3-NEXT:    .cfi_def_cfa_offset 816910; HASWELL-O3-NEXT:    retq16911entry:16912  load volatile i64, ptr @foo, align 816913  %x = atomicrmw add ptr %a, i128 42 acq_rel, align 16, !pcsections !016914  store volatile i64 1, ptr @foo, align 816915  ret void16916}16917 16918define void @atomic128_sub_acq_rel(ptr %a) {16919; O0-LABEL: atomic128_sub_acq_rel:16920; O0:       # %bb.0: # %entry16921; O0-NEXT:    pushq %rbx16922; O0-NEXT:    .cfi_def_cfa_offset 1616923; O0-NEXT:    .cfi_offset %rbx, -1616924; O0-NEXT:    movq %rdi, {{[-0-9]+}}(%r{{[sb]}}p) # 8-byte Spill16925; O0-NEXT:    movq foo(%rip), %rax16926; O0-NEXT:  .Lpcsection624:16927; O0-NEXT:    movq (%rdi), %rax16928; O0-NEXT:  .Lpcsection625:16929; O0-NEXT:    movq 8(%rdi), %rdx16930; O0-NEXT:    movq %rax, {{[-0-9]+}}(%r{{[sb]}}p) # 8-byte Spill16931; O0-NEXT:    movq %rdx, {{[-0-9]+}}(%r{{[sb]}}p) # 8-byte Spill16932; O0-NEXT:  .Lpcsection626:16933; O0-NEXT:    jmp .LBB231_116934; O0-NEXT:  .LBB231_1: # %atomicrmw.start16935; O0-NEXT:    # =>This Inner Loop Header: Depth=116936; O0-NEXT:    movq {{[-0-9]+}}(%r{{[sb]}}p), %rdx # 8-byte Reload16937; O0-NEXT:    movq {{[-0-9]+}}(%r{{[sb]}}p), %rax # 8-byte Reload16938; O0-NEXT:    movq {{[-0-9]+}}(%r{{[sb]}}p), %rsi # 8-byte Reload16939; O0-NEXT:    movq %rax, %rbx16940; O0-NEXT:  .Lpcsection627:16941; O0-NEXT:    addq $-42, %rbx16942; O0-NEXT:    movq %rdx, %rcx16943; O0-NEXT:  .Lpcsection628:16944; O0-NEXT:    adcq $-1, %rcx16945; O0-NEXT:  .Lpcsection629:16946; O0-NEXT:    lock cmpxchg16b (%rsi)16947; O0-NEXT:    movq %rax, {{[-0-9]+}}(%r{{[sb]}}p) # 8-byte Spill16948; O0-NEXT:    movq %rdx, {{[-0-9]+}}(%r{{[sb]}}p) # 8-byte Spill16949; O0-NEXT:  .Lpcsection630:16950; O0-NEXT:    jne .LBB231_116951; O0-NEXT:    jmp .LBB231_216952; O0-NEXT:  .LBB231_2: # %atomicrmw.end16953; O0-NEXT:    movq $1, foo16954; O0-NEXT:    popq %rbx16955; O0-NEXT:    .cfi_def_cfa_offset 816956; O0-NEXT:    retq16957;16958; O1-LABEL: atomic128_sub_acq_rel:16959; O1:       # %bb.0: # %entry16960; O1-NEXT:    pushq %rbx16961; O1-NEXT:    .cfi_def_cfa_offset 1616962; O1-NEXT:    .cfi_offset %rbx, -1616963; O1-NEXT:    movq foo(%rip), %rax16964; O1-NEXT:  .Lpcsection554:16965; O1-NEXT:    movq (%rdi), %rax16966; O1-NEXT:  .Lpcsection555:16967; O1-NEXT:    movq 8(%rdi), %rdx16968; O1-NEXT:    .p2align 416969; O1-NEXT:  .LBB231_1: # %atomicrmw.start16970; O1-NEXT:    # =>This Inner Loop Header: Depth=116971; O1-NEXT:    movq %rax, %rbx16972; O1-NEXT:  .Lpcsection556:16973; O1-NEXT:    addq $-42, %rbx16974; O1-NEXT:    movq %rdx, %rcx16975; O1-NEXT:  .Lpcsection557:16976; O1-NEXT:    adcq $-1, %rcx16977; O1-NEXT:  .Lpcsection558:16978; O1-NEXT:    lock cmpxchg16b (%rdi)16979; O1-NEXT:  .Lpcsection559:16980; O1-NEXT:    jne .LBB231_116981; O1-NEXT:  # %bb.2: # %atomicrmw.end16982; O1-NEXT:    movq $1, foo(%rip)16983; O1-NEXT:    popq %rbx16984; O1-NEXT:    .cfi_def_cfa_offset 816985; O1-NEXT:    retq16986;16987; O2-LABEL: atomic128_sub_acq_rel:16988; O2:       # %bb.0: # %entry16989; O2-NEXT:    pushq %rbx16990; O2-NEXT:    .cfi_def_cfa_offset 1616991; O2-NEXT:    .cfi_offset %rbx, -1616992; O2-NEXT:    movq foo(%rip), %rax16993; O2-NEXT:  .Lpcsection554:16994; O2-NEXT:    movq (%rdi), %rax16995; O2-NEXT:  .Lpcsection555:16996; O2-NEXT:    movq 8(%rdi), %rdx16997; O2-NEXT:    .p2align 416998; O2-NEXT:  .LBB231_1: # %atomicrmw.start16999; O2-NEXT:    # =>This Inner Loop Header: Depth=117000; O2-NEXT:    movq %rax, %rbx17001; O2-NEXT:  .Lpcsection556:17002; O2-NEXT:    addq $-42, %rbx17003; O2-NEXT:    movq %rdx, %rcx17004; O2-NEXT:  .Lpcsection557:17005; O2-NEXT:    adcq $-1, %rcx17006; O2-NEXT:  .Lpcsection558:17007; O2-NEXT:    lock cmpxchg16b (%rdi)17008; O2-NEXT:  .Lpcsection559:17009; O2-NEXT:    jne .LBB231_117010; O2-NEXT:  # %bb.2: # %atomicrmw.end17011; O2-NEXT:    movq $1, foo(%rip)17012; O2-NEXT:    popq %rbx17013; O2-NEXT:    .cfi_def_cfa_offset 817014; O2-NEXT:    retq17015;17016; O3-LABEL: atomic128_sub_acq_rel:17017; O3:       # %bb.0: # %entry17018; O3-NEXT:    pushq %rbx17019; O3-NEXT:    .cfi_def_cfa_offset 1617020; O3-NEXT:    .cfi_offset %rbx, -1617021; O3-NEXT:    movq foo(%rip), %rax17022; O3-NEXT:  .Lpcsection554:17023; O3-NEXT:    movq (%rdi), %rax17024; O3-NEXT:  .Lpcsection555:17025; O3-NEXT:    movq 8(%rdi), %rdx17026; O3-NEXT:    .p2align 417027; O3-NEXT:  .LBB231_1: # %atomicrmw.start17028; O3-NEXT:    # =>This Inner Loop Header: Depth=117029; O3-NEXT:    movq %rax, %rbx17030; O3-NEXT:  .Lpcsection556:17031; O3-NEXT:    addq $-42, %rbx17032; O3-NEXT:    movq %rdx, %rcx17033; O3-NEXT:  .Lpcsection557:17034; O3-NEXT:    adcq $-1, %rcx17035; O3-NEXT:  .Lpcsection558:17036; O3-NEXT:    lock cmpxchg16b (%rdi)17037; O3-NEXT:  .Lpcsection559:17038; O3-NEXT:    jne .LBB231_117039; O3-NEXT:  # %bb.2: # %atomicrmw.end17040; O3-NEXT:    movq $1, foo(%rip)17041; O3-NEXT:    popq %rbx17042; O3-NEXT:    .cfi_def_cfa_offset 817043; O3-NEXT:    retq17044;17045; HASWELL-O3-LABEL: atomic128_sub_acq_rel:17046; HASWELL-O3:       # %bb.0: # %entry17047; HASWELL-O3-NEXT:    pushq %rbx17048; HASWELL-O3-NEXT:    .cfi_def_cfa_offset 1617049; HASWELL-O3-NEXT:    .cfi_offset %rbx, -1617050; HASWELL-O3-NEXT:    movq foo(%rip), %rax17051; HASWELL-O3-NEXT:  .Lpcsection531:17052; HASWELL-O3-NEXT:    movq (%rdi), %rax17053; HASWELL-O3-NEXT:  .Lpcsection532:17054; HASWELL-O3-NEXT:    movq 8(%rdi), %rdx17055; HASWELL-O3-NEXT:    .p2align 417056; HASWELL-O3-NEXT:  .LBB231_1: # %atomicrmw.start17057; HASWELL-O3-NEXT:    # =>This Inner Loop Header: Depth=117058; HASWELL-O3-NEXT:    movq %rax, %rbx17059; HASWELL-O3-NEXT:  .Lpcsection533:17060; HASWELL-O3-NEXT:    addq $-42, %rbx17061; HASWELL-O3-NEXT:    movq %rdx, %rcx17062; HASWELL-O3-NEXT:  .Lpcsection534:17063; HASWELL-O3-NEXT:    adcq $-1, %rcx17064; HASWELL-O3-NEXT:  .Lpcsection535:17065; HASWELL-O3-NEXT:    lock cmpxchg16b (%rdi)17066; HASWELL-O3-NEXT:  .Lpcsection536:17067; HASWELL-O3-NEXT:    jne .LBB231_117068; HASWELL-O3-NEXT:  # %bb.2: # %atomicrmw.end17069; HASWELL-O3-NEXT:    movq $1, foo(%rip)17070; HASWELL-O3-NEXT:    popq %rbx17071; HASWELL-O3-NEXT:    .cfi_def_cfa_offset 817072; HASWELL-O3-NEXT:    retq17073entry:17074  load volatile i64, ptr @foo, align 817075  %x = atomicrmw sub ptr %a, i128 42 acq_rel, align 16, !pcsections !017076  store volatile i64 1, ptr @foo, align 817077  ret void17078}17079 17080define void @atomic128_and_acq_rel(ptr %a) {17081; O0-LABEL: atomic128_and_acq_rel:17082; O0:       # %bb.0: # %entry17083; O0-NEXT:    pushq %rbx17084; O0-NEXT:    .cfi_def_cfa_offset 1617085; O0-NEXT:    .cfi_offset %rbx, -1617086; O0-NEXT:    movq %rdi, {{[-0-9]+}}(%r{{[sb]}}p) # 8-byte Spill17087; O0-NEXT:    movq foo(%rip), %rax17088; O0-NEXT:  .Lpcsection631:17089; O0-NEXT:    movq (%rdi), %rax17090; O0-NEXT:  .Lpcsection632:17091; O0-NEXT:    movq 8(%rdi), %rdx17092; O0-NEXT:    movq %rax, {{[-0-9]+}}(%r{{[sb]}}p) # 8-byte Spill17093; O0-NEXT:    movq %rdx, {{[-0-9]+}}(%r{{[sb]}}p) # 8-byte Spill17094; O0-NEXT:  .Lpcsection633:17095; O0-NEXT:    jmp .LBB232_117096; O0-NEXT:  .LBB232_1: # %atomicrmw.start17097; O0-NEXT:    # =>This Inner Loop Header: Depth=117098; O0-NEXT:    movq {{[-0-9]+}}(%r{{[sb]}}p), %rdx # 8-byte Reload17099; O0-NEXT:    movq {{[-0-9]+}}(%r{{[sb]}}p), %rax # 8-byte Reload17100; O0-NEXT:    movq {{[-0-9]+}}(%r{{[sb]}}p), %rsi # 8-byte Reload17101; O0-NEXT:    movl %eax, %ecx17102; O0-NEXT:  .Lpcsection634:17103; O0-NEXT:    andl $42, %ecx17104; O0-NEXT:    movl %ecx, %ebx17105; O0-NEXT:  .Lpcsection635:17106; O0-NEXT:    xorl %ecx, %ecx17107; O0-NEXT:  .Lpcsection636:17108; O0-NEXT:    # kill: def $rcx killed $ecx17109; O0-NEXT:  .Lpcsection637:17110; O0-NEXT:    lock cmpxchg16b (%rsi)17111; O0-NEXT:    movq %rax, {{[-0-9]+}}(%r{{[sb]}}p) # 8-byte Spill17112; O0-NEXT:    movq %rdx, {{[-0-9]+}}(%r{{[sb]}}p) # 8-byte Spill17113; O0-NEXT:  .Lpcsection638:17114; O0-NEXT:    jne .LBB232_117115; O0-NEXT:    jmp .LBB232_217116; O0-NEXT:  .LBB232_2: # %atomicrmw.end17117; O0-NEXT:    movq $1, foo17118; O0-NEXT:    popq %rbx17119; O0-NEXT:    .cfi_def_cfa_offset 817120; O0-NEXT:    retq17121;17122; O1-LABEL: atomic128_and_acq_rel:17123; O1:       # %bb.0: # %entry17124; O1-NEXT:    pushq %rbx17125; O1-NEXT:    .cfi_def_cfa_offset 1617126; O1-NEXT:    .cfi_offset %rbx, -1617127; O1-NEXT:    movq foo(%rip), %rax17128; O1-NEXT:  .Lpcsection560:17129; O1-NEXT:    movq (%rdi), %rax17130; O1-NEXT:  .Lpcsection561:17131; O1-NEXT:    movq 8(%rdi), %rdx17132; O1-NEXT:    .p2align 417133; O1-NEXT:  .LBB232_1: # %atomicrmw.start17134; O1-NEXT:    # =>This Inner Loop Header: Depth=117135; O1-NEXT:    movl %eax, %ebx17136; O1-NEXT:  .Lpcsection562:17137; O1-NEXT:    andl $42, %ebx17138; O1-NEXT:  .Lpcsection563:17139; O1-NEXT:    xorl %ecx, %ecx17140; O1-NEXT:  .Lpcsection564:17141; O1-NEXT:    lock cmpxchg16b (%rdi)17142; O1-NEXT:  .Lpcsection565:17143; O1-NEXT:    jne .LBB232_117144; O1-NEXT:  # %bb.2: # %atomicrmw.end17145; O1-NEXT:    movq $1, foo(%rip)17146; O1-NEXT:    popq %rbx17147; O1-NEXT:    .cfi_def_cfa_offset 817148; O1-NEXT:    retq17149;17150; O2-LABEL: atomic128_and_acq_rel:17151; O2:       # %bb.0: # %entry17152; O2-NEXT:    pushq %rbx17153; O2-NEXT:    .cfi_def_cfa_offset 1617154; O2-NEXT:    .cfi_offset %rbx, -1617155; O2-NEXT:    movq foo(%rip), %rax17156; O2-NEXT:  .Lpcsection560:17157; O2-NEXT:    movq (%rdi), %rax17158; O2-NEXT:  .Lpcsection561:17159; O2-NEXT:    movq 8(%rdi), %rdx17160; O2-NEXT:    .p2align 417161; O2-NEXT:  .LBB232_1: # %atomicrmw.start17162; O2-NEXT:    # =>This Inner Loop Header: Depth=117163; O2-NEXT:    movl %eax, %ebx17164; O2-NEXT:  .Lpcsection562:17165; O2-NEXT:    andl $42, %ebx17166; O2-NEXT:  .Lpcsection563:17167; O2-NEXT:    xorl %ecx, %ecx17168; O2-NEXT:  .Lpcsection564:17169; O2-NEXT:    lock cmpxchg16b (%rdi)17170; O2-NEXT:  .Lpcsection565:17171; O2-NEXT:    jne .LBB232_117172; O2-NEXT:  # %bb.2: # %atomicrmw.end17173; O2-NEXT:    movq $1, foo(%rip)17174; O2-NEXT:    popq %rbx17175; O2-NEXT:    .cfi_def_cfa_offset 817176; O2-NEXT:    retq17177;17178; O3-LABEL: atomic128_and_acq_rel:17179; O3:       # %bb.0: # %entry17180; O3-NEXT:    pushq %rbx17181; O3-NEXT:    .cfi_def_cfa_offset 1617182; O3-NEXT:    .cfi_offset %rbx, -1617183; O3-NEXT:    movq foo(%rip), %rax17184; O3-NEXT:  .Lpcsection560:17185; O3-NEXT:    movq (%rdi), %rax17186; O3-NEXT:  .Lpcsection561:17187; O3-NEXT:    movq 8(%rdi), %rdx17188; O3-NEXT:    .p2align 417189; O3-NEXT:  .LBB232_1: # %atomicrmw.start17190; O3-NEXT:    # =>This Inner Loop Header: Depth=117191; O3-NEXT:    movl %eax, %ebx17192; O3-NEXT:  .Lpcsection562:17193; O3-NEXT:    andl $42, %ebx17194; O3-NEXT:  .Lpcsection563:17195; O3-NEXT:    xorl %ecx, %ecx17196; O3-NEXT:  .Lpcsection564:17197; O3-NEXT:    lock cmpxchg16b (%rdi)17198; O3-NEXT:  .Lpcsection565:17199; O3-NEXT:    jne .LBB232_117200; O3-NEXT:  # %bb.2: # %atomicrmw.end17201; O3-NEXT:    movq $1, foo(%rip)17202; O3-NEXT:    popq %rbx17203; O3-NEXT:    .cfi_def_cfa_offset 817204; O3-NEXT:    retq17205;17206; HASWELL-O3-LABEL: atomic128_and_acq_rel:17207; HASWELL-O3:       # %bb.0: # %entry17208; HASWELL-O3-NEXT:    pushq %rbx17209; HASWELL-O3-NEXT:    .cfi_def_cfa_offset 1617210; HASWELL-O3-NEXT:    .cfi_offset %rbx, -1617211; HASWELL-O3-NEXT:    movq foo(%rip), %rax17212; HASWELL-O3-NEXT:  .Lpcsection537:17213; HASWELL-O3-NEXT:    movq (%rdi), %rax17214; HASWELL-O3-NEXT:  .Lpcsection538:17215; HASWELL-O3-NEXT:    movq 8(%rdi), %rdx17216; HASWELL-O3-NEXT:    .p2align 417217; HASWELL-O3-NEXT:  .LBB232_1: # %atomicrmw.start17218; HASWELL-O3-NEXT:    # =>This Inner Loop Header: Depth=117219; HASWELL-O3-NEXT:    movl %eax, %ebx17220; HASWELL-O3-NEXT:  .Lpcsection539:17221; HASWELL-O3-NEXT:    andl $42, %ebx17222; HASWELL-O3-NEXT:  .Lpcsection540:17223; HASWELL-O3-NEXT:    xorl %ecx, %ecx17224; HASWELL-O3-NEXT:  .Lpcsection541:17225; HASWELL-O3-NEXT:    lock cmpxchg16b (%rdi)17226; HASWELL-O3-NEXT:  .Lpcsection542:17227; HASWELL-O3-NEXT:    jne .LBB232_117228; HASWELL-O3-NEXT:  # %bb.2: # %atomicrmw.end17229; HASWELL-O3-NEXT:    movq $1, foo(%rip)17230; HASWELL-O3-NEXT:    popq %rbx17231; HASWELL-O3-NEXT:    .cfi_def_cfa_offset 817232; HASWELL-O3-NEXT:    retq17233entry:17234  load volatile i64, ptr @foo, align 817235  %x = atomicrmw and ptr %a, i128 42 acq_rel, align 16, !pcsections !017236  store volatile i64 1, ptr @foo, align 817237  ret void17238}17239 17240define void @atomic128_or_acq_rel(ptr %a) {17241; O0-LABEL: atomic128_or_acq_rel:17242; O0:       # %bb.0: # %entry17243; O0-NEXT:    pushq %rbx17244; O0-NEXT:    .cfi_def_cfa_offset 1617245; O0-NEXT:    .cfi_offset %rbx, -1617246; O0-NEXT:    movq %rdi, {{[-0-9]+}}(%r{{[sb]}}p) # 8-byte Spill17247; O0-NEXT:    movq foo(%rip), %rax17248; O0-NEXT:  .Lpcsection639:17249; O0-NEXT:    movq (%rdi), %rax17250; O0-NEXT:  .Lpcsection640:17251; O0-NEXT:    movq 8(%rdi), %rdx17252; O0-NEXT:    movq %rax, {{[-0-9]+}}(%r{{[sb]}}p) # 8-byte Spill17253; O0-NEXT:    movq %rdx, {{[-0-9]+}}(%r{{[sb]}}p) # 8-byte Spill17254; O0-NEXT:  .Lpcsection641:17255; O0-NEXT:    jmp .LBB233_117256; O0-NEXT:  .LBB233_1: # %atomicrmw.start17257; O0-NEXT:    # =>This Inner Loop Header: Depth=117258; O0-NEXT:    movq {{[-0-9]+}}(%r{{[sb]}}p), %rcx # 8-byte Reload17259; O0-NEXT:    movq {{[-0-9]+}}(%r{{[sb]}}p), %rax # 8-byte Reload17260; O0-NEXT:    movq {{[-0-9]+}}(%r{{[sb]}}p), %rsi # 8-byte Reload17261; O0-NEXT:    movq %rax, %rbx17262; O0-NEXT:  .Lpcsection642:17263; O0-NEXT:    orq $42, %rbx17264; O0-NEXT:    movq %rcx, %rdx17265; O0-NEXT:  .Lpcsection643:17266; O0-NEXT:    lock cmpxchg16b (%rsi)17267; O0-NEXT:    movq %rax, {{[-0-9]+}}(%r{{[sb]}}p) # 8-byte Spill17268; O0-NEXT:    movq %rdx, {{[-0-9]+}}(%r{{[sb]}}p) # 8-byte Spill17269; O0-NEXT:  .Lpcsection644:17270; O0-NEXT:    jne .LBB233_117271; O0-NEXT:    jmp .LBB233_217272; O0-NEXT:  .LBB233_2: # %atomicrmw.end17273; O0-NEXT:    movq $1, foo17274; O0-NEXT:    popq %rbx17275; O0-NEXT:    .cfi_def_cfa_offset 817276; O0-NEXT:    retq17277;17278; O1-LABEL: atomic128_or_acq_rel:17279; O1:       # %bb.0: # %entry17280; O1-NEXT:    pushq %rbx17281; O1-NEXT:    .cfi_def_cfa_offset 1617282; O1-NEXT:    .cfi_offset %rbx, -1617283; O1-NEXT:    movq foo(%rip), %rax17284; O1-NEXT:  .Lpcsection566:17285; O1-NEXT:    movq (%rdi), %rax17286; O1-NEXT:  .Lpcsection567:17287; O1-NEXT:    movq 8(%rdi), %rdx17288; O1-NEXT:    .p2align 417289; O1-NEXT:  .LBB233_1: # %atomicrmw.start17290; O1-NEXT:    # =>This Inner Loop Header: Depth=117291; O1-NEXT:    movq %rax, %rbx17292; O1-NEXT:  .Lpcsection568:17293; O1-NEXT:    orq $42, %rbx17294; O1-NEXT:    movq %rdx, %rcx17295; O1-NEXT:  .Lpcsection569:17296; O1-NEXT:    lock cmpxchg16b (%rdi)17297; O1-NEXT:  .Lpcsection570:17298; O1-NEXT:    jne .LBB233_117299; O1-NEXT:  # %bb.2: # %atomicrmw.end17300; O1-NEXT:    movq $1, foo(%rip)17301; O1-NEXT:    popq %rbx17302; O1-NEXT:    .cfi_def_cfa_offset 817303; O1-NEXT:    retq17304;17305; O2-LABEL: atomic128_or_acq_rel:17306; O2:       # %bb.0: # %entry17307; O2-NEXT:    pushq %rbx17308; O2-NEXT:    .cfi_def_cfa_offset 1617309; O2-NEXT:    .cfi_offset %rbx, -1617310; O2-NEXT:    movq foo(%rip), %rax17311; O2-NEXT:  .Lpcsection566:17312; O2-NEXT:    movq (%rdi), %rax17313; O2-NEXT:  .Lpcsection567:17314; O2-NEXT:    movq 8(%rdi), %rdx17315; O2-NEXT:    .p2align 417316; O2-NEXT:  .LBB233_1: # %atomicrmw.start17317; O2-NEXT:    # =>This Inner Loop Header: Depth=117318; O2-NEXT:    movq %rax, %rbx17319; O2-NEXT:  .Lpcsection568:17320; O2-NEXT:    orq $42, %rbx17321; O2-NEXT:    movq %rdx, %rcx17322; O2-NEXT:  .Lpcsection569:17323; O2-NEXT:    lock cmpxchg16b (%rdi)17324; O2-NEXT:  .Lpcsection570:17325; O2-NEXT:    jne .LBB233_117326; O2-NEXT:  # %bb.2: # %atomicrmw.end17327; O2-NEXT:    movq $1, foo(%rip)17328; O2-NEXT:    popq %rbx17329; O2-NEXT:    .cfi_def_cfa_offset 817330; O2-NEXT:    retq17331;17332; O3-LABEL: atomic128_or_acq_rel:17333; O3:       # %bb.0: # %entry17334; O3-NEXT:    pushq %rbx17335; O3-NEXT:    .cfi_def_cfa_offset 1617336; O3-NEXT:    .cfi_offset %rbx, -1617337; O3-NEXT:    movq foo(%rip), %rax17338; O3-NEXT:  .Lpcsection566:17339; O3-NEXT:    movq (%rdi), %rax17340; O3-NEXT:  .Lpcsection567:17341; O3-NEXT:    movq 8(%rdi), %rdx17342; O3-NEXT:    .p2align 417343; O3-NEXT:  .LBB233_1: # %atomicrmw.start17344; O3-NEXT:    # =>This Inner Loop Header: Depth=117345; O3-NEXT:    movq %rax, %rbx17346; O3-NEXT:  .Lpcsection568:17347; O3-NEXT:    orq $42, %rbx17348; O3-NEXT:    movq %rdx, %rcx17349; O3-NEXT:  .Lpcsection569:17350; O3-NEXT:    lock cmpxchg16b (%rdi)17351; O3-NEXT:  .Lpcsection570:17352; O3-NEXT:    jne .LBB233_117353; O3-NEXT:  # %bb.2: # %atomicrmw.end17354; O3-NEXT:    movq $1, foo(%rip)17355; O3-NEXT:    popq %rbx17356; O3-NEXT:    .cfi_def_cfa_offset 817357; O3-NEXT:    retq17358;17359; HASWELL-O3-LABEL: atomic128_or_acq_rel:17360; HASWELL-O3:       # %bb.0: # %entry17361; HASWELL-O3-NEXT:    pushq %rbx17362; HASWELL-O3-NEXT:    .cfi_def_cfa_offset 1617363; HASWELL-O3-NEXT:    .cfi_offset %rbx, -1617364; HASWELL-O3-NEXT:    movq foo(%rip), %rax17365; HASWELL-O3-NEXT:  .Lpcsection543:17366; HASWELL-O3-NEXT:    movq (%rdi), %rax17367; HASWELL-O3-NEXT:  .Lpcsection544:17368; HASWELL-O3-NEXT:    movq 8(%rdi), %rdx17369; HASWELL-O3-NEXT:    .p2align 417370; HASWELL-O3-NEXT:  .LBB233_1: # %atomicrmw.start17371; HASWELL-O3-NEXT:    # =>This Inner Loop Header: Depth=117372; HASWELL-O3-NEXT:    movq %rax, %rbx17373; HASWELL-O3-NEXT:  .Lpcsection545:17374; HASWELL-O3-NEXT:    orq $42, %rbx17375; HASWELL-O3-NEXT:    movq %rdx, %rcx17376; HASWELL-O3-NEXT:  .Lpcsection546:17377; HASWELL-O3-NEXT:    lock cmpxchg16b (%rdi)17378; HASWELL-O3-NEXT:  .Lpcsection547:17379; HASWELL-O3-NEXT:    jne .LBB233_117380; HASWELL-O3-NEXT:  # %bb.2: # %atomicrmw.end17381; HASWELL-O3-NEXT:    movq $1, foo(%rip)17382; HASWELL-O3-NEXT:    popq %rbx17383; HASWELL-O3-NEXT:    .cfi_def_cfa_offset 817384; HASWELL-O3-NEXT:    retq17385entry:17386  load volatile i64, ptr @foo, align 817387  %x = atomicrmw or ptr %a, i128 42 acq_rel, align 16, !pcsections !017388  store volatile i64 1, ptr @foo, align 817389  ret void17390}17391 17392define void @atomic128_xor_acq_rel(ptr %a) {17393; O0-LABEL: atomic128_xor_acq_rel:17394; O0:       # %bb.0: # %entry17395; O0-NEXT:    pushq %rbx17396; O0-NEXT:    .cfi_def_cfa_offset 1617397; O0-NEXT:    .cfi_offset %rbx, -1617398; O0-NEXT:    movq %rdi, {{[-0-9]+}}(%r{{[sb]}}p) # 8-byte Spill17399; O0-NEXT:    movq foo(%rip), %rax17400; O0-NEXT:  .Lpcsection645:17401; O0-NEXT:    movq (%rdi), %rax17402; O0-NEXT:  .Lpcsection646:17403; O0-NEXT:    movq 8(%rdi), %rdx17404; O0-NEXT:    movq %rax, {{[-0-9]+}}(%r{{[sb]}}p) # 8-byte Spill17405; O0-NEXT:    movq %rdx, {{[-0-9]+}}(%r{{[sb]}}p) # 8-byte Spill17406; O0-NEXT:  .Lpcsection647:17407; O0-NEXT:    jmp .LBB234_117408; O0-NEXT:  .LBB234_1: # %atomicrmw.start17409; O0-NEXT:    # =>This Inner Loop Header: Depth=117410; O0-NEXT:    movq {{[-0-9]+}}(%r{{[sb]}}p), %rcx # 8-byte Reload17411; O0-NEXT:    movq {{[-0-9]+}}(%r{{[sb]}}p), %rax # 8-byte Reload17412; O0-NEXT:    movq {{[-0-9]+}}(%r{{[sb]}}p), %rsi # 8-byte Reload17413; O0-NEXT:    movq %rax, %rbx17414; O0-NEXT:  .Lpcsection648:17415; O0-NEXT:    xorq $42, %rbx17416; O0-NEXT:    movq %rcx, %rdx17417; O0-NEXT:  .Lpcsection649:17418; O0-NEXT:    lock cmpxchg16b (%rsi)17419; O0-NEXT:    movq %rax, {{[-0-9]+}}(%r{{[sb]}}p) # 8-byte Spill17420; O0-NEXT:    movq %rdx, {{[-0-9]+}}(%r{{[sb]}}p) # 8-byte Spill17421; O0-NEXT:  .Lpcsection650:17422; O0-NEXT:    jne .LBB234_117423; O0-NEXT:    jmp .LBB234_217424; O0-NEXT:  .LBB234_2: # %atomicrmw.end17425; O0-NEXT:    movq $1, foo17426; O0-NEXT:    popq %rbx17427; O0-NEXT:    .cfi_def_cfa_offset 817428; O0-NEXT:    retq17429;17430; O1-LABEL: atomic128_xor_acq_rel:17431; O1:       # %bb.0: # %entry17432; O1-NEXT:    pushq %rbx17433; O1-NEXT:    .cfi_def_cfa_offset 1617434; O1-NEXT:    .cfi_offset %rbx, -1617435; O1-NEXT:    movq foo(%rip), %rax17436; O1-NEXT:  .Lpcsection571:17437; O1-NEXT:    movq (%rdi), %rax17438; O1-NEXT:  .Lpcsection572:17439; O1-NEXT:    movq 8(%rdi), %rdx17440; O1-NEXT:    .p2align 417441; O1-NEXT:  .LBB234_1: # %atomicrmw.start17442; O1-NEXT:    # =>This Inner Loop Header: Depth=117443; O1-NEXT:    movq %rax, %rbx17444; O1-NEXT:  .Lpcsection573:17445; O1-NEXT:    xorq $42, %rbx17446; O1-NEXT:    movq %rdx, %rcx17447; O1-NEXT:  .Lpcsection574:17448; O1-NEXT:    lock cmpxchg16b (%rdi)17449; O1-NEXT:  .Lpcsection575:17450; O1-NEXT:    jne .LBB234_117451; O1-NEXT:  # %bb.2: # %atomicrmw.end17452; O1-NEXT:    movq $1, foo(%rip)17453; O1-NEXT:    popq %rbx17454; O1-NEXT:    .cfi_def_cfa_offset 817455; O1-NEXT:    retq17456;17457; O2-LABEL: atomic128_xor_acq_rel:17458; O2:       # %bb.0: # %entry17459; O2-NEXT:    pushq %rbx17460; O2-NEXT:    .cfi_def_cfa_offset 1617461; O2-NEXT:    .cfi_offset %rbx, -1617462; O2-NEXT:    movq foo(%rip), %rax17463; O2-NEXT:  .Lpcsection571:17464; O2-NEXT:    movq (%rdi), %rax17465; O2-NEXT:  .Lpcsection572:17466; O2-NEXT:    movq 8(%rdi), %rdx17467; O2-NEXT:    .p2align 417468; O2-NEXT:  .LBB234_1: # %atomicrmw.start17469; O2-NEXT:    # =>This Inner Loop Header: Depth=117470; O2-NEXT:    movq %rax, %rbx17471; O2-NEXT:  .Lpcsection573:17472; O2-NEXT:    xorq $42, %rbx17473; O2-NEXT:    movq %rdx, %rcx17474; O2-NEXT:  .Lpcsection574:17475; O2-NEXT:    lock cmpxchg16b (%rdi)17476; O2-NEXT:  .Lpcsection575:17477; O2-NEXT:    jne .LBB234_117478; O2-NEXT:  # %bb.2: # %atomicrmw.end17479; O2-NEXT:    movq $1, foo(%rip)17480; O2-NEXT:    popq %rbx17481; O2-NEXT:    .cfi_def_cfa_offset 817482; O2-NEXT:    retq17483;17484; O3-LABEL: atomic128_xor_acq_rel:17485; O3:       # %bb.0: # %entry17486; O3-NEXT:    pushq %rbx17487; O3-NEXT:    .cfi_def_cfa_offset 1617488; O3-NEXT:    .cfi_offset %rbx, -1617489; O3-NEXT:    movq foo(%rip), %rax17490; O3-NEXT:  .Lpcsection571:17491; O3-NEXT:    movq (%rdi), %rax17492; O3-NEXT:  .Lpcsection572:17493; O3-NEXT:    movq 8(%rdi), %rdx17494; O3-NEXT:    .p2align 417495; O3-NEXT:  .LBB234_1: # %atomicrmw.start17496; O3-NEXT:    # =>This Inner Loop Header: Depth=117497; O3-NEXT:    movq %rax, %rbx17498; O3-NEXT:  .Lpcsection573:17499; O3-NEXT:    xorq $42, %rbx17500; O3-NEXT:    movq %rdx, %rcx17501; O3-NEXT:  .Lpcsection574:17502; O3-NEXT:    lock cmpxchg16b (%rdi)17503; O3-NEXT:  .Lpcsection575:17504; O3-NEXT:    jne .LBB234_117505; O3-NEXT:  # %bb.2: # %atomicrmw.end17506; O3-NEXT:    movq $1, foo(%rip)17507; O3-NEXT:    popq %rbx17508; O3-NEXT:    .cfi_def_cfa_offset 817509; O3-NEXT:    retq17510;17511; HASWELL-O3-LABEL: atomic128_xor_acq_rel:17512; HASWELL-O3:       # %bb.0: # %entry17513; HASWELL-O3-NEXT:    pushq %rbx17514; HASWELL-O3-NEXT:    .cfi_def_cfa_offset 1617515; HASWELL-O3-NEXT:    .cfi_offset %rbx, -1617516; HASWELL-O3-NEXT:    movq foo(%rip), %rax17517; HASWELL-O3-NEXT:  .Lpcsection548:17518; HASWELL-O3-NEXT:    movq (%rdi), %rax17519; HASWELL-O3-NEXT:  .Lpcsection549:17520; HASWELL-O3-NEXT:    movq 8(%rdi), %rdx17521; HASWELL-O3-NEXT:    .p2align 417522; HASWELL-O3-NEXT:  .LBB234_1: # %atomicrmw.start17523; HASWELL-O3-NEXT:    # =>This Inner Loop Header: Depth=117524; HASWELL-O3-NEXT:    movq %rax, %rbx17525; HASWELL-O3-NEXT:  .Lpcsection550:17526; HASWELL-O3-NEXT:    xorq $42, %rbx17527; HASWELL-O3-NEXT:    movq %rdx, %rcx17528; HASWELL-O3-NEXT:  .Lpcsection551:17529; HASWELL-O3-NEXT:    lock cmpxchg16b (%rdi)17530; HASWELL-O3-NEXT:  .Lpcsection552:17531; HASWELL-O3-NEXT:    jne .LBB234_117532; HASWELL-O3-NEXT:  # %bb.2: # %atomicrmw.end17533; HASWELL-O3-NEXT:    movq $1, foo(%rip)17534; HASWELL-O3-NEXT:    popq %rbx17535; HASWELL-O3-NEXT:    .cfi_def_cfa_offset 817536; HASWELL-O3-NEXT:    retq17537entry:17538  load volatile i64, ptr @foo, align 817539  %x = atomicrmw xor ptr %a, i128 42 acq_rel, align 16, !pcsections !017540  store volatile i64 1, ptr @foo, align 817541  ret void17542}17543 17544define void @atomic128_nand_acq_rel(ptr %a) {17545; O0-LABEL: atomic128_nand_acq_rel:17546; O0:       # %bb.0: # %entry17547; O0-NEXT:    pushq %rbx17548; O0-NEXT:    .cfi_def_cfa_offset 1617549; O0-NEXT:    .cfi_offset %rbx, -1617550; O0-NEXT:    movq %rdi, {{[-0-9]+}}(%r{{[sb]}}p) # 8-byte Spill17551; O0-NEXT:    movq foo(%rip), %rax17552; O0-NEXT:  .Lpcsection651:17553; O0-NEXT:    movq (%rdi), %rax17554; O0-NEXT:  .Lpcsection652:17555; O0-NEXT:    movq 8(%rdi), %rdx17556; O0-NEXT:    movq %rax, {{[-0-9]+}}(%r{{[sb]}}p) # 8-byte Spill17557; O0-NEXT:    movq %rdx, {{[-0-9]+}}(%r{{[sb]}}p) # 8-byte Spill17558; O0-NEXT:  .Lpcsection653:17559; O0-NEXT:    jmp .LBB235_117560; O0-NEXT:  .LBB235_1: # %atomicrmw.start17561; O0-NEXT:    # =>This Inner Loop Header: Depth=117562; O0-NEXT:    movq {{[-0-9]+}}(%r{{[sb]}}p), %rdx # 8-byte Reload17563; O0-NEXT:    movq {{[-0-9]+}}(%r{{[sb]}}p), %rax # 8-byte Reload17564; O0-NEXT:    movq {{[-0-9]+}}(%r{{[sb]}}p), %rsi # 8-byte Reload17565; O0-NEXT:    movl %eax, %ecx17566; O0-NEXT:  .Lpcsection654:17567; O0-NEXT:    notl %ecx17568; O0-NEXT:  .Lpcsection655:17569; O0-NEXT:    # implicit-def: $rbx17570; O0-NEXT:    movl %ecx, %ebx17571; O0-NEXT:  .Lpcsection656:17572; O0-NEXT:    orq $-43, %rbx17573; O0-NEXT:  .Lpcsection657:17574; O0-NEXT:    movq $-1, %rcx17575; O0-NEXT:  .Lpcsection658:17576; O0-NEXT:    lock cmpxchg16b (%rsi)17577; O0-NEXT:    movq %rax, {{[-0-9]+}}(%r{{[sb]}}p) # 8-byte Spill17578; O0-NEXT:    movq %rdx, {{[-0-9]+}}(%r{{[sb]}}p) # 8-byte Spill17579; O0-NEXT:  .Lpcsection659:17580; O0-NEXT:    jne .LBB235_117581; O0-NEXT:    jmp .LBB235_217582; O0-NEXT:  .LBB235_2: # %atomicrmw.end17583; O0-NEXT:    movq $1, foo17584; O0-NEXT:    popq %rbx17585; O0-NEXT:    .cfi_def_cfa_offset 817586; O0-NEXT:    retq17587;17588; O1-LABEL: atomic128_nand_acq_rel:17589; O1:       # %bb.0: # %entry17590; O1-NEXT:    pushq %rbx17591; O1-NEXT:    .cfi_def_cfa_offset 1617592; O1-NEXT:    .cfi_offset %rbx, -1617593; O1-NEXT:    movq foo(%rip), %rax17594; O1-NEXT:  .Lpcsection576:17595; O1-NEXT:    movq (%rdi), %rax17596; O1-NEXT:  .Lpcsection577:17597; O1-NEXT:    movq 8(%rdi), %rdx17598; O1-NEXT:  .Lpcsection578:17599; O1-NEXT:    movq $-1, %rcx17600; O1-NEXT:    .p2align 417601; O1-NEXT:  .LBB235_1: # %atomicrmw.start17602; O1-NEXT:    # =>This Inner Loop Header: Depth=117603; O1-NEXT:    movl %eax, %ebx17604; O1-NEXT:  .Lpcsection579:17605; O1-NEXT:    notl %ebx17606; O1-NEXT:  .Lpcsection580:17607; O1-NEXT:    orq $-43, %rbx17608; O1-NEXT:  .Lpcsection581:17609; O1-NEXT:    lock cmpxchg16b (%rdi)17610; O1-NEXT:  .Lpcsection582:17611; O1-NEXT:    jne .LBB235_117612; O1-NEXT:  # %bb.2: # %atomicrmw.end17613; O1-NEXT:    movq $1, foo(%rip)17614; O1-NEXT:    popq %rbx17615; O1-NEXT:    .cfi_def_cfa_offset 817616; O1-NEXT:    retq17617;17618; O2-LABEL: atomic128_nand_acq_rel:17619; O2:       # %bb.0: # %entry17620; O2-NEXT:    pushq %rbx17621; O2-NEXT:    .cfi_def_cfa_offset 1617622; O2-NEXT:    .cfi_offset %rbx, -1617623; O2-NEXT:    movq foo(%rip), %rax17624; O2-NEXT:  .Lpcsection576:17625; O2-NEXT:    movq (%rdi), %rax17626; O2-NEXT:  .Lpcsection577:17627; O2-NEXT:    movq 8(%rdi), %rdx17628; O2-NEXT:  .Lpcsection578:17629; O2-NEXT:    movq $-1, %rcx17630; O2-NEXT:    .p2align 417631; O2-NEXT:  .LBB235_1: # %atomicrmw.start17632; O2-NEXT:    # =>This Inner Loop Header: Depth=117633; O2-NEXT:    movl %eax, %ebx17634; O2-NEXT:  .Lpcsection579:17635; O2-NEXT:    notl %ebx17636; O2-NEXT:  .Lpcsection580:17637; O2-NEXT:    orq $-43, %rbx17638; O2-NEXT:  .Lpcsection581:17639; O2-NEXT:    lock cmpxchg16b (%rdi)17640; O2-NEXT:  .Lpcsection582:17641; O2-NEXT:    jne .LBB235_117642; O2-NEXT:  # %bb.2: # %atomicrmw.end17643; O2-NEXT:    movq $1, foo(%rip)17644; O2-NEXT:    popq %rbx17645; O2-NEXT:    .cfi_def_cfa_offset 817646; O2-NEXT:    retq17647;17648; O3-LABEL: atomic128_nand_acq_rel:17649; O3:       # %bb.0: # %entry17650; O3-NEXT:    pushq %rbx17651; O3-NEXT:    .cfi_def_cfa_offset 1617652; O3-NEXT:    .cfi_offset %rbx, -1617653; O3-NEXT:    movq foo(%rip), %rax17654; O3-NEXT:  .Lpcsection576:17655; O3-NEXT:    movq (%rdi), %rax17656; O3-NEXT:  .Lpcsection577:17657; O3-NEXT:    movq 8(%rdi), %rdx17658; O3-NEXT:  .Lpcsection578:17659; O3-NEXT:    movq $-1, %rcx17660; O3-NEXT:    .p2align 417661; O3-NEXT:  .LBB235_1: # %atomicrmw.start17662; O3-NEXT:    # =>This Inner Loop Header: Depth=117663; O3-NEXT:    movl %eax, %ebx17664; O3-NEXT:  .Lpcsection579:17665; O3-NEXT:    notl %ebx17666; O3-NEXT:  .Lpcsection580:17667; O3-NEXT:    orq $-43, %rbx17668; O3-NEXT:  .Lpcsection581:17669; O3-NEXT:    lock cmpxchg16b (%rdi)17670; O3-NEXT:  .Lpcsection582:17671; O3-NEXT:    jne .LBB235_117672; O3-NEXT:  # %bb.2: # %atomicrmw.end17673; O3-NEXT:    movq $1, foo(%rip)17674; O3-NEXT:    popq %rbx17675; O3-NEXT:    .cfi_def_cfa_offset 817676; O3-NEXT:    retq17677;17678; HASWELL-O3-LABEL: atomic128_nand_acq_rel:17679; HASWELL-O3:       # %bb.0: # %entry17680; HASWELL-O3-NEXT:    pushq %rbx17681; HASWELL-O3-NEXT:    .cfi_def_cfa_offset 1617682; HASWELL-O3-NEXT:    .cfi_offset %rbx, -1617683; HASWELL-O3-NEXT:    movq foo(%rip), %rax17684; HASWELL-O3-NEXT:  .Lpcsection553:17685; HASWELL-O3-NEXT:    movq (%rdi), %rax17686; HASWELL-O3-NEXT:  .Lpcsection554:17687; HASWELL-O3-NEXT:    movq 8(%rdi), %rdx17688; HASWELL-O3-NEXT:  .Lpcsection555:17689; HASWELL-O3-NEXT:    movq $-1, %rcx17690; HASWELL-O3-NEXT:    .p2align 417691; HASWELL-O3-NEXT:  .LBB235_1: # %atomicrmw.start17692; HASWELL-O3-NEXT:    # =>This Inner Loop Header: Depth=117693; HASWELL-O3-NEXT:    movl %eax, %ebx17694; HASWELL-O3-NEXT:  .Lpcsection556:17695; HASWELL-O3-NEXT:    notl %ebx17696; HASWELL-O3-NEXT:  .Lpcsection557:17697; HASWELL-O3-NEXT:    orq $-43, %rbx17698; HASWELL-O3-NEXT:  .Lpcsection558:17699; HASWELL-O3-NEXT:    lock cmpxchg16b (%rdi)17700; HASWELL-O3-NEXT:  .Lpcsection559:17701; HASWELL-O3-NEXT:    jne .LBB235_117702; HASWELL-O3-NEXT:  # %bb.2: # %atomicrmw.end17703; HASWELL-O3-NEXT:    movq $1, foo(%rip)17704; HASWELL-O3-NEXT:    popq %rbx17705; HASWELL-O3-NEXT:    .cfi_def_cfa_offset 817706; HASWELL-O3-NEXT:    retq17707entry:17708  load volatile i64, ptr @foo, align 817709  %x = atomicrmw nand ptr %a, i128 42 acq_rel, align 16, !pcsections !017710  store volatile i64 1, ptr @foo, align 817711  ret void17712}17713 17714define void @atomic128_xchg_seq_cst(ptr %a) {17715; O0-LABEL: atomic128_xchg_seq_cst:17716; O0:       # %bb.0: # %entry17717; O0-NEXT:    pushq %rbx17718; O0-NEXT:    .cfi_def_cfa_offset 1617719; O0-NEXT:    .cfi_offset %rbx, -1617720; O0-NEXT:    movq %rdi, {{[-0-9]+}}(%r{{[sb]}}p) # 8-byte Spill17721; O0-NEXT:    movq foo(%rip), %rax17722; O0-NEXT:  .Lpcsection660:17723; O0-NEXT:    movq (%rdi), %rax17724; O0-NEXT:  .Lpcsection661:17725; O0-NEXT:    movq 8(%rdi), %rdx17726; O0-NEXT:    movq %rax, {{[-0-9]+}}(%r{{[sb]}}p) # 8-byte Spill17727; O0-NEXT:    movq %rdx, {{[-0-9]+}}(%r{{[sb]}}p) # 8-byte Spill17728; O0-NEXT:  .Lpcsection662:17729; O0-NEXT:    jmp .LBB236_117730; O0-NEXT:  .LBB236_1: # %atomicrmw.start17731; O0-NEXT:    # =>This Inner Loop Header: Depth=117732; O0-NEXT:    movq {{[-0-9]+}}(%r{{[sb]}}p), %rdx # 8-byte Reload17733; O0-NEXT:    movq {{[-0-9]+}}(%r{{[sb]}}p), %rax # 8-byte Reload17734; O0-NEXT:    movq {{[-0-9]+}}(%r{{[sb]}}p), %rsi # 8-byte Reload17735; O0-NEXT:  .Lpcsection663:17736; O0-NEXT:    xorl %ecx, %ecx17737; O0-NEXT:  .Lpcsection664:17738; O0-NEXT:    # kill: def $rcx killed $ecx17739; O0-NEXT:  .Lpcsection665:17740; O0-NEXT:    movl $42, %ebx17741; O0-NEXT:  .Lpcsection666:17742; O0-NEXT:    lock cmpxchg16b (%rsi)17743; O0-NEXT:    movq %rax, {{[-0-9]+}}(%r{{[sb]}}p) # 8-byte Spill17744; O0-NEXT:    movq %rdx, {{[-0-9]+}}(%r{{[sb]}}p) # 8-byte Spill17745; O0-NEXT:  .Lpcsection667:17746; O0-NEXT:    jne .LBB236_117747; O0-NEXT:    jmp .LBB236_217748; O0-NEXT:  .LBB236_2: # %atomicrmw.end17749; O0-NEXT:    movq $1, foo17750; O0-NEXT:    popq %rbx17751; O0-NEXT:    .cfi_def_cfa_offset 817752; O0-NEXT:    retq17753;17754; O1-LABEL: atomic128_xchg_seq_cst:17755; O1:       # %bb.0: # %entry17756; O1-NEXT:    pushq %rbx17757; O1-NEXT:    .cfi_def_cfa_offset 1617758; O1-NEXT:    .cfi_offset %rbx, -1617759; O1-NEXT:    movq foo(%rip), %rax17760; O1-NEXT:  .Lpcsection583:17761; O1-NEXT:    movq (%rdi), %rax17762; O1-NEXT:  .Lpcsection584:17763; O1-NEXT:    movq 8(%rdi), %rdx17764; O1-NEXT:  .Lpcsection585:17765; O1-NEXT:    movl $42, %ebx17766; O1-NEXT:    .p2align 417767; O1-NEXT:  .LBB236_1: # %atomicrmw.start17768; O1-NEXT:    # =>This Inner Loop Header: Depth=117769; O1-NEXT:  .Lpcsection586:17770; O1-NEXT:    xorl %ecx, %ecx17771; O1-NEXT:  .Lpcsection587:17772; O1-NEXT:    lock cmpxchg16b (%rdi)17773; O1-NEXT:  .Lpcsection588:17774; O1-NEXT:    jne .LBB236_117775; O1-NEXT:  # %bb.2: # %atomicrmw.end17776; O1-NEXT:    movq $1, foo(%rip)17777; O1-NEXT:    popq %rbx17778; O1-NEXT:    .cfi_def_cfa_offset 817779; O1-NEXT:    retq17780;17781; O2-LABEL: atomic128_xchg_seq_cst:17782; O2:       # %bb.0: # %entry17783; O2-NEXT:    pushq %rbx17784; O2-NEXT:    .cfi_def_cfa_offset 1617785; O2-NEXT:    .cfi_offset %rbx, -1617786; O2-NEXT:    movq foo(%rip), %rax17787; O2-NEXT:  .Lpcsection583:17788; O2-NEXT:    movq (%rdi), %rax17789; O2-NEXT:  .Lpcsection584:17790; O2-NEXT:    movq 8(%rdi), %rdx17791; O2-NEXT:  .Lpcsection585:17792; O2-NEXT:    movl $42, %ebx17793; O2-NEXT:    .p2align 417794; O2-NEXT:  .LBB236_1: # %atomicrmw.start17795; O2-NEXT:    # =>This Inner Loop Header: Depth=117796; O2-NEXT:  .Lpcsection586:17797; O2-NEXT:    xorl %ecx, %ecx17798; O2-NEXT:  .Lpcsection587:17799; O2-NEXT:    lock cmpxchg16b (%rdi)17800; O2-NEXT:  .Lpcsection588:17801; O2-NEXT:    jne .LBB236_117802; O2-NEXT:  # %bb.2: # %atomicrmw.end17803; O2-NEXT:    movq $1, foo(%rip)17804; O2-NEXT:    popq %rbx17805; O2-NEXT:    .cfi_def_cfa_offset 817806; O2-NEXT:    retq17807;17808; O3-LABEL: atomic128_xchg_seq_cst:17809; O3:       # %bb.0: # %entry17810; O3-NEXT:    pushq %rbx17811; O3-NEXT:    .cfi_def_cfa_offset 1617812; O3-NEXT:    .cfi_offset %rbx, -1617813; O3-NEXT:    movq foo(%rip), %rax17814; O3-NEXT:  .Lpcsection583:17815; O3-NEXT:    movq (%rdi), %rax17816; O3-NEXT:  .Lpcsection584:17817; O3-NEXT:    movq 8(%rdi), %rdx17818; O3-NEXT:  .Lpcsection585:17819; O3-NEXT:    movl $42, %ebx17820; O3-NEXT:    .p2align 417821; O3-NEXT:  .LBB236_1: # %atomicrmw.start17822; O3-NEXT:    # =>This Inner Loop Header: Depth=117823; O3-NEXT:  .Lpcsection586:17824; O3-NEXT:    xorl %ecx, %ecx17825; O3-NEXT:  .Lpcsection587:17826; O3-NEXT:    lock cmpxchg16b (%rdi)17827; O3-NEXT:  .Lpcsection588:17828; O3-NEXT:    jne .LBB236_117829; O3-NEXT:  # %bb.2: # %atomicrmw.end17830; O3-NEXT:    movq $1, foo(%rip)17831; O3-NEXT:    popq %rbx17832; O3-NEXT:    .cfi_def_cfa_offset 817833; O3-NEXT:    retq17834;17835; HASWELL-O3-LABEL: atomic128_xchg_seq_cst:17836; HASWELL-O3:       # %bb.0: # %entry17837; HASWELL-O3-NEXT:    pushq %rbx17838; HASWELL-O3-NEXT:    .cfi_def_cfa_offset 1617839; HASWELL-O3-NEXT:    .cfi_offset %rbx, -1617840; HASWELL-O3-NEXT:    movq foo(%rip), %rax17841; HASWELL-O3-NEXT:  .Lpcsection560:17842; HASWELL-O3-NEXT:    movq (%rdi), %rax17843; HASWELL-O3-NEXT:  .Lpcsection561:17844; HASWELL-O3-NEXT:    movq 8(%rdi), %rdx17845; HASWELL-O3-NEXT:  .Lpcsection562:17846; HASWELL-O3-NEXT:    movl $42, %ebx17847; HASWELL-O3-NEXT:    .p2align 417848; HASWELL-O3-NEXT:  .LBB236_1: # %atomicrmw.start17849; HASWELL-O3-NEXT:    # =>This Inner Loop Header: Depth=117850; HASWELL-O3-NEXT:  .Lpcsection563:17851; HASWELL-O3-NEXT:    xorl %ecx, %ecx17852; HASWELL-O3-NEXT:  .Lpcsection564:17853; HASWELL-O3-NEXT:    lock cmpxchg16b (%rdi)17854; HASWELL-O3-NEXT:  .Lpcsection565:17855; HASWELL-O3-NEXT:    jne .LBB236_117856; HASWELL-O3-NEXT:  # %bb.2: # %atomicrmw.end17857; HASWELL-O3-NEXT:    movq $1, foo(%rip)17858; HASWELL-O3-NEXT:    popq %rbx17859; HASWELL-O3-NEXT:    .cfi_def_cfa_offset 817860; HASWELL-O3-NEXT:    retq17861entry:17862  load volatile i64, ptr @foo, align 817863  %x = atomicrmw xchg ptr %a, i128 42 seq_cst, align 16, !pcsections !017864  store volatile i64 1, ptr @foo, align 817865  ret void17866}17867 17868define void @atomic128_add_seq_cst(ptr %a) {17869; O0-LABEL: atomic128_add_seq_cst:17870; O0:       # %bb.0: # %entry17871; O0-NEXT:    pushq %rbx17872; O0-NEXT:    .cfi_def_cfa_offset 1617873; O0-NEXT:    .cfi_offset %rbx, -1617874; O0-NEXT:    movq %rdi, {{[-0-9]+}}(%r{{[sb]}}p) # 8-byte Spill17875; O0-NEXT:    movq foo(%rip), %rax17876; O0-NEXT:  .Lpcsection668:17877; O0-NEXT:    movq (%rdi), %rax17878; O0-NEXT:  .Lpcsection669:17879; O0-NEXT:    movq 8(%rdi), %rdx17880; O0-NEXT:    movq %rax, {{[-0-9]+}}(%r{{[sb]}}p) # 8-byte Spill17881; O0-NEXT:    movq %rdx, {{[-0-9]+}}(%r{{[sb]}}p) # 8-byte Spill17882; O0-NEXT:  .Lpcsection670:17883; O0-NEXT:    jmp .LBB237_117884; O0-NEXT:  .LBB237_1: # %atomicrmw.start17885; O0-NEXT:    # =>This Inner Loop Header: Depth=117886; O0-NEXT:    movq {{[-0-9]+}}(%r{{[sb]}}p), %rdx # 8-byte Reload17887; O0-NEXT:    movq {{[-0-9]+}}(%r{{[sb]}}p), %rax # 8-byte Reload17888; O0-NEXT:    movq {{[-0-9]+}}(%r{{[sb]}}p), %rsi # 8-byte Reload17889; O0-NEXT:    movq %rax, %rbx17890; O0-NEXT:  .Lpcsection671:17891; O0-NEXT:    addq $42, %rbx17892; O0-NEXT:    movq %rdx, %rcx17893; O0-NEXT:  .Lpcsection672:17894; O0-NEXT:    adcq $0, %rcx17895; O0-NEXT:  .Lpcsection673:17896; O0-NEXT:    lock cmpxchg16b (%rsi)17897; O0-NEXT:    movq %rax, {{[-0-9]+}}(%r{{[sb]}}p) # 8-byte Spill17898; O0-NEXT:    movq %rdx, {{[-0-9]+}}(%r{{[sb]}}p) # 8-byte Spill17899; O0-NEXT:  .Lpcsection674:17900; O0-NEXT:    jne .LBB237_117901; O0-NEXT:    jmp .LBB237_217902; O0-NEXT:  .LBB237_2: # %atomicrmw.end17903; O0-NEXT:    movq $1, foo17904; O0-NEXT:    popq %rbx17905; O0-NEXT:    .cfi_def_cfa_offset 817906; O0-NEXT:    retq17907;17908; O1-LABEL: atomic128_add_seq_cst:17909; O1:       # %bb.0: # %entry17910; O1-NEXT:    pushq %rbx17911; O1-NEXT:    .cfi_def_cfa_offset 1617912; O1-NEXT:    .cfi_offset %rbx, -1617913; O1-NEXT:    movq foo(%rip), %rax17914; O1-NEXT:  .Lpcsection589:17915; O1-NEXT:    movq (%rdi), %rax17916; O1-NEXT:  .Lpcsection590:17917; O1-NEXT:    movq 8(%rdi), %rdx17918; O1-NEXT:    .p2align 417919; O1-NEXT:  .LBB237_1: # %atomicrmw.start17920; O1-NEXT:    # =>This Inner Loop Header: Depth=117921; O1-NEXT:    movq %rax, %rbx17922; O1-NEXT:  .Lpcsection591:17923; O1-NEXT:    addq $42, %rbx17924; O1-NEXT:    movq %rdx, %rcx17925; O1-NEXT:  .Lpcsection592:17926; O1-NEXT:    adcq $0, %rcx17927; O1-NEXT:  .Lpcsection593:17928; O1-NEXT:    lock cmpxchg16b (%rdi)17929; O1-NEXT:  .Lpcsection594:17930; O1-NEXT:    jne .LBB237_117931; O1-NEXT:  # %bb.2: # %atomicrmw.end17932; O1-NEXT:    movq $1, foo(%rip)17933; O1-NEXT:    popq %rbx17934; O1-NEXT:    .cfi_def_cfa_offset 817935; O1-NEXT:    retq17936;17937; O2-LABEL: atomic128_add_seq_cst:17938; O2:       # %bb.0: # %entry17939; O2-NEXT:    pushq %rbx17940; O2-NEXT:    .cfi_def_cfa_offset 1617941; O2-NEXT:    .cfi_offset %rbx, -1617942; O2-NEXT:    movq foo(%rip), %rax17943; O2-NEXT:  .Lpcsection589:17944; O2-NEXT:    movq (%rdi), %rax17945; O2-NEXT:  .Lpcsection590:17946; O2-NEXT:    movq 8(%rdi), %rdx17947; O2-NEXT:    .p2align 417948; O2-NEXT:  .LBB237_1: # %atomicrmw.start17949; O2-NEXT:    # =>This Inner Loop Header: Depth=117950; O2-NEXT:    movq %rax, %rbx17951; O2-NEXT:  .Lpcsection591:17952; O2-NEXT:    addq $42, %rbx17953; O2-NEXT:    movq %rdx, %rcx17954; O2-NEXT:  .Lpcsection592:17955; O2-NEXT:    adcq $0, %rcx17956; O2-NEXT:  .Lpcsection593:17957; O2-NEXT:    lock cmpxchg16b (%rdi)17958; O2-NEXT:  .Lpcsection594:17959; O2-NEXT:    jne .LBB237_117960; O2-NEXT:  # %bb.2: # %atomicrmw.end17961; O2-NEXT:    movq $1, foo(%rip)17962; O2-NEXT:    popq %rbx17963; O2-NEXT:    .cfi_def_cfa_offset 817964; O2-NEXT:    retq17965;17966; O3-LABEL: atomic128_add_seq_cst:17967; O3:       # %bb.0: # %entry17968; O3-NEXT:    pushq %rbx17969; O3-NEXT:    .cfi_def_cfa_offset 1617970; O3-NEXT:    .cfi_offset %rbx, -1617971; O3-NEXT:    movq foo(%rip), %rax17972; O3-NEXT:  .Lpcsection589:17973; O3-NEXT:    movq (%rdi), %rax17974; O3-NEXT:  .Lpcsection590:17975; O3-NEXT:    movq 8(%rdi), %rdx17976; O3-NEXT:    .p2align 417977; O3-NEXT:  .LBB237_1: # %atomicrmw.start17978; O3-NEXT:    # =>This Inner Loop Header: Depth=117979; O3-NEXT:    movq %rax, %rbx17980; O3-NEXT:  .Lpcsection591:17981; O3-NEXT:    addq $42, %rbx17982; O3-NEXT:    movq %rdx, %rcx17983; O3-NEXT:  .Lpcsection592:17984; O3-NEXT:    adcq $0, %rcx17985; O3-NEXT:  .Lpcsection593:17986; O3-NEXT:    lock cmpxchg16b (%rdi)17987; O3-NEXT:  .Lpcsection594:17988; O3-NEXT:    jne .LBB237_117989; O3-NEXT:  # %bb.2: # %atomicrmw.end17990; O3-NEXT:    movq $1, foo(%rip)17991; O3-NEXT:    popq %rbx17992; O3-NEXT:    .cfi_def_cfa_offset 817993; O3-NEXT:    retq17994;17995; HASWELL-O3-LABEL: atomic128_add_seq_cst:17996; HASWELL-O3:       # %bb.0: # %entry17997; HASWELL-O3-NEXT:    pushq %rbx17998; HASWELL-O3-NEXT:    .cfi_def_cfa_offset 1617999; HASWELL-O3-NEXT:    .cfi_offset %rbx, -1618000; HASWELL-O3-NEXT:    movq foo(%rip), %rax18001; HASWELL-O3-NEXT:  .Lpcsection566:18002; HASWELL-O3-NEXT:    movq (%rdi), %rax18003; HASWELL-O3-NEXT:  .Lpcsection567:18004; HASWELL-O3-NEXT:    movq 8(%rdi), %rdx18005; HASWELL-O3-NEXT:    .p2align 418006; HASWELL-O3-NEXT:  .LBB237_1: # %atomicrmw.start18007; HASWELL-O3-NEXT:    # =>This Inner Loop Header: Depth=118008; HASWELL-O3-NEXT:    movq %rax, %rbx18009; HASWELL-O3-NEXT:  .Lpcsection568:18010; HASWELL-O3-NEXT:    addq $42, %rbx18011; HASWELL-O3-NEXT:    movq %rdx, %rcx18012; HASWELL-O3-NEXT:  .Lpcsection569:18013; HASWELL-O3-NEXT:    adcq $0, %rcx18014; HASWELL-O3-NEXT:  .Lpcsection570:18015; HASWELL-O3-NEXT:    lock cmpxchg16b (%rdi)18016; HASWELL-O3-NEXT:  .Lpcsection571:18017; HASWELL-O3-NEXT:    jne .LBB237_118018; HASWELL-O3-NEXT:  # %bb.2: # %atomicrmw.end18019; HASWELL-O3-NEXT:    movq $1, foo(%rip)18020; HASWELL-O3-NEXT:    popq %rbx18021; HASWELL-O3-NEXT:    .cfi_def_cfa_offset 818022; HASWELL-O3-NEXT:    retq18023entry:18024  load volatile i64, ptr @foo, align 818025  %x = atomicrmw add ptr %a, i128 42 seq_cst, align 16, !pcsections !018026  store volatile i64 1, ptr @foo, align 818027  ret void18028}18029 18030define void @atomic128_sub_seq_cst(ptr %a) {18031; O0-LABEL: atomic128_sub_seq_cst:18032; O0:       # %bb.0: # %entry18033; O0-NEXT:    pushq %rbx18034; O0-NEXT:    .cfi_def_cfa_offset 1618035; O0-NEXT:    .cfi_offset %rbx, -1618036; O0-NEXT:    movq %rdi, {{[-0-9]+}}(%r{{[sb]}}p) # 8-byte Spill18037; O0-NEXT:    movq foo(%rip), %rax18038; O0-NEXT:  .Lpcsection675:18039; O0-NEXT:    movq (%rdi), %rax18040; O0-NEXT:  .Lpcsection676:18041; O0-NEXT:    movq 8(%rdi), %rdx18042; O0-NEXT:    movq %rax, {{[-0-9]+}}(%r{{[sb]}}p) # 8-byte Spill18043; O0-NEXT:    movq %rdx, {{[-0-9]+}}(%r{{[sb]}}p) # 8-byte Spill18044; O0-NEXT:  .Lpcsection677:18045; O0-NEXT:    jmp .LBB238_118046; O0-NEXT:  .LBB238_1: # %atomicrmw.start18047; O0-NEXT:    # =>This Inner Loop Header: Depth=118048; O0-NEXT:    movq {{[-0-9]+}}(%r{{[sb]}}p), %rdx # 8-byte Reload18049; O0-NEXT:    movq {{[-0-9]+}}(%r{{[sb]}}p), %rax # 8-byte Reload18050; O0-NEXT:    movq {{[-0-9]+}}(%r{{[sb]}}p), %rsi # 8-byte Reload18051; O0-NEXT:    movq %rax, %rbx18052; O0-NEXT:  .Lpcsection678:18053; O0-NEXT:    addq $-42, %rbx18054; O0-NEXT:    movq %rdx, %rcx18055; O0-NEXT:  .Lpcsection679:18056; O0-NEXT:    adcq $-1, %rcx18057; O0-NEXT:  .Lpcsection680:18058; O0-NEXT:    lock cmpxchg16b (%rsi)18059; O0-NEXT:    movq %rax, {{[-0-9]+}}(%r{{[sb]}}p) # 8-byte Spill18060; O0-NEXT:    movq %rdx, {{[-0-9]+}}(%r{{[sb]}}p) # 8-byte Spill18061; O0-NEXT:  .Lpcsection681:18062; O0-NEXT:    jne .LBB238_118063; O0-NEXT:    jmp .LBB238_218064; O0-NEXT:  .LBB238_2: # %atomicrmw.end18065; O0-NEXT:    movq $1, foo18066; O0-NEXT:    popq %rbx18067; O0-NEXT:    .cfi_def_cfa_offset 818068; O0-NEXT:    retq18069;18070; O1-LABEL: atomic128_sub_seq_cst:18071; O1:       # %bb.0: # %entry18072; O1-NEXT:    pushq %rbx18073; O1-NEXT:    .cfi_def_cfa_offset 1618074; O1-NEXT:    .cfi_offset %rbx, -1618075; O1-NEXT:    movq foo(%rip), %rax18076; O1-NEXT:  .Lpcsection595:18077; O1-NEXT:    movq (%rdi), %rax18078; O1-NEXT:  .Lpcsection596:18079; O1-NEXT:    movq 8(%rdi), %rdx18080; O1-NEXT:    .p2align 418081; O1-NEXT:  .LBB238_1: # %atomicrmw.start18082; O1-NEXT:    # =>This Inner Loop Header: Depth=118083; O1-NEXT:    movq %rax, %rbx18084; O1-NEXT:  .Lpcsection597:18085; O1-NEXT:    addq $-42, %rbx18086; O1-NEXT:    movq %rdx, %rcx18087; O1-NEXT:  .Lpcsection598:18088; O1-NEXT:    adcq $-1, %rcx18089; O1-NEXT:  .Lpcsection599:18090; O1-NEXT:    lock cmpxchg16b (%rdi)18091; O1-NEXT:  .Lpcsection600:18092; O1-NEXT:    jne .LBB238_118093; O1-NEXT:  # %bb.2: # %atomicrmw.end18094; O1-NEXT:    movq $1, foo(%rip)18095; O1-NEXT:    popq %rbx18096; O1-NEXT:    .cfi_def_cfa_offset 818097; O1-NEXT:    retq18098;18099; O2-LABEL: atomic128_sub_seq_cst:18100; O2:       # %bb.0: # %entry18101; O2-NEXT:    pushq %rbx18102; O2-NEXT:    .cfi_def_cfa_offset 1618103; O2-NEXT:    .cfi_offset %rbx, -1618104; O2-NEXT:    movq foo(%rip), %rax18105; O2-NEXT:  .Lpcsection595:18106; O2-NEXT:    movq (%rdi), %rax18107; O2-NEXT:  .Lpcsection596:18108; O2-NEXT:    movq 8(%rdi), %rdx18109; O2-NEXT:    .p2align 418110; O2-NEXT:  .LBB238_1: # %atomicrmw.start18111; O2-NEXT:    # =>This Inner Loop Header: Depth=118112; O2-NEXT:    movq %rax, %rbx18113; O2-NEXT:  .Lpcsection597:18114; O2-NEXT:    addq $-42, %rbx18115; O2-NEXT:    movq %rdx, %rcx18116; O2-NEXT:  .Lpcsection598:18117; O2-NEXT:    adcq $-1, %rcx18118; O2-NEXT:  .Lpcsection599:18119; O2-NEXT:    lock cmpxchg16b (%rdi)18120; O2-NEXT:  .Lpcsection600:18121; O2-NEXT:    jne .LBB238_118122; O2-NEXT:  # %bb.2: # %atomicrmw.end18123; O2-NEXT:    movq $1, foo(%rip)18124; O2-NEXT:    popq %rbx18125; O2-NEXT:    .cfi_def_cfa_offset 818126; O2-NEXT:    retq18127;18128; O3-LABEL: atomic128_sub_seq_cst:18129; O3:       # %bb.0: # %entry18130; O3-NEXT:    pushq %rbx18131; O3-NEXT:    .cfi_def_cfa_offset 1618132; O3-NEXT:    .cfi_offset %rbx, -1618133; O3-NEXT:    movq foo(%rip), %rax18134; O3-NEXT:  .Lpcsection595:18135; O3-NEXT:    movq (%rdi), %rax18136; O3-NEXT:  .Lpcsection596:18137; O3-NEXT:    movq 8(%rdi), %rdx18138; O3-NEXT:    .p2align 418139; O3-NEXT:  .LBB238_1: # %atomicrmw.start18140; O3-NEXT:    # =>This Inner Loop Header: Depth=118141; O3-NEXT:    movq %rax, %rbx18142; O3-NEXT:  .Lpcsection597:18143; O3-NEXT:    addq $-42, %rbx18144; O3-NEXT:    movq %rdx, %rcx18145; O3-NEXT:  .Lpcsection598:18146; O3-NEXT:    adcq $-1, %rcx18147; O3-NEXT:  .Lpcsection599:18148; O3-NEXT:    lock cmpxchg16b (%rdi)18149; O3-NEXT:  .Lpcsection600:18150; O3-NEXT:    jne .LBB238_118151; O3-NEXT:  # %bb.2: # %atomicrmw.end18152; O3-NEXT:    movq $1, foo(%rip)18153; O3-NEXT:    popq %rbx18154; O3-NEXT:    .cfi_def_cfa_offset 818155; O3-NEXT:    retq18156;18157; HASWELL-O3-LABEL: atomic128_sub_seq_cst:18158; HASWELL-O3:       # %bb.0: # %entry18159; HASWELL-O3-NEXT:    pushq %rbx18160; HASWELL-O3-NEXT:    .cfi_def_cfa_offset 1618161; HASWELL-O3-NEXT:    .cfi_offset %rbx, -1618162; HASWELL-O3-NEXT:    movq foo(%rip), %rax18163; HASWELL-O3-NEXT:  .Lpcsection572:18164; HASWELL-O3-NEXT:    movq (%rdi), %rax18165; HASWELL-O3-NEXT:  .Lpcsection573:18166; HASWELL-O3-NEXT:    movq 8(%rdi), %rdx18167; HASWELL-O3-NEXT:    .p2align 418168; HASWELL-O3-NEXT:  .LBB238_1: # %atomicrmw.start18169; HASWELL-O3-NEXT:    # =>This Inner Loop Header: Depth=118170; HASWELL-O3-NEXT:    movq %rax, %rbx18171; HASWELL-O3-NEXT:  .Lpcsection574:18172; HASWELL-O3-NEXT:    addq $-42, %rbx18173; HASWELL-O3-NEXT:    movq %rdx, %rcx18174; HASWELL-O3-NEXT:  .Lpcsection575:18175; HASWELL-O3-NEXT:    adcq $-1, %rcx18176; HASWELL-O3-NEXT:  .Lpcsection576:18177; HASWELL-O3-NEXT:    lock cmpxchg16b (%rdi)18178; HASWELL-O3-NEXT:  .Lpcsection577:18179; HASWELL-O3-NEXT:    jne .LBB238_118180; HASWELL-O3-NEXT:  # %bb.2: # %atomicrmw.end18181; HASWELL-O3-NEXT:    movq $1, foo(%rip)18182; HASWELL-O3-NEXT:    popq %rbx18183; HASWELL-O3-NEXT:    .cfi_def_cfa_offset 818184; HASWELL-O3-NEXT:    retq18185entry:18186  load volatile i64, ptr @foo, align 818187  %x = atomicrmw sub ptr %a, i128 42 seq_cst, align 16, !pcsections !018188  store volatile i64 1, ptr @foo, align 818189  ret void18190}18191 18192define void @atomic128_and_seq_cst(ptr %a) {18193; O0-LABEL: atomic128_and_seq_cst:18194; O0:       # %bb.0: # %entry18195; O0-NEXT:    pushq %rbx18196; O0-NEXT:    .cfi_def_cfa_offset 1618197; O0-NEXT:    .cfi_offset %rbx, -1618198; O0-NEXT:    movq %rdi, {{[-0-9]+}}(%r{{[sb]}}p) # 8-byte Spill18199; O0-NEXT:    movq foo(%rip), %rax18200; O0-NEXT:  .Lpcsection682:18201; O0-NEXT:    movq (%rdi), %rax18202; O0-NEXT:  .Lpcsection683:18203; O0-NEXT:    movq 8(%rdi), %rdx18204; O0-NEXT:    movq %rax, {{[-0-9]+}}(%r{{[sb]}}p) # 8-byte Spill18205; O0-NEXT:    movq %rdx, {{[-0-9]+}}(%r{{[sb]}}p) # 8-byte Spill18206; O0-NEXT:  .Lpcsection684:18207; O0-NEXT:    jmp .LBB239_118208; O0-NEXT:  .LBB239_1: # %atomicrmw.start18209; O0-NEXT:    # =>This Inner Loop Header: Depth=118210; O0-NEXT:    movq {{[-0-9]+}}(%r{{[sb]}}p), %rdx # 8-byte Reload18211; O0-NEXT:    movq {{[-0-9]+}}(%r{{[sb]}}p), %rax # 8-byte Reload18212; O0-NEXT:    movq {{[-0-9]+}}(%r{{[sb]}}p), %rsi # 8-byte Reload18213; O0-NEXT:    movl %eax, %ecx18214; O0-NEXT:  .Lpcsection685:18215; O0-NEXT:    andl $42, %ecx18216; O0-NEXT:    movl %ecx, %ebx18217; O0-NEXT:  .Lpcsection686:18218; O0-NEXT:    xorl %ecx, %ecx18219; O0-NEXT:  .Lpcsection687:18220; O0-NEXT:    # kill: def $rcx killed $ecx18221; O0-NEXT:  .Lpcsection688:18222; O0-NEXT:    lock cmpxchg16b (%rsi)18223; O0-NEXT:    movq %rax, {{[-0-9]+}}(%r{{[sb]}}p) # 8-byte Spill18224; O0-NEXT:    movq %rdx, {{[-0-9]+}}(%r{{[sb]}}p) # 8-byte Spill18225; O0-NEXT:  .Lpcsection689:18226; O0-NEXT:    jne .LBB239_118227; O0-NEXT:    jmp .LBB239_218228; O0-NEXT:  .LBB239_2: # %atomicrmw.end18229; O0-NEXT:    movq $1, foo18230; O0-NEXT:    popq %rbx18231; O0-NEXT:    .cfi_def_cfa_offset 818232; O0-NEXT:    retq18233;18234; O1-LABEL: atomic128_and_seq_cst:18235; O1:       # %bb.0: # %entry18236; O1-NEXT:    pushq %rbx18237; O1-NEXT:    .cfi_def_cfa_offset 1618238; O1-NEXT:    .cfi_offset %rbx, -1618239; O1-NEXT:    movq foo(%rip), %rax18240; O1-NEXT:  .Lpcsection601:18241; O1-NEXT:    movq (%rdi), %rax18242; O1-NEXT:  .Lpcsection602:18243; O1-NEXT:    movq 8(%rdi), %rdx18244; O1-NEXT:    .p2align 418245; O1-NEXT:  .LBB239_1: # %atomicrmw.start18246; O1-NEXT:    # =>This Inner Loop Header: Depth=118247; O1-NEXT:    movl %eax, %ebx18248; O1-NEXT:  .Lpcsection603:18249; O1-NEXT:    andl $42, %ebx18250; O1-NEXT:  .Lpcsection604:18251; O1-NEXT:    xorl %ecx, %ecx18252; O1-NEXT:  .Lpcsection605:18253; O1-NEXT:    lock cmpxchg16b (%rdi)18254; O1-NEXT:  .Lpcsection606:18255; O1-NEXT:    jne .LBB239_118256; O1-NEXT:  # %bb.2: # %atomicrmw.end18257; O1-NEXT:    movq $1, foo(%rip)18258; O1-NEXT:    popq %rbx18259; O1-NEXT:    .cfi_def_cfa_offset 818260; O1-NEXT:    retq18261;18262; O2-LABEL: atomic128_and_seq_cst:18263; O2:       # %bb.0: # %entry18264; O2-NEXT:    pushq %rbx18265; O2-NEXT:    .cfi_def_cfa_offset 1618266; O2-NEXT:    .cfi_offset %rbx, -1618267; O2-NEXT:    movq foo(%rip), %rax18268; O2-NEXT:  .Lpcsection601:18269; O2-NEXT:    movq (%rdi), %rax18270; O2-NEXT:  .Lpcsection602:18271; O2-NEXT:    movq 8(%rdi), %rdx18272; O2-NEXT:    .p2align 418273; O2-NEXT:  .LBB239_1: # %atomicrmw.start18274; O2-NEXT:    # =>This Inner Loop Header: Depth=118275; O2-NEXT:    movl %eax, %ebx18276; O2-NEXT:  .Lpcsection603:18277; O2-NEXT:    andl $42, %ebx18278; O2-NEXT:  .Lpcsection604:18279; O2-NEXT:    xorl %ecx, %ecx18280; O2-NEXT:  .Lpcsection605:18281; O2-NEXT:    lock cmpxchg16b (%rdi)18282; O2-NEXT:  .Lpcsection606:18283; O2-NEXT:    jne .LBB239_118284; O2-NEXT:  # %bb.2: # %atomicrmw.end18285; O2-NEXT:    movq $1, foo(%rip)18286; O2-NEXT:    popq %rbx18287; O2-NEXT:    .cfi_def_cfa_offset 818288; O2-NEXT:    retq18289;18290; O3-LABEL: atomic128_and_seq_cst:18291; O3:       # %bb.0: # %entry18292; O3-NEXT:    pushq %rbx18293; O3-NEXT:    .cfi_def_cfa_offset 1618294; O3-NEXT:    .cfi_offset %rbx, -1618295; O3-NEXT:    movq foo(%rip), %rax18296; O3-NEXT:  .Lpcsection601:18297; O3-NEXT:    movq (%rdi), %rax18298; O3-NEXT:  .Lpcsection602:18299; O3-NEXT:    movq 8(%rdi), %rdx18300; O3-NEXT:    .p2align 418301; O3-NEXT:  .LBB239_1: # %atomicrmw.start18302; O3-NEXT:    # =>This Inner Loop Header: Depth=118303; O3-NEXT:    movl %eax, %ebx18304; O3-NEXT:  .Lpcsection603:18305; O3-NEXT:    andl $42, %ebx18306; O3-NEXT:  .Lpcsection604:18307; O3-NEXT:    xorl %ecx, %ecx18308; O3-NEXT:  .Lpcsection605:18309; O3-NEXT:    lock cmpxchg16b (%rdi)18310; O3-NEXT:  .Lpcsection606:18311; O3-NEXT:    jne .LBB239_118312; O3-NEXT:  # %bb.2: # %atomicrmw.end18313; O3-NEXT:    movq $1, foo(%rip)18314; O3-NEXT:    popq %rbx18315; O3-NEXT:    .cfi_def_cfa_offset 818316; O3-NEXT:    retq18317;18318; HASWELL-O3-LABEL: atomic128_and_seq_cst:18319; HASWELL-O3:       # %bb.0: # %entry18320; HASWELL-O3-NEXT:    pushq %rbx18321; HASWELL-O3-NEXT:    .cfi_def_cfa_offset 1618322; HASWELL-O3-NEXT:    .cfi_offset %rbx, -1618323; HASWELL-O3-NEXT:    movq foo(%rip), %rax18324; HASWELL-O3-NEXT:  .Lpcsection578:18325; HASWELL-O3-NEXT:    movq (%rdi), %rax18326; HASWELL-O3-NEXT:  .Lpcsection579:18327; HASWELL-O3-NEXT:    movq 8(%rdi), %rdx18328; HASWELL-O3-NEXT:    .p2align 418329; HASWELL-O3-NEXT:  .LBB239_1: # %atomicrmw.start18330; HASWELL-O3-NEXT:    # =>This Inner Loop Header: Depth=118331; HASWELL-O3-NEXT:    movl %eax, %ebx18332; HASWELL-O3-NEXT:  .Lpcsection580:18333; HASWELL-O3-NEXT:    andl $42, %ebx18334; HASWELL-O3-NEXT:  .Lpcsection581:18335; HASWELL-O3-NEXT:    xorl %ecx, %ecx18336; HASWELL-O3-NEXT:  .Lpcsection582:18337; HASWELL-O3-NEXT:    lock cmpxchg16b (%rdi)18338; HASWELL-O3-NEXT:  .Lpcsection583:18339; HASWELL-O3-NEXT:    jne .LBB239_118340; HASWELL-O3-NEXT:  # %bb.2: # %atomicrmw.end18341; HASWELL-O3-NEXT:    movq $1, foo(%rip)18342; HASWELL-O3-NEXT:    popq %rbx18343; HASWELL-O3-NEXT:    .cfi_def_cfa_offset 818344; HASWELL-O3-NEXT:    retq18345entry:18346  load volatile i64, ptr @foo, align 818347  %x = atomicrmw and ptr %a, i128 42 seq_cst, align 16, !pcsections !018348  store volatile i64 1, ptr @foo, align 818349  ret void18350}18351 18352define void @atomic128_or_seq_cst(ptr %a) {18353; O0-LABEL: atomic128_or_seq_cst:18354; O0:       # %bb.0: # %entry18355; O0-NEXT:    pushq %rbx18356; O0-NEXT:    .cfi_def_cfa_offset 1618357; O0-NEXT:    .cfi_offset %rbx, -1618358; O0-NEXT:    movq %rdi, {{[-0-9]+}}(%r{{[sb]}}p) # 8-byte Spill18359; O0-NEXT:    movq foo(%rip), %rax18360; O0-NEXT:  .Lpcsection690:18361; O0-NEXT:    movq (%rdi), %rax18362; O0-NEXT:  .Lpcsection691:18363; O0-NEXT:    movq 8(%rdi), %rdx18364; O0-NEXT:    movq %rax, {{[-0-9]+}}(%r{{[sb]}}p) # 8-byte Spill18365; O0-NEXT:    movq %rdx, {{[-0-9]+}}(%r{{[sb]}}p) # 8-byte Spill18366; O0-NEXT:  .Lpcsection692:18367; O0-NEXT:    jmp .LBB240_118368; O0-NEXT:  .LBB240_1: # %atomicrmw.start18369; O0-NEXT:    # =>This Inner Loop Header: Depth=118370; O0-NEXT:    movq {{[-0-9]+}}(%r{{[sb]}}p), %rcx # 8-byte Reload18371; O0-NEXT:    movq {{[-0-9]+}}(%r{{[sb]}}p), %rax # 8-byte Reload18372; O0-NEXT:    movq {{[-0-9]+}}(%r{{[sb]}}p), %rsi # 8-byte Reload18373; O0-NEXT:    movq %rax, %rbx18374; O0-NEXT:  .Lpcsection693:18375; O0-NEXT:    orq $42, %rbx18376; O0-NEXT:    movq %rcx, %rdx18377; O0-NEXT:  .Lpcsection694:18378; O0-NEXT:    lock cmpxchg16b (%rsi)18379; O0-NEXT:    movq %rax, {{[-0-9]+}}(%r{{[sb]}}p) # 8-byte Spill18380; O0-NEXT:    movq %rdx, {{[-0-9]+}}(%r{{[sb]}}p) # 8-byte Spill18381; O0-NEXT:  .Lpcsection695:18382; O0-NEXT:    jne .LBB240_118383; O0-NEXT:    jmp .LBB240_218384; O0-NEXT:  .LBB240_2: # %atomicrmw.end18385; O0-NEXT:    movq $1, foo18386; O0-NEXT:    popq %rbx18387; O0-NEXT:    .cfi_def_cfa_offset 818388; O0-NEXT:    retq18389;18390; O1-LABEL: atomic128_or_seq_cst:18391; O1:       # %bb.0: # %entry18392; O1-NEXT:    pushq %rbx18393; O1-NEXT:    .cfi_def_cfa_offset 1618394; O1-NEXT:    .cfi_offset %rbx, -1618395; O1-NEXT:    movq foo(%rip), %rax18396; O1-NEXT:  .Lpcsection607:18397; O1-NEXT:    movq (%rdi), %rax18398; O1-NEXT:  .Lpcsection608:18399; O1-NEXT:    movq 8(%rdi), %rdx18400; O1-NEXT:    .p2align 418401; O1-NEXT:  .LBB240_1: # %atomicrmw.start18402; O1-NEXT:    # =>This Inner Loop Header: Depth=118403; O1-NEXT:    movq %rax, %rbx18404; O1-NEXT:  .Lpcsection609:18405; O1-NEXT:    orq $42, %rbx18406; O1-NEXT:    movq %rdx, %rcx18407; O1-NEXT:  .Lpcsection610:18408; O1-NEXT:    lock cmpxchg16b (%rdi)18409; O1-NEXT:  .Lpcsection611:18410; O1-NEXT:    jne .LBB240_118411; O1-NEXT:  # %bb.2: # %atomicrmw.end18412; O1-NEXT:    movq $1, foo(%rip)18413; O1-NEXT:    popq %rbx18414; O1-NEXT:    .cfi_def_cfa_offset 818415; O1-NEXT:    retq18416;18417; O2-LABEL: atomic128_or_seq_cst:18418; O2:       # %bb.0: # %entry18419; O2-NEXT:    pushq %rbx18420; O2-NEXT:    .cfi_def_cfa_offset 1618421; O2-NEXT:    .cfi_offset %rbx, -1618422; O2-NEXT:    movq foo(%rip), %rax18423; O2-NEXT:  .Lpcsection607:18424; O2-NEXT:    movq (%rdi), %rax18425; O2-NEXT:  .Lpcsection608:18426; O2-NEXT:    movq 8(%rdi), %rdx18427; O2-NEXT:    .p2align 418428; O2-NEXT:  .LBB240_1: # %atomicrmw.start18429; O2-NEXT:    # =>This Inner Loop Header: Depth=118430; O2-NEXT:    movq %rax, %rbx18431; O2-NEXT:  .Lpcsection609:18432; O2-NEXT:    orq $42, %rbx18433; O2-NEXT:    movq %rdx, %rcx18434; O2-NEXT:  .Lpcsection610:18435; O2-NEXT:    lock cmpxchg16b (%rdi)18436; O2-NEXT:  .Lpcsection611:18437; O2-NEXT:    jne .LBB240_118438; O2-NEXT:  # %bb.2: # %atomicrmw.end18439; O2-NEXT:    movq $1, foo(%rip)18440; O2-NEXT:    popq %rbx18441; O2-NEXT:    .cfi_def_cfa_offset 818442; O2-NEXT:    retq18443;18444; O3-LABEL: atomic128_or_seq_cst:18445; O3:       # %bb.0: # %entry18446; O3-NEXT:    pushq %rbx18447; O3-NEXT:    .cfi_def_cfa_offset 1618448; O3-NEXT:    .cfi_offset %rbx, -1618449; O3-NEXT:    movq foo(%rip), %rax18450; O3-NEXT:  .Lpcsection607:18451; O3-NEXT:    movq (%rdi), %rax18452; O3-NEXT:  .Lpcsection608:18453; O3-NEXT:    movq 8(%rdi), %rdx18454; O3-NEXT:    .p2align 418455; O3-NEXT:  .LBB240_1: # %atomicrmw.start18456; O3-NEXT:    # =>This Inner Loop Header: Depth=118457; O3-NEXT:    movq %rax, %rbx18458; O3-NEXT:  .Lpcsection609:18459; O3-NEXT:    orq $42, %rbx18460; O3-NEXT:    movq %rdx, %rcx18461; O3-NEXT:  .Lpcsection610:18462; O3-NEXT:    lock cmpxchg16b (%rdi)18463; O3-NEXT:  .Lpcsection611:18464; O3-NEXT:    jne .LBB240_118465; O3-NEXT:  # %bb.2: # %atomicrmw.end18466; O3-NEXT:    movq $1, foo(%rip)18467; O3-NEXT:    popq %rbx18468; O3-NEXT:    .cfi_def_cfa_offset 818469; O3-NEXT:    retq18470;18471; HASWELL-O3-LABEL: atomic128_or_seq_cst:18472; HASWELL-O3:       # %bb.0: # %entry18473; HASWELL-O3-NEXT:    pushq %rbx18474; HASWELL-O3-NEXT:    .cfi_def_cfa_offset 1618475; HASWELL-O3-NEXT:    .cfi_offset %rbx, -1618476; HASWELL-O3-NEXT:    movq foo(%rip), %rax18477; HASWELL-O3-NEXT:  .Lpcsection584:18478; HASWELL-O3-NEXT:    movq (%rdi), %rax18479; HASWELL-O3-NEXT:  .Lpcsection585:18480; HASWELL-O3-NEXT:    movq 8(%rdi), %rdx18481; HASWELL-O3-NEXT:    .p2align 418482; HASWELL-O3-NEXT:  .LBB240_1: # %atomicrmw.start18483; HASWELL-O3-NEXT:    # =>This Inner Loop Header: Depth=118484; HASWELL-O3-NEXT:    movq %rax, %rbx18485; HASWELL-O3-NEXT:  .Lpcsection586:18486; HASWELL-O3-NEXT:    orq $42, %rbx18487; HASWELL-O3-NEXT:    movq %rdx, %rcx18488; HASWELL-O3-NEXT:  .Lpcsection587:18489; HASWELL-O3-NEXT:    lock cmpxchg16b (%rdi)18490; HASWELL-O3-NEXT:  .Lpcsection588:18491; HASWELL-O3-NEXT:    jne .LBB240_118492; HASWELL-O3-NEXT:  # %bb.2: # %atomicrmw.end18493; HASWELL-O3-NEXT:    movq $1, foo(%rip)18494; HASWELL-O3-NEXT:    popq %rbx18495; HASWELL-O3-NEXT:    .cfi_def_cfa_offset 818496; HASWELL-O3-NEXT:    retq18497entry:18498  load volatile i64, ptr @foo, align 818499  %x = atomicrmw or ptr %a, i128 42 seq_cst, align 16, !pcsections !018500  store volatile i64 1, ptr @foo, align 818501  ret void18502}18503 18504define void @atomic128_xor_seq_cst(ptr %a) {18505; O0-LABEL: atomic128_xor_seq_cst:18506; O0:       # %bb.0: # %entry18507; O0-NEXT:    pushq %rbx18508; O0-NEXT:    .cfi_def_cfa_offset 1618509; O0-NEXT:    .cfi_offset %rbx, -1618510; O0-NEXT:    movq %rdi, {{[-0-9]+}}(%r{{[sb]}}p) # 8-byte Spill18511; O0-NEXT:    movq foo(%rip), %rax18512; O0-NEXT:  .Lpcsection696:18513; O0-NEXT:    movq (%rdi), %rax18514; O0-NEXT:  .Lpcsection697:18515; O0-NEXT:    movq 8(%rdi), %rdx18516; O0-NEXT:    movq %rax, {{[-0-9]+}}(%r{{[sb]}}p) # 8-byte Spill18517; O0-NEXT:    movq %rdx, {{[-0-9]+}}(%r{{[sb]}}p) # 8-byte Spill18518; O0-NEXT:  .Lpcsection698:18519; O0-NEXT:    jmp .LBB241_118520; O0-NEXT:  .LBB241_1: # %atomicrmw.start18521; O0-NEXT:    # =>This Inner Loop Header: Depth=118522; O0-NEXT:    movq {{[-0-9]+}}(%r{{[sb]}}p), %rcx # 8-byte Reload18523; O0-NEXT:    movq {{[-0-9]+}}(%r{{[sb]}}p), %rax # 8-byte Reload18524; O0-NEXT:    movq {{[-0-9]+}}(%r{{[sb]}}p), %rsi # 8-byte Reload18525; O0-NEXT:    movq %rax, %rbx18526; O0-NEXT:  .Lpcsection699:18527; O0-NEXT:    xorq $42, %rbx18528; O0-NEXT:    movq %rcx, %rdx18529; O0-NEXT:  .Lpcsection700:18530; O0-NEXT:    lock cmpxchg16b (%rsi)18531; O0-NEXT:    movq %rax, {{[-0-9]+}}(%r{{[sb]}}p) # 8-byte Spill18532; O0-NEXT:    movq %rdx, {{[-0-9]+}}(%r{{[sb]}}p) # 8-byte Spill18533; O0-NEXT:  .Lpcsection701:18534; O0-NEXT:    jne .LBB241_118535; O0-NEXT:    jmp .LBB241_218536; O0-NEXT:  .LBB241_2: # %atomicrmw.end18537; O0-NEXT:    movq $1, foo18538; O0-NEXT:    popq %rbx18539; O0-NEXT:    .cfi_def_cfa_offset 818540; O0-NEXT:    retq18541;18542; O1-LABEL: atomic128_xor_seq_cst:18543; O1:       # %bb.0: # %entry18544; O1-NEXT:    pushq %rbx18545; O1-NEXT:    .cfi_def_cfa_offset 1618546; O1-NEXT:    .cfi_offset %rbx, -1618547; O1-NEXT:    movq foo(%rip), %rax18548; O1-NEXT:  .Lpcsection612:18549; O1-NEXT:    movq (%rdi), %rax18550; O1-NEXT:  .Lpcsection613:18551; O1-NEXT:    movq 8(%rdi), %rdx18552; O1-NEXT:    .p2align 418553; O1-NEXT:  .LBB241_1: # %atomicrmw.start18554; O1-NEXT:    # =>This Inner Loop Header: Depth=118555; O1-NEXT:    movq %rax, %rbx18556; O1-NEXT:  .Lpcsection614:18557; O1-NEXT:    xorq $42, %rbx18558; O1-NEXT:    movq %rdx, %rcx18559; O1-NEXT:  .Lpcsection615:18560; O1-NEXT:    lock cmpxchg16b (%rdi)18561; O1-NEXT:  .Lpcsection616:18562; O1-NEXT:    jne .LBB241_118563; O1-NEXT:  # %bb.2: # %atomicrmw.end18564; O1-NEXT:    movq $1, foo(%rip)18565; O1-NEXT:    popq %rbx18566; O1-NEXT:    .cfi_def_cfa_offset 818567; O1-NEXT:    retq18568;18569; O2-LABEL: atomic128_xor_seq_cst:18570; O2:       # %bb.0: # %entry18571; O2-NEXT:    pushq %rbx18572; O2-NEXT:    .cfi_def_cfa_offset 1618573; O2-NEXT:    .cfi_offset %rbx, -1618574; O2-NEXT:    movq foo(%rip), %rax18575; O2-NEXT:  .Lpcsection612:18576; O2-NEXT:    movq (%rdi), %rax18577; O2-NEXT:  .Lpcsection613:18578; O2-NEXT:    movq 8(%rdi), %rdx18579; O2-NEXT:    .p2align 418580; O2-NEXT:  .LBB241_1: # %atomicrmw.start18581; O2-NEXT:    # =>This Inner Loop Header: Depth=118582; O2-NEXT:    movq %rax, %rbx18583; O2-NEXT:  .Lpcsection614:18584; O2-NEXT:    xorq $42, %rbx18585; O2-NEXT:    movq %rdx, %rcx18586; O2-NEXT:  .Lpcsection615:18587; O2-NEXT:    lock cmpxchg16b (%rdi)18588; O2-NEXT:  .Lpcsection616:18589; O2-NEXT:    jne .LBB241_118590; O2-NEXT:  # %bb.2: # %atomicrmw.end18591; O2-NEXT:    movq $1, foo(%rip)18592; O2-NEXT:    popq %rbx18593; O2-NEXT:    .cfi_def_cfa_offset 818594; O2-NEXT:    retq18595;18596; O3-LABEL: atomic128_xor_seq_cst:18597; O3:       # %bb.0: # %entry18598; O3-NEXT:    pushq %rbx18599; O3-NEXT:    .cfi_def_cfa_offset 1618600; O3-NEXT:    .cfi_offset %rbx, -1618601; O3-NEXT:    movq foo(%rip), %rax18602; O3-NEXT:  .Lpcsection612:18603; O3-NEXT:    movq (%rdi), %rax18604; O3-NEXT:  .Lpcsection613:18605; O3-NEXT:    movq 8(%rdi), %rdx18606; O3-NEXT:    .p2align 418607; O3-NEXT:  .LBB241_1: # %atomicrmw.start18608; O3-NEXT:    # =>This Inner Loop Header: Depth=118609; O3-NEXT:    movq %rax, %rbx18610; O3-NEXT:  .Lpcsection614:18611; O3-NEXT:    xorq $42, %rbx18612; O3-NEXT:    movq %rdx, %rcx18613; O3-NEXT:  .Lpcsection615:18614; O3-NEXT:    lock cmpxchg16b (%rdi)18615; O3-NEXT:  .Lpcsection616:18616; O3-NEXT:    jne .LBB241_118617; O3-NEXT:  # %bb.2: # %atomicrmw.end18618; O3-NEXT:    movq $1, foo(%rip)18619; O3-NEXT:    popq %rbx18620; O3-NEXT:    .cfi_def_cfa_offset 818621; O3-NEXT:    retq18622;18623; HASWELL-O3-LABEL: atomic128_xor_seq_cst:18624; HASWELL-O3:       # %bb.0: # %entry18625; HASWELL-O3-NEXT:    pushq %rbx18626; HASWELL-O3-NEXT:    .cfi_def_cfa_offset 1618627; HASWELL-O3-NEXT:    .cfi_offset %rbx, -1618628; HASWELL-O3-NEXT:    movq foo(%rip), %rax18629; HASWELL-O3-NEXT:  .Lpcsection589:18630; HASWELL-O3-NEXT:    movq (%rdi), %rax18631; HASWELL-O3-NEXT:  .Lpcsection590:18632; HASWELL-O3-NEXT:    movq 8(%rdi), %rdx18633; HASWELL-O3-NEXT:    .p2align 418634; HASWELL-O3-NEXT:  .LBB241_1: # %atomicrmw.start18635; HASWELL-O3-NEXT:    # =>This Inner Loop Header: Depth=118636; HASWELL-O3-NEXT:    movq %rax, %rbx18637; HASWELL-O3-NEXT:  .Lpcsection591:18638; HASWELL-O3-NEXT:    xorq $42, %rbx18639; HASWELL-O3-NEXT:    movq %rdx, %rcx18640; HASWELL-O3-NEXT:  .Lpcsection592:18641; HASWELL-O3-NEXT:    lock cmpxchg16b (%rdi)18642; HASWELL-O3-NEXT:  .Lpcsection593:18643; HASWELL-O3-NEXT:    jne .LBB241_118644; HASWELL-O3-NEXT:  # %bb.2: # %atomicrmw.end18645; HASWELL-O3-NEXT:    movq $1, foo(%rip)18646; HASWELL-O3-NEXT:    popq %rbx18647; HASWELL-O3-NEXT:    .cfi_def_cfa_offset 818648; HASWELL-O3-NEXT:    retq18649entry:18650  load volatile i64, ptr @foo, align 818651  %x = atomicrmw xor ptr %a, i128 42 seq_cst, align 16, !pcsections !018652  store volatile i64 1, ptr @foo, align 818653  ret void18654}18655 18656define void @atomic128_nand_seq_cst(ptr %a) {18657; O0-LABEL: atomic128_nand_seq_cst:18658; O0:       # %bb.0: # %entry18659; O0-NEXT:    pushq %rbx18660; O0-NEXT:    .cfi_def_cfa_offset 1618661; O0-NEXT:    .cfi_offset %rbx, -1618662; O0-NEXT:    movq %rdi, {{[-0-9]+}}(%r{{[sb]}}p) # 8-byte Spill18663; O0-NEXT:    movq foo(%rip), %rax18664; O0-NEXT:  .Lpcsection702:18665; O0-NEXT:    movq (%rdi), %rax18666; O0-NEXT:  .Lpcsection703:18667; O0-NEXT:    movq 8(%rdi), %rdx18668; O0-NEXT:    movq %rax, {{[-0-9]+}}(%r{{[sb]}}p) # 8-byte Spill18669; O0-NEXT:    movq %rdx, {{[-0-9]+}}(%r{{[sb]}}p) # 8-byte Spill18670; O0-NEXT:  .Lpcsection704:18671; O0-NEXT:    jmp .LBB242_118672; O0-NEXT:  .LBB242_1: # %atomicrmw.start18673; O0-NEXT:    # =>This Inner Loop Header: Depth=118674; O0-NEXT:    movq {{[-0-9]+}}(%r{{[sb]}}p), %rdx # 8-byte Reload18675; O0-NEXT:    movq {{[-0-9]+}}(%r{{[sb]}}p), %rax # 8-byte Reload18676; O0-NEXT:    movq {{[-0-9]+}}(%r{{[sb]}}p), %rsi # 8-byte Reload18677; O0-NEXT:    movl %eax, %ecx18678; O0-NEXT:  .Lpcsection705:18679; O0-NEXT:    notl %ecx18680; O0-NEXT:  .Lpcsection706:18681; O0-NEXT:    # implicit-def: $rbx18682; O0-NEXT:    movl %ecx, %ebx18683; O0-NEXT:  .Lpcsection707:18684; O0-NEXT:    orq $-43, %rbx18685; O0-NEXT:  .Lpcsection708:18686; O0-NEXT:    movq $-1, %rcx18687; O0-NEXT:  .Lpcsection709:18688; O0-NEXT:    lock cmpxchg16b (%rsi)18689; O0-NEXT:    movq %rax, {{[-0-9]+}}(%r{{[sb]}}p) # 8-byte Spill18690; O0-NEXT:    movq %rdx, {{[-0-9]+}}(%r{{[sb]}}p) # 8-byte Spill18691; O0-NEXT:  .Lpcsection710:18692; O0-NEXT:    jne .LBB242_118693; O0-NEXT:    jmp .LBB242_218694; O0-NEXT:  .LBB242_2: # %atomicrmw.end18695; O0-NEXT:    movq $1, foo18696; O0-NEXT:    popq %rbx18697; O0-NEXT:    .cfi_def_cfa_offset 818698; O0-NEXT:    retq18699;18700; O1-LABEL: atomic128_nand_seq_cst:18701; O1:       # %bb.0: # %entry18702; O1-NEXT:    pushq %rbx18703; O1-NEXT:    .cfi_def_cfa_offset 1618704; O1-NEXT:    .cfi_offset %rbx, -1618705; O1-NEXT:    movq foo(%rip), %rax18706; O1-NEXT:  .Lpcsection617:18707; O1-NEXT:    movq (%rdi), %rax18708; O1-NEXT:  .Lpcsection618:18709; O1-NEXT:    movq 8(%rdi), %rdx18710; O1-NEXT:  .Lpcsection619:18711; O1-NEXT:    movq $-1, %rcx18712; O1-NEXT:    .p2align 418713; O1-NEXT:  .LBB242_1: # %atomicrmw.start18714; O1-NEXT:    # =>This Inner Loop Header: Depth=118715; O1-NEXT:    movl %eax, %ebx18716; O1-NEXT:  .Lpcsection620:18717; O1-NEXT:    notl %ebx18718; O1-NEXT:  .Lpcsection621:18719; O1-NEXT:    orq $-43, %rbx18720; O1-NEXT:  .Lpcsection622:18721; O1-NEXT:    lock cmpxchg16b (%rdi)18722; O1-NEXT:  .Lpcsection623:18723; O1-NEXT:    jne .LBB242_118724; O1-NEXT:  # %bb.2: # %atomicrmw.end18725; O1-NEXT:    movq $1, foo(%rip)18726; O1-NEXT:    popq %rbx18727; O1-NEXT:    .cfi_def_cfa_offset 818728; O1-NEXT:    retq18729;18730; O2-LABEL: atomic128_nand_seq_cst:18731; O2:       # %bb.0: # %entry18732; O2-NEXT:    pushq %rbx18733; O2-NEXT:    .cfi_def_cfa_offset 1618734; O2-NEXT:    .cfi_offset %rbx, -1618735; O2-NEXT:    movq foo(%rip), %rax18736; O2-NEXT:  .Lpcsection617:18737; O2-NEXT:    movq (%rdi), %rax18738; O2-NEXT:  .Lpcsection618:18739; O2-NEXT:    movq 8(%rdi), %rdx18740; O2-NEXT:  .Lpcsection619:18741; O2-NEXT:    movq $-1, %rcx18742; O2-NEXT:    .p2align 418743; O2-NEXT:  .LBB242_1: # %atomicrmw.start18744; O2-NEXT:    # =>This Inner Loop Header: Depth=118745; O2-NEXT:    movl %eax, %ebx18746; O2-NEXT:  .Lpcsection620:18747; O2-NEXT:    notl %ebx18748; O2-NEXT:  .Lpcsection621:18749; O2-NEXT:    orq $-43, %rbx18750; O2-NEXT:  .Lpcsection622:18751; O2-NEXT:    lock cmpxchg16b (%rdi)18752; O2-NEXT:  .Lpcsection623:18753; O2-NEXT:    jne .LBB242_118754; O2-NEXT:  # %bb.2: # %atomicrmw.end18755; O2-NEXT:    movq $1, foo(%rip)18756; O2-NEXT:    popq %rbx18757; O2-NEXT:    .cfi_def_cfa_offset 818758; O2-NEXT:    retq18759;18760; O3-LABEL: atomic128_nand_seq_cst:18761; O3:       # %bb.0: # %entry18762; O3-NEXT:    pushq %rbx18763; O3-NEXT:    .cfi_def_cfa_offset 1618764; O3-NEXT:    .cfi_offset %rbx, -1618765; O3-NEXT:    movq foo(%rip), %rax18766; O3-NEXT:  .Lpcsection617:18767; O3-NEXT:    movq (%rdi), %rax18768; O3-NEXT:  .Lpcsection618:18769; O3-NEXT:    movq 8(%rdi), %rdx18770; O3-NEXT:  .Lpcsection619:18771; O3-NEXT:    movq $-1, %rcx18772; O3-NEXT:    .p2align 418773; O3-NEXT:  .LBB242_1: # %atomicrmw.start18774; O3-NEXT:    # =>This Inner Loop Header: Depth=118775; O3-NEXT:    movl %eax, %ebx18776; O3-NEXT:  .Lpcsection620:18777; O3-NEXT:    notl %ebx18778; O3-NEXT:  .Lpcsection621:18779; O3-NEXT:    orq $-43, %rbx18780; O3-NEXT:  .Lpcsection622:18781; O3-NEXT:    lock cmpxchg16b (%rdi)18782; O3-NEXT:  .Lpcsection623:18783; O3-NEXT:    jne .LBB242_118784; O3-NEXT:  # %bb.2: # %atomicrmw.end18785; O3-NEXT:    movq $1, foo(%rip)18786; O3-NEXT:    popq %rbx18787; O3-NEXT:    .cfi_def_cfa_offset 818788; O3-NEXT:    retq18789;18790; HASWELL-O3-LABEL: atomic128_nand_seq_cst:18791; HASWELL-O3:       # %bb.0: # %entry18792; HASWELL-O3-NEXT:    pushq %rbx18793; HASWELL-O3-NEXT:    .cfi_def_cfa_offset 1618794; HASWELL-O3-NEXT:    .cfi_offset %rbx, -1618795; HASWELL-O3-NEXT:    movq foo(%rip), %rax18796; HASWELL-O3-NEXT:  .Lpcsection594:18797; HASWELL-O3-NEXT:    movq (%rdi), %rax18798; HASWELL-O3-NEXT:  .Lpcsection595:18799; HASWELL-O3-NEXT:    movq 8(%rdi), %rdx18800; HASWELL-O3-NEXT:  .Lpcsection596:18801; HASWELL-O3-NEXT:    movq $-1, %rcx18802; HASWELL-O3-NEXT:    .p2align 418803; HASWELL-O3-NEXT:  .LBB242_1: # %atomicrmw.start18804; HASWELL-O3-NEXT:    # =>This Inner Loop Header: Depth=118805; HASWELL-O3-NEXT:    movl %eax, %ebx18806; HASWELL-O3-NEXT:  .Lpcsection597:18807; HASWELL-O3-NEXT:    notl %ebx18808; HASWELL-O3-NEXT:  .Lpcsection598:18809; HASWELL-O3-NEXT:    orq $-43, %rbx18810; HASWELL-O3-NEXT:  .Lpcsection599:18811; HASWELL-O3-NEXT:    lock cmpxchg16b (%rdi)18812; HASWELL-O3-NEXT:  .Lpcsection600:18813; HASWELL-O3-NEXT:    jne .LBB242_118814; HASWELL-O3-NEXT:  # %bb.2: # %atomicrmw.end18815; HASWELL-O3-NEXT:    movq $1, foo(%rip)18816; HASWELL-O3-NEXT:    popq %rbx18817; HASWELL-O3-NEXT:    .cfi_def_cfa_offset 818818; HASWELL-O3-NEXT:    retq18819entry:18820  load volatile i64, ptr @foo, align 818821  %x = atomicrmw nand ptr %a, i128 42 seq_cst, align 16, !pcsections !018822  store volatile i64 1, ptr @foo, align 818823  ret void18824}18825 18826define void @atomic128_cas_monotonic(ptr %a) {18827; O0-LABEL: atomic128_cas_monotonic:18828; O0:       # %bb.0: # %entry18829; O0-NEXT:    pushq %rbx18830; O0-NEXT:    .cfi_def_cfa_offset 1618831; O0-NEXT:    .cfi_offset %rbx, -1618832; O0-NEXT:    movq foo(%rip), %rax18833; O0-NEXT:  .Lpcsection711:18834; O0-NEXT:    xorl %eax, %eax18835; O0-NEXT:    movl %eax, %ecx18836; O0-NEXT:    movq %rcx, {{[-0-9]+}}(%r{{[sb]}}p) # 8-byte Spill18837; O0-NEXT:  .Lpcsection712:18838; O0-NEXT:    movl $42, %eax18839; O0-NEXT:    movq %rax, {{[-0-9]+}}(%r{{[sb]}}p) # 8-byte Spill18840; O0-NEXT:  .Lpcsection713:18841; O0-NEXT:    movl $1, %ebx18842; O0-NEXT:    movq %rbx, {{[-0-9]+}}(%r{{[sb]}}p) # 8-byte Spill18843; O0-NEXT:    movq %rcx, %rdx18844; O0-NEXT:  .Lpcsection714:18845; O0-NEXT:    lock cmpxchg16b (%rdi)18846; O0-NEXT:    movq {{[-0-9]+}}(%r{{[sb]}}p), %rcx # 8-byte Reload18847; O0-NEXT:    movq {{[-0-9]+}}(%r{{[sb]}}p), %rbx # 8-byte Reload18848; O0-NEXT:  .Lpcsection715:18849; O0-NEXT:    # kill: def $rsi killed $rax18850; O0-NEXT:    movq {{[-0-9]+}}(%r{{[sb]}}p), %rax # 8-byte Reload18851; O0-NEXT:    movq %rcx, %rdx18852; O0-NEXT:  .Lpcsection716:18853; O0-NEXT:    lock cmpxchg16b (%rdi)18854; O0-NEXT:    movq {{[-0-9]+}}(%r{{[sb]}}p), %rcx # 8-byte Reload18855; O0-NEXT:    movq {{[-0-9]+}}(%r{{[sb]}}p), %rbx # 8-byte Reload18856; O0-NEXT:  .Lpcsection717:18857; O0-NEXT:    # kill: def $rsi killed $rax18858; O0-NEXT:    movq {{[-0-9]+}}(%r{{[sb]}}p), %rax # 8-byte Reload18859; O0-NEXT:    movq %rcx, %rdx18860; O0-NEXT:  .Lpcsection718:18861; O0-NEXT:    lock cmpxchg16b (%rdi)18862; O0-NEXT:    movq $1, foo18863; O0-NEXT:    popq %rbx18864; O0-NEXT:    .cfi_def_cfa_offset 818865; O0-NEXT:    retq18866;18867; O1-LABEL: atomic128_cas_monotonic:18868; O1:       # %bb.0: # %entry18869; O1-NEXT:    pushq %rbx18870; O1-NEXT:    .cfi_def_cfa_offset 1618871; O1-NEXT:    .cfi_offset %rbx, -1618872; O1-NEXT:    movq foo(%rip), %rax18873; O1-NEXT:  .Lpcsection624:18874; O1-NEXT:    movl $42, %eax18875; O1-NEXT:  .Lpcsection625:18876; O1-NEXT:    movl $1, %ebx18877; O1-NEXT:  .Lpcsection626:18878; O1-NEXT:    xorl %edx, %edx18879; O1-NEXT:  .Lpcsection627:18880; O1-NEXT:    xorl %ecx, %ecx18881; O1-NEXT:  .Lpcsection628:18882; O1-NEXT:    lock cmpxchg16b (%rdi)18883; O1-NEXT:  .Lpcsection629:18884; O1-NEXT:    movl $42, %eax18885; O1-NEXT:  .Lpcsection630:18886; O1-NEXT:    xorl %edx, %edx18887; O1-NEXT:  .Lpcsection631:18888; O1-NEXT:    xorl %ecx, %ecx18889; O1-NEXT:  .Lpcsection632:18890; O1-NEXT:    lock cmpxchg16b (%rdi)18891; O1-NEXT:  .Lpcsection633:18892; O1-NEXT:    movl $42, %eax18893; O1-NEXT:  .Lpcsection634:18894; O1-NEXT:    xorl %edx, %edx18895; O1-NEXT:  .Lpcsection635:18896; O1-NEXT:    xorl %ecx, %ecx18897; O1-NEXT:  .Lpcsection636:18898; O1-NEXT:    lock cmpxchg16b (%rdi)18899; O1-NEXT:    movq $1, foo(%rip)18900; O1-NEXT:    popq %rbx18901; O1-NEXT:    .cfi_def_cfa_offset 818902; O1-NEXT:    retq18903;18904; O2-LABEL: atomic128_cas_monotonic:18905; O2:       # %bb.0: # %entry18906; O2-NEXT:    pushq %rbx18907; O2-NEXT:    .cfi_def_cfa_offset 1618908; O2-NEXT:    .cfi_offset %rbx, -1618909; O2-NEXT:    movq foo(%rip), %rax18910; O2-NEXT:  .Lpcsection624:18911; O2-NEXT:    movl $42, %eax18912; O2-NEXT:  .Lpcsection625:18913; O2-NEXT:    movl $1, %ebx18914; O2-NEXT:  .Lpcsection626:18915; O2-NEXT:    xorl %edx, %edx18916; O2-NEXT:  .Lpcsection627:18917; O2-NEXT:    xorl %ecx, %ecx18918; O2-NEXT:  .Lpcsection628:18919; O2-NEXT:    lock cmpxchg16b (%rdi)18920; O2-NEXT:  .Lpcsection629:18921; O2-NEXT:    movl $42, %eax18922; O2-NEXT:  .Lpcsection630:18923; O2-NEXT:    xorl %edx, %edx18924; O2-NEXT:  .Lpcsection631:18925; O2-NEXT:    xorl %ecx, %ecx18926; O2-NEXT:  .Lpcsection632:18927; O2-NEXT:    lock cmpxchg16b (%rdi)18928; O2-NEXT:  .Lpcsection633:18929; O2-NEXT:    movl $42, %eax18930; O2-NEXT:  .Lpcsection634:18931; O2-NEXT:    xorl %edx, %edx18932; O2-NEXT:  .Lpcsection635:18933; O2-NEXT:    xorl %ecx, %ecx18934; O2-NEXT:  .Lpcsection636:18935; O2-NEXT:    lock cmpxchg16b (%rdi)18936; O2-NEXT:    movq $1, foo(%rip)18937; O2-NEXT:    popq %rbx18938; O2-NEXT:    .cfi_def_cfa_offset 818939; O2-NEXT:    retq18940;18941; O3-LABEL: atomic128_cas_monotonic:18942; O3:       # %bb.0: # %entry18943; O3-NEXT:    pushq %rbx18944; O3-NEXT:    .cfi_def_cfa_offset 1618945; O3-NEXT:    .cfi_offset %rbx, -1618946; O3-NEXT:    movq foo(%rip), %rax18947; O3-NEXT:  .Lpcsection624:18948; O3-NEXT:    movl $42, %eax18949; O3-NEXT:  .Lpcsection625:18950; O3-NEXT:    movl $1, %ebx18951; O3-NEXT:  .Lpcsection626:18952; O3-NEXT:    xorl %edx, %edx18953; O3-NEXT:  .Lpcsection627:18954; O3-NEXT:    xorl %ecx, %ecx18955; O3-NEXT:  .Lpcsection628:18956; O3-NEXT:    lock cmpxchg16b (%rdi)18957; O3-NEXT:  .Lpcsection629:18958; O3-NEXT:    movl $42, %eax18959; O3-NEXT:  .Lpcsection630:18960; O3-NEXT:    xorl %edx, %edx18961; O3-NEXT:  .Lpcsection631:18962; O3-NEXT:    xorl %ecx, %ecx18963; O3-NEXT:  .Lpcsection632:18964; O3-NEXT:    lock cmpxchg16b (%rdi)18965; O3-NEXT:  .Lpcsection633:18966; O3-NEXT:    movl $42, %eax18967; O3-NEXT:  .Lpcsection634:18968; O3-NEXT:    xorl %edx, %edx18969; O3-NEXT:  .Lpcsection635:18970; O3-NEXT:    xorl %ecx, %ecx18971; O3-NEXT:  .Lpcsection636:18972; O3-NEXT:    lock cmpxchg16b (%rdi)18973; O3-NEXT:    movq $1, foo(%rip)18974; O3-NEXT:    popq %rbx18975; O3-NEXT:    .cfi_def_cfa_offset 818976; O3-NEXT:    retq18977;18978; HASWELL-O3-LABEL: atomic128_cas_monotonic:18979; HASWELL-O3:       # %bb.0: # %entry18980; HASWELL-O3-NEXT:    pushq %rbx18981; HASWELL-O3-NEXT:    .cfi_def_cfa_offset 1618982; HASWELL-O3-NEXT:    .cfi_offset %rbx, -1618983; HASWELL-O3-NEXT:    movq foo(%rip), %rax18984; HASWELL-O3-NEXT:  .Lpcsection601:18985; HASWELL-O3-NEXT:    movl $42, %eax18986; HASWELL-O3-NEXT:  .Lpcsection602:18987; HASWELL-O3-NEXT:    movl $1, %ebx18988; HASWELL-O3-NEXT:  .Lpcsection603:18989; HASWELL-O3-NEXT:    xorl %edx, %edx18990; HASWELL-O3-NEXT:  .Lpcsection604:18991; HASWELL-O3-NEXT:    xorl %ecx, %ecx18992; HASWELL-O3-NEXT:  .Lpcsection605:18993; HASWELL-O3-NEXT:    lock cmpxchg16b (%rdi)18994; HASWELL-O3-NEXT:  .Lpcsection606:18995; HASWELL-O3-NEXT:    movl $42, %eax18996; HASWELL-O3-NEXT:  .Lpcsection607:18997; HASWELL-O3-NEXT:    xorl %edx, %edx18998; HASWELL-O3-NEXT:  .Lpcsection608:18999; HASWELL-O3-NEXT:    xorl %ecx, %ecx19000; HASWELL-O3-NEXT:  .Lpcsection609:19001; HASWELL-O3-NEXT:    lock cmpxchg16b (%rdi)19002; HASWELL-O3-NEXT:  .Lpcsection610:19003; HASWELL-O3-NEXT:    movl $42, %eax19004; HASWELL-O3-NEXT:  .Lpcsection611:19005; HASWELL-O3-NEXT:    xorl %edx, %edx19006; HASWELL-O3-NEXT:  .Lpcsection612:19007; HASWELL-O3-NEXT:    xorl %ecx, %ecx19008; HASWELL-O3-NEXT:  .Lpcsection613:19009; HASWELL-O3-NEXT:    lock cmpxchg16b (%rdi)19010; HASWELL-O3-NEXT:    movq $1, foo(%rip)19011; HASWELL-O3-NEXT:    popq %rbx19012; HASWELL-O3-NEXT:    .cfi_def_cfa_offset 819013; HASWELL-O3-NEXT:    retq19014entry:19015  load volatile i64, ptr @foo, align 819016  %x = cmpxchg ptr %a, i128 42, i128 1 monotonic monotonic, align 16, !pcsections !019017  %y = cmpxchg ptr %a, i128 42, i128 1 monotonic acquire, align 16, !pcsections !019018  %z = cmpxchg ptr %a, i128 42, i128 1 monotonic seq_cst, align 16, !pcsections !019019  store volatile i64 1, ptr @foo, align 819020  ret void19021}19022 19023define void @atomic128_cas_acquire(ptr %a) {19024; O0-LABEL: atomic128_cas_acquire:19025; O0:       # %bb.0: # %entry19026; O0-NEXT:    pushq %rbx19027; O0-NEXT:    .cfi_def_cfa_offset 1619028; O0-NEXT:    .cfi_offset %rbx, -1619029; O0-NEXT:    movq foo(%rip), %rax19030; O0-NEXT:  .Lpcsection719:19031; O0-NEXT:    xorl %eax, %eax19032; O0-NEXT:    movl %eax, %ecx19033; O0-NEXT:    movq %rcx, {{[-0-9]+}}(%r{{[sb]}}p) # 8-byte Spill19034; O0-NEXT:  .Lpcsection720:19035; O0-NEXT:    movl $42, %eax19036; O0-NEXT:    movq %rax, {{[-0-9]+}}(%r{{[sb]}}p) # 8-byte Spill19037; O0-NEXT:  .Lpcsection721:19038; O0-NEXT:    movl $1, %ebx19039; O0-NEXT:    movq %rbx, {{[-0-9]+}}(%r{{[sb]}}p) # 8-byte Spill19040; O0-NEXT:    movq %rcx, %rdx19041; O0-NEXT:  .Lpcsection722:19042; O0-NEXT:    lock cmpxchg16b (%rdi)19043; O0-NEXT:    movq {{[-0-9]+}}(%r{{[sb]}}p), %rcx # 8-byte Reload19044; O0-NEXT:    movq {{[-0-9]+}}(%r{{[sb]}}p), %rbx # 8-byte Reload19045; O0-NEXT:  .Lpcsection723:19046; O0-NEXT:    # kill: def $rsi killed $rax19047; O0-NEXT:    movq {{[-0-9]+}}(%r{{[sb]}}p), %rax # 8-byte Reload19048; O0-NEXT:    movq %rcx, %rdx19049; O0-NEXT:  .Lpcsection724:19050; O0-NEXT:    lock cmpxchg16b (%rdi)19051; O0-NEXT:    movq {{[-0-9]+}}(%r{{[sb]}}p), %rcx # 8-byte Reload19052; O0-NEXT:    movq {{[-0-9]+}}(%r{{[sb]}}p), %rbx # 8-byte Reload19053; O0-NEXT:  .Lpcsection725:19054; O0-NEXT:    # kill: def $rsi killed $rax19055; O0-NEXT:    movq {{[-0-9]+}}(%r{{[sb]}}p), %rax # 8-byte Reload19056; O0-NEXT:    movq %rcx, %rdx19057; O0-NEXT:  .Lpcsection726:19058; O0-NEXT:    lock cmpxchg16b (%rdi)19059; O0-NEXT:    movq $1, foo19060; O0-NEXT:    popq %rbx19061; O0-NEXT:    .cfi_def_cfa_offset 819062; O0-NEXT:    retq19063;19064; O1-LABEL: atomic128_cas_acquire:19065; O1:       # %bb.0: # %entry19066; O1-NEXT:    pushq %rbx19067; O1-NEXT:    .cfi_def_cfa_offset 1619068; O1-NEXT:    .cfi_offset %rbx, -1619069; O1-NEXT:    movq foo(%rip), %rax19070; O1-NEXT:  .Lpcsection637:19071; O1-NEXT:    movl $42, %eax19072; O1-NEXT:  .Lpcsection638:19073; O1-NEXT:    movl $1, %ebx19074; O1-NEXT:  .Lpcsection639:19075; O1-NEXT:    xorl %edx, %edx19076; O1-NEXT:  .Lpcsection640:19077; O1-NEXT:    xorl %ecx, %ecx19078; O1-NEXT:  .Lpcsection641:19079; O1-NEXT:    lock cmpxchg16b (%rdi)19080; O1-NEXT:  .Lpcsection642:19081; O1-NEXT:    movl $42, %eax19082; O1-NEXT:  .Lpcsection643:19083; O1-NEXT:    xorl %edx, %edx19084; O1-NEXT:  .Lpcsection644:19085; O1-NEXT:    xorl %ecx, %ecx19086; O1-NEXT:  .Lpcsection645:19087; O1-NEXT:    lock cmpxchg16b (%rdi)19088; O1-NEXT:  .Lpcsection646:19089; O1-NEXT:    movl $42, %eax19090; O1-NEXT:  .Lpcsection647:19091; O1-NEXT:    xorl %edx, %edx19092; O1-NEXT:  .Lpcsection648:19093; O1-NEXT:    xorl %ecx, %ecx19094; O1-NEXT:  .Lpcsection649:19095; O1-NEXT:    lock cmpxchg16b (%rdi)19096; O1-NEXT:    movq $1, foo(%rip)19097; O1-NEXT:    popq %rbx19098; O1-NEXT:    .cfi_def_cfa_offset 819099; O1-NEXT:    retq19100;19101; O2-LABEL: atomic128_cas_acquire:19102; O2:       # %bb.0: # %entry19103; O2-NEXT:    pushq %rbx19104; O2-NEXT:    .cfi_def_cfa_offset 1619105; O2-NEXT:    .cfi_offset %rbx, -1619106; O2-NEXT:    movq foo(%rip), %rax19107; O2-NEXT:  .Lpcsection637:19108; O2-NEXT:    movl $42, %eax19109; O2-NEXT:  .Lpcsection638:19110; O2-NEXT:    movl $1, %ebx19111; O2-NEXT:  .Lpcsection639:19112; O2-NEXT:    xorl %edx, %edx19113; O2-NEXT:  .Lpcsection640:19114; O2-NEXT:    xorl %ecx, %ecx19115; O2-NEXT:  .Lpcsection641:19116; O2-NEXT:    lock cmpxchg16b (%rdi)19117; O2-NEXT:  .Lpcsection642:19118; O2-NEXT:    movl $42, %eax19119; O2-NEXT:  .Lpcsection643:19120; O2-NEXT:    xorl %edx, %edx19121; O2-NEXT:  .Lpcsection644:19122; O2-NEXT:    xorl %ecx, %ecx19123; O2-NEXT:  .Lpcsection645:19124; O2-NEXT:    lock cmpxchg16b (%rdi)19125; O2-NEXT:  .Lpcsection646:19126; O2-NEXT:    movl $42, %eax19127; O2-NEXT:  .Lpcsection647:19128; O2-NEXT:    xorl %edx, %edx19129; O2-NEXT:  .Lpcsection648:19130; O2-NEXT:    xorl %ecx, %ecx19131; O2-NEXT:  .Lpcsection649:19132; O2-NEXT:    lock cmpxchg16b (%rdi)19133; O2-NEXT:    movq $1, foo(%rip)19134; O2-NEXT:    popq %rbx19135; O2-NEXT:    .cfi_def_cfa_offset 819136; O2-NEXT:    retq19137;19138; O3-LABEL: atomic128_cas_acquire:19139; O3:       # %bb.0: # %entry19140; O3-NEXT:    pushq %rbx19141; O3-NEXT:    .cfi_def_cfa_offset 1619142; O3-NEXT:    .cfi_offset %rbx, -1619143; O3-NEXT:    movq foo(%rip), %rax19144; O3-NEXT:  .Lpcsection637:19145; O3-NEXT:    movl $42, %eax19146; O3-NEXT:  .Lpcsection638:19147; O3-NEXT:    movl $1, %ebx19148; O3-NEXT:  .Lpcsection639:19149; O3-NEXT:    xorl %edx, %edx19150; O3-NEXT:  .Lpcsection640:19151; O3-NEXT:    xorl %ecx, %ecx19152; O3-NEXT:  .Lpcsection641:19153; O3-NEXT:    lock cmpxchg16b (%rdi)19154; O3-NEXT:  .Lpcsection642:19155; O3-NEXT:    movl $42, %eax19156; O3-NEXT:  .Lpcsection643:19157; O3-NEXT:    xorl %edx, %edx19158; O3-NEXT:  .Lpcsection644:19159; O3-NEXT:    xorl %ecx, %ecx19160; O3-NEXT:  .Lpcsection645:19161; O3-NEXT:    lock cmpxchg16b (%rdi)19162; O3-NEXT:  .Lpcsection646:19163; O3-NEXT:    movl $42, %eax19164; O3-NEXT:  .Lpcsection647:19165; O3-NEXT:    xorl %edx, %edx19166; O3-NEXT:  .Lpcsection648:19167; O3-NEXT:    xorl %ecx, %ecx19168; O3-NEXT:  .Lpcsection649:19169; O3-NEXT:    lock cmpxchg16b (%rdi)19170; O3-NEXT:    movq $1, foo(%rip)19171; O3-NEXT:    popq %rbx19172; O3-NEXT:    .cfi_def_cfa_offset 819173; O3-NEXT:    retq19174;19175; HASWELL-O3-LABEL: atomic128_cas_acquire:19176; HASWELL-O3:       # %bb.0: # %entry19177; HASWELL-O3-NEXT:    pushq %rbx19178; HASWELL-O3-NEXT:    .cfi_def_cfa_offset 1619179; HASWELL-O3-NEXT:    .cfi_offset %rbx, -1619180; HASWELL-O3-NEXT:    movq foo(%rip), %rax19181; HASWELL-O3-NEXT:  .Lpcsection614:19182; HASWELL-O3-NEXT:    movl $42, %eax19183; HASWELL-O3-NEXT:  .Lpcsection615:19184; HASWELL-O3-NEXT:    movl $1, %ebx19185; HASWELL-O3-NEXT:  .Lpcsection616:19186; HASWELL-O3-NEXT:    xorl %edx, %edx19187; HASWELL-O3-NEXT:  .Lpcsection617:19188; HASWELL-O3-NEXT:    xorl %ecx, %ecx19189; HASWELL-O3-NEXT:  .Lpcsection618:19190; HASWELL-O3-NEXT:    lock cmpxchg16b (%rdi)19191; HASWELL-O3-NEXT:  .Lpcsection619:19192; HASWELL-O3-NEXT:    movl $42, %eax19193; HASWELL-O3-NEXT:  .Lpcsection620:19194; HASWELL-O3-NEXT:    xorl %edx, %edx19195; HASWELL-O3-NEXT:  .Lpcsection621:19196; HASWELL-O3-NEXT:    xorl %ecx, %ecx19197; HASWELL-O3-NEXT:  .Lpcsection622:19198; HASWELL-O3-NEXT:    lock cmpxchg16b (%rdi)19199; HASWELL-O3-NEXT:  .Lpcsection623:19200; HASWELL-O3-NEXT:    movl $42, %eax19201; HASWELL-O3-NEXT:  .Lpcsection624:19202; HASWELL-O3-NEXT:    xorl %edx, %edx19203; HASWELL-O3-NEXT:  .Lpcsection625:19204; HASWELL-O3-NEXT:    xorl %ecx, %ecx19205; HASWELL-O3-NEXT:  .Lpcsection626:19206; HASWELL-O3-NEXT:    lock cmpxchg16b (%rdi)19207; HASWELL-O3-NEXT:    movq $1, foo(%rip)19208; HASWELL-O3-NEXT:    popq %rbx19209; HASWELL-O3-NEXT:    .cfi_def_cfa_offset 819210; HASWELL-O3-NEXT:    retq19211entry:19212  load volatile i64, ptr @foo, align 819213  %x = cmpxchg ptr %a, i128 42, i128 1 acquire monotonic, align 16, !pcsections !019214  %y = cmpxchg ptr %a, i128 42, i128 1 acquire acquire, align 16, !pcsections !019215  %z = cmpxchg ptr %a, i128 42, i128 1 acquire seq_cst, align 16, !pcsections !019216  store volatile i64 1, ptr @foo, align 819217  ret void19218}19219 19220define void @atomic128_cas_release(ptr %a) {19221; O0-LABEL: atomic128_cas_release:19222; O0:       # %bb.0: # %entry19223; O0-NEXT:    pushq %rbx19224; O0-NEXT:    .cfi_def_cfa_offset 1619225; O0-NEXT:    .cfi_offset %rbx, -1619226; O0-NEXT:    movq foo(%rip), %rax19227; O0-NEXT:  .Lpcsection727:19228; O0-NEXT:    xorl %eax, %eax19229; O0-NEXT:    movl %eax, %ecx19230; O0-NEXT:    movq %rcx, {{[-0-9]+}}(%r{{[sb]}}p) # 8-byte Spill19231; O0-NEXT:  .Lpcsection728:19232; O0-NEXT:    movl $42, %eax19233; O0-NEXT:    movq %rax, {{[-0-9]+}}(%r{{[sb]}}p) # 8-byte Spill19234; O0-NEXT:  .Lpcsection729:19235; O0-NEXT:    movl $1, %ebx19236; O0-NEXT:    movq %rbx, {{[-0-9]+}}(%r{{[sb]}}p) # 8-byte Spill19237; O0-NEXT:    movq %rcx, %rdx19238; O0-NEXT:  .Lpcsection730:19239; O0-NEXT:    lock cmpxchg16b (%rdi)19240; O0-NEXT:    movq {{[-0-9]+}}(%r{{[sb]}}p), %rcx # 8-byte Reload19241; O0-NEXT:    movq {{[-0-9]+}}(%r{{[sb]}}p), %rbx # 8-byte Reload19242; O0-NEXT:  .Lpcsection731:19243; O0-NEXT:    # kill: def $rsi killed $rax19244; O0-NEXT:    movq {{[-0-9]+}}(%r{{[sb]}}p), %rax # 8-byte Reload19245; O0-NEXT:    movq %rcx, %rdx19246; O0-NEXT:  .Lpcsection732:19247; O0-NEXT:    lock cmpxchg16b (%rdi)19248; O0-NEXT:    movq {{[-0-9]+}}(%r{{[sb]}}p), %rcx # 8-byte Reload19249; O0-NEXT:    movq {{[-0-9]+}}(%r{{[sb]}}p), %rbx # 8-byte Reload19250; O0-NEXT:  .Lpcsection733:19251; O0-NEXT:    # kill: def $rsi killed $rax19252; O0-NEXT:    movq {{[-0-9]+}}(%r{{[sb]}}p), %rax # 8-byte Reload19253; O0-NEXT:    movq %rcx, %rdx19254; O0-NEXT:  .Lpcsection734:19255; O0-NEXT:    lock cmpxchg16b (%rdi)19256; O0-NEXT:    movq $1, foo19257; O0-NEXT:    popq %rbx19258; O0-NEXT:    .cfi_def_cfa_offset 819259; O0-NEXT:    retq19260;19261; O1-LABEL: atomic128_cas_release:19262; O1:       # %bb.0: # %entry19263; O1-NEXT:    pushq %rbx19264; O1-NEXT:    .cfi_def_cfa_offset 1619265; O1-NEXT:    .cfi_offset %rbx, -1619266; O1-NEXT:    movq foo(%rip), %rax19267; O1-NEXT:  .Lpcsection650:19268; O1-NEXT:    movl $42, %eax19269; O1-NEXT:  .Lpcsection651:19270; O1-NEXT:    movl $1, %ebx19271; O1-NEXT:  .Lpcsection652:19272; O1-NEXT:    xorl %edx, %edx19273; O1-NEXT:  .Lpcsection653:19274; O1-NEXT:    xorl %ecx, %ecx19275; O1-NEXT:  .Lpcsection654:19276; O1-NEXT:    lock cmpxchg16b (%rdi)19277; O1-NEXT:  .Lpcsection655:19278; O1-NEXT:    movl $42, %eax19279; O1-NEXT:  .Lpcsection656:19280; O1-NEXT:    xorl %edx, %edx19281; O1-NEXT:  .Lpcsection657:19282; O1-NEXT:    xorl %ecx, %ecx19283; O1-NEXT:  .Lpcsection658:19284; O1-NEXT:    lock cmpxchg16b (%rdi)19285; O1-NEXT:  .Lpcsection659:19286; O1-NEXT:    movl $42, %eax19287; O1-NEXT:  .Lpcsection660:19288; O1-NEXT:    xorl %edx, %edx19289; O1-NEXT:  .Lpcsection661:19290; O1-NEXT:    xorl %ecx, %ecx19291; O1-NEXT:  .Lpcsection662:19292; O1-NEXT:    lock cmpxchg16b (%rdi)19293; O1-NEXT:    movq $1, foo(%rip)19294; O1-NEXT:    popq %rbx19295; O1-NEXT:    .cfi_def_cfa_offset 819296; O1-NEXT:    retq19297;19298; O2-LABEL: atomic128_cas_release:19299; O2:       # %bb.0: # %entry19300; O2-NEXT:    pushq %rbx19301; O2-NEXT:    .cfi_def_cfa_offset 1619302; O2-NEXT:    .cfi_offset %rbx, -1619303; O2-NEXT:    movq foo(%rip), %rax19304; O2-NEXT:  .Lpcsection650:19305; O2-NEXT:    movl $42, %eax19306; O2-NEXT:  .Lpcsection651:19307; O2-NEXT:    movl $1, %ebx19308; O2-NEXT:  .Lpcsection652:19309; O2-NEXT:    xorl %edx, %edx19310; O2-NEXT:  .Lpcsection653:19311; O2-NEXT:    xorl %ecx, %ecx19312; O2-NEXT:  .Lpcsection654:19313; O2-NEXT:    lock cmpxchg16b (%rdi)19314; O2-NEXT:  .Lpcsection655:19315; O2-NEXT:    movl $42, %eax19316; O2-NEXT:  .Lpcsection656:19317; O2-NEXT:    xorl %edx, %edx19318; O2-NEXT:  .Lpcsection657:19319; O2-NEXT:    xorl %ecx, %ecx19320; O2-NEXT:  .Lpcsection658:19321; O2-NEXT:    lock cmpxchg16b (%rdi)19322; O2-NEXT:  .Lpcsection659:19323; O2-NEXT:    movl $42, %eax19324; O2-NEXT:  .Lpcsection660:19325; O2-NEXT:    xorl %edx, %edx19326; O2-NEXT:  .Lpcsection661:19327; O2-NEXT:    xorl %ecx, %ecx19328; O2-NEXT:  .Lpcsection662:19329; O2-NEXT:    lock cmpxchg16b (%rdi)19330; O2-NEXT:    movq $1, foo(%rip)19331; O2-NEXT:    popq %rbx19332; O2-NEXT:    .cfi_def_cfa_offset 819333; O2-NEXT:    retq19334;19335; O3-LABEL: atomic128_cas_release:19336; O3:       # %bb.0: # %entry19337; O3-NEXT:    pushq %rbx19338; O3-NEXT:    .cfi_def_cfa_offset 1619339; O3-NEXT:    .cfi_offset %rbx, -1619340; O3-NEXT:    movq foo(%rip), %rax19341; O3-NEXT:  .Lpcsection650:19342; O3-NEXT:    movl $42, %eax19343; O3-NEXT:  .Lpcsection651:19344; O3-NEXT:    movl $1, %ebx19345; O3-NEXT:  .Lpcsection652:19346; O3-NEXT:    xorl %edx, %edx19347; O3-NEXT:  .Lpcsection653:19348; O3-NEXT:    xorl %ecx, %ecx19349; O3-NEXT:  .Lpcsection654:19350; O3-NEXT:    lock cmpxchg16b (%rdi)19351; O3-NEXT:  .Lpcsection655:19352; O3-NEXT:    movl $42, %eax19353; O3-NEXT:  .Lpcsection656:19354; O3-NEXT:    xorl %edx, %edx19355; O3-NEXT:  .Lpcsection657:19356; O3-NEXT:    xorl %ecx, %ecx19357; O3-NEXT:  .Lpcsection658:19358; O3-NEXT:    lock cmpxchg16b (%rdi)19359; O3-NEXT:  .Lpcsection659:19360; O3-NEXT:    movl $42, %eax19361; O3-NEXT:  .Lpcsection660:19362; O3-NEXT:    xorl %edx, %edx19363; O3-NEXT:  .Lpcsection661:19364; O3-NEXT:    xorl %ecx, %ecx19365; O3-NEXT:  .Lpcsection662:19366; O3-NEXT:    lock cmpxchg16b (%rdi)19367; O3-NEXT:    movq $1, foo(%rip)19368; O3-NEXT:    popq %rbx19369; O3-NEXT:    .cfi_def_cfa_offset 819370; O3-NEXT:    retq19371;19372; HASWELL-O3-LABEL: atomic128_cas_release:19373; HASWELL-O3:       # %bb.0: # %entry19374; HASWELL-O3-NEXT:    pushq %rbx19375; HASWELL-O3-NEXT:    .cfi_def_cfa_offset 1619376; HASWELL-O3-NEXT:    .cfi_offset %rbx, -1619377; HASWELL-O3-NEXT:    movq foo(%rip), %rax19378; HASWELL-O3-NEXT:  .Lpcsection627:19379; HASWELL-O3-NEXT:    movl $42, %eax19380; HASWELL-O3-NEXT:  .Lpcsection628:19381; HASWELL-O3-NEXT:    movl $1, %ebx19382; HASWELL-O3-NEXT:  .Lpcsection629:19383; HASWELL-O3-NEXT:    xorl %edx, %edx19384; HASWELL-O3-NEXT:  .Lpcsection630:19385; HASWELL-O3-NEXT:    xorl %ecx, %ecx19386; HASWELL-O3-NEXT:  .Lpcsection631:19387; HASWELL-O3-NEXT:    lock cmpxchg16b (%rdi)19388; HASWELL-O3-NEXT:  .Lpcsection632:19389; HASWELL-O3-NEXT:    movl $42, %eax19390; HASWELL-O3-NEXT:  .Lpcsection633:19391; HASWELL-O3-NEXT:    xorl %edx, %edx19392; HASWELL-O3-NEXT:  .Lpcsection634:19393; HASWELL-O3-NEXT:    xorl %ecx, %ecx19394; HASWELL-O3-NEXT:  .Lpcsection635:19395; HASWELL-O3-NEXT:    lock cmpxchg16b (%rdi)19396; HASWELL-O3-NEXT:  .Lpcsection636:19397; HASWELL-O3-NEXT:    movl $42, %eax19398; HASWELL-O3-NEXT:  .Lpcsection637:19399; HASWELL-O3-NEXT:    xorl %edx, %edx19400; HASWELL-O3-NEXT:  .Lpcsection638:19401; HASWELL-O3-NEXT:    xorl %ecx, %ecx19402; HASWELL-O3-NEXT:  .Lpcsection639:19403; HASWELL-O3-NEXT:    lock cmpxchg16b (%rdi)19404; HASWELL-O3-NEXT:    movq $1, foo(%rip)19405; HASWELL-O3-NEXT:    popq %rbx19406; HASWELL-O3-NEXT:    .cfi_def_cfa_offset 819407; HASWELL-O3-NEXT:    retq19408entry:19409  load volatile i64, ptr @foo, align 819410  %x = cmpxchg ptr %a, i128 42, i128 1 release monotonic, align 16, !pcsections !019411  %y = cmpxchg ptr %a, i128 42, i128 1 release acquire, align 16, !pcsections !019412  %z = cmpxchg ptr %a, i128 42, i128 1 release seq_cst, align 16, !pcsections !019413  store volatile i64 1, ptr @foo, align 819414  ret void19415}19416 19417define void @atomic128_cas_acq_rel(ptr %a) {19418; O0-LABEL: atomic128_cas_acq_rel:19419; O0:       # %bb.0: # %entry19420; O0-NEXT:    pushq %rbx19421; O0-NEXT:    .cfi_def_cfa_offset 1619422; O0-NEXT:    .cfi_offset %rbx, -1619423; O0-NEXT:    movq foo(%rip), %rax19424; O0-NEXT:  .Lpcsection735:19425; O0-NEXT:    xorl %eax, %eax19426; O0-NEXT:    movl %eax, %ecx19427; O0-NEXT:    movq %rcx, {{[-0-9]+}}(%r{{[sb]}}p) # 8-byte Spill19428; O0-NEXT:  .Lpcsection736:19429; O0-NEXT:    movl $42, %eax19430; O0-NEXT:    movq %rax, {{[-0-9]+}}(%r{{[sb]}}p) # 8-byte Spill19431; O0-NEXT:  .Lpcsection737:19432; O0-NEXT:    movl $1, %ebx19433; O0-NEXT:    movq %rbx, {{[-0-9]+}}(%r{{[sb]}}p) # 8-byte Spill19434; O0-NEXT:    movq %rcx, %rdx19435; O0-NEXT:  .Lpcsection738:19436; O0-NEXT:    lock cmpxchg16b (%rdi)19437; O0-NEXT:    movq {{[-0-9]+}}(%r{{[sb]}}p), %rcx # 8-byte Reload19438; O0-NEXT:    movq {{[-0-9]+}}(%r{{[sb]}}p), %rbx # 8-byte Reload19439; O0-NEXT:  .Lpcsection739:19440; O0-NEXT:    # kill: def $rsi killed $rax19441; O0-NEXT:    movq {{[-0-9]+}}(%r{{[sb]}}p), %rax # 8-byte Reload19442; O0-NEXT:    movq %rcx, %rdx19443; O0-NEXT:  .Lpcsection740:19444; O0-NEXT:    lock cmpxchg16b (%rdi)19445; O0-NEXT:    movq {{[-0-9]+}}(%r{{[sb]}}p), %rcx # 8-byte Reload19446; O0-NEXT:    movq {{[-0-9]+}}(%r{{[sb]}}p), %rbx # 8-byte Reload19447; O0-NEXT:  .Lpcsection741:19448; O0-NEXT:    # kill: def $rsi killed $rax19449; O0-NEXT:    movq {{[-0-9]+}}(%r{{[sb]}}p), %rax # 8-byte Reload19450; O0-NEXT:    movq %rcx, %rdx19451; O0-NEXT:  .Lpcsection742:19452; O0-NEXT:    lock cmpxchg16b (%rdi)19453; O0-NEXT:    movq $1, foo19454; O0-NEXT:    popq %rbx19455; O0-NEXT:    .cfi_def_cfa_offset 819456; O0-NEXT:    retq19457;19458; O1-LABEL: atomic128_cas_acq_rel:19459; O1:       # %bb.0: # %entry19460; O1-NEXT:    pushq %rbx19461; O1-NEXT:    .cfi_def_cfa_offset 1619462; O1-NEXT:    .cfi_offset %rbx, -1619463; O1-NEXT:    movq foo(%rip), %rax19464; O1-NEXT:  .Lpcsection663:19465; O1-NEXT:    movl $42, %eax19466; O1-NEXT:  .Lpcsection664:19467; O1-NEXT:    movl $1, %ebx19468; O1-NEXT:  .Lpcsection665:19469; O1-NEXT:    xorl %edx, %edx19470; O1-NEXT:  .Lpcsection666:19471; O1-NEXT:    xorl %ecx, %ecx19472; O1-NEXT:  .Lpcsection667:19473; O1-NEXT:    lock cmpxchg16b (%rdi)19474; O1-NEXT:  .Lpcsection668:19475; O1-NEXT:    movl $42, %eax19476; O1-NEXT:  .Lpcsection669:19477; O1-NEXT:    xorl %edx, %edx19478; O1-NEXT:  .Lpcsection670:19479; O1-NEXT:    xorl %ecx, %ecx19480; O1-NEXT:  .Lpcsection671:19481; O1-NEXT:    lock cmpxchg16b (%rdi)19482; O1-NEXT:  .Lpcsection672:19483; O1-NEXT:    movl $42, %eax19484; O1-NEXT:  .Lpcsection673:19485; O1-NEXT:    xorl %edx, %edx19486; O1-NEXT:  .Lpcsection674:19487; O1-NEXT:    xorl %ecx, %ecx19488; O1-NEXT:  .Lpcsection675:19489; O1-NEXT:    lock cmpxchg16b (%rdi)19490; O1-NEXT:    movq $1, foo(%rip)19491; O1-NEXT:    popq %rbx19492; O1-NEXT:    .cfi_def_cfa_offset 819493; O1-NEXT:    retq19494;19495; O2-LABEL: atomic128_cas_acq_rel:19496; O2:       # %bb.0: # %entry19497; O2-NEXT:    pushq %rbx19498; O2-NEXT:    .cfi_def_cfa_offset 1619499; O2-NEXT:    .cfi_offset %rbx, -1619500; O2-NEXT:    movq foo(%rip), %rax19501; O2-NEXT:  .Lpcsection663:19502; O2-NEXT:    movl $42, %eax19503; O2-NEXT:  .Lpcsection664:19504; O2-NEXT:    movl $1, %ebx19505; O2-NEXT:  .Lpcsection665:19506; O2-NEXT:    xorl %edx, %edx19507; O2-NEXT:  .Lpcsection666:19508; O2-NEXT:    xorl %ecx, %ecx19509; O2-NEXT:  .Lpcsection667:19510; O2-NEXT:    lock cmpxchg16b (%rdi)19511; O2-NEXT:  .Lpcsection668:19512; O2-NEXT:    movl $42, %eax19513; O2-NEXT:  .Lpcsection669:19514; O2-NEXT:    xorl %edx, %edx19515; O2-NEXT:  .Lpcsection670:19516; O2-NEXT:    xorl %ecx, %ecx19517; O2-NEXT:  .Lpcsection671:19518; O2-NEXT:    lock cmpxchg16b (%rdi)19519; O2-NEXT:  .Lpcsection672:19520; O2-NEXT:    movl $42, %eax19521; O2-NEXT:  .Lpcsection673:19522; O2-NEXT:    xorl %edx, %edx19523; O2-NEXT:  .Lpcsection674:19524; O2-NEXT:    xorl %ecx, %ecx19525; O2-NEXT:  .Lpcsection675:19526; O2-NEXT:    lock cmpxchg16b (%rdi)19527; O2-NEXT:    movq $1, foo(%rip)19528; O2-NEXT:    popq %rbx19529; O2-NEXT:    .cfi_def_cfa_offset 819530; O2-NEXT:    retq19531;19532; O3-LABEL: atomic128_cas_acq_rel:19533; O3:       # %bb.0: # %entry19534; O3-NEXT:    pushq %rbx19535; O3-NEXT:    .cfi_def_cfa_offset 1619536; O3-NEXT:    .cfi_offset %rbx, -1619537; O3-NEXT:    movq foo(%rip), %rax19538; O3-NEXT:  .Lpcsection663:19539; O3-NEXT:    movl $42, %eax19540; O3-NEXT:  .Lpcsection664:19541; O3-NEXT:    movl $1, %ebx19542; O3-NEXT:  .Lpcsection665:19543; O3-NEXT:    xorl %edx, %edx19544; O3-NEXT:  .Lpcsection666:19545; O3-NEXT:    xorl %ecx, %ecx19546; O3-NEXT:  .Lpcsection667:19547; O3-NEXT:    lock cmpxchg16b (%rdi)19548; O3-NEXT:  .Lpcsection668:19549; O3-NEXT:    movl $42, %eax19550; O3-NEXT:  .Lpcsection669:19551; O3-NEXT:    xorl %edx, %edx19552; O3-NEXT:  .Lpcsection670:19553; O3-NEXT:    xorl %ecx, %ecx19554; O3-NEXT:  .Lpcsection671:19555; O3-NEXT:    lock cmpxchg16b (%rdi)19556; O3-NEXT:  .Lpcsection672:19557; O3-NEXT:    movl $42, %eax19558; O3-NEXT:  .Lpcsection673:19559; O3-NEXT:    xorl %edx, %edx19560; O3-NEXT:  .Lpcsection674:19561; O3-NEXT:    xorl %ecx, %ecx19562; O3-NEXT:  .Lpcsection675:19563; O3-NEXT:    lock cmpxchg16b (%rdi)19564; O3-NEXT:    movq $1, foo(%rip)19565; O3-NEXT:    popq %rbx19566; O3-NEXT:    .cfi_def_cfa_offset 819567; O3-NEXT:    retq19568;19569; HASWELL-O3-LABEL: atomic128_cas_acq_rel:19570; HASWELL-O3:       # %bb.0: # %entry19571; HASWELL-O3-NEXT:    pushq %rbx19572; HASWELL-O3-NEXT:    .cfi_def_cfa_offset 1619573; HASWELL-O3-NEXT:    .cfi_offset %rbx, -1619574; HASWELL-O3-NEXT:    movq foo(%rip), %rax19575; HASWELL-O3-NEXT:  .Lpcsection640:19576; HASWELL-O3-NEXT:    movl $42, %eax19577; HASWELL-O3-NEXT:  .Lpcsection641:19578; HASWELL-O3-NEXT:    movl $1, %ebx19579; HASWELL-O3-NEXT:  .Lpcsection642:19580; HASWELL-O3-NEXT:    xorl %edx, %edx19581; HASWELL-O3-NEXT:  .Lpcsection643:19582; HASWELL-O3-NEXT:    xorl %ecx, %ecx19583; HASWELL-O3-NEXT:  .Lpcsection644:19584; HASWELL-O3-NEXT:    lock cmpxchg16b (%rdi)19585; HASWELL-O3-NEXT:  .Lpcsection645:19586; HASWELL-O3-NEXT:    movl $42, %eax19587; HASWELL-O3-NEXT:  .Lpcsection646:19588; HASWELL-O3-NEXT:    xorl %edx, %edx19589; HASWELL-O3-NEXT:  .Lpcsection647:19590; HASWELL-O3-NEXT:    xorl %ecx, %ecx19591; HASWELL-O3-NEXT:  .Lpcsection648:19592; HASWELL-O3-NEXT:    lock cmpxchg16b (%rdi)19593; HASWELL-O3-NEXT:  .Lpcsection649:19594; HASWELL-O3-NEXT:    movl $42, %eax19595; HASWELL-O3-NEXT:  .Lpcsection650:19596; HASWELL-O3-NEXT:    xorl %edx, %edx19597; HASWELL-O3-NEXT:  .Lpcsection651:19598; HASWELL-O3-NEXT:    xorl %ecx, %ecx19599; HASWELL-O3-NEXT:  .Lpcsection652:19600; HASWELL-O3-NEXT:    lock cmpxchg16b (%rdi)19601; HASWELL-O3-NEXT:    movq $1, foo(%rip)19602; HASWELL-O3-NEXT:    popq %rbx19603; HASWELL-O3-NEXT:    .cfi_def_cfa_offset 819604; HASWELL-O3-NEXT:    retq19605entry:19606  load volatile i64, ptr @foo, align 819607  %x = cmpxchg ptr %a, i128 42, i128 1 acq_rel monotonic, align 16, !pcsections !019608  %y = cmpxchg ptr %a, i128 42, i128 1 acq_rel acquire, align 16, !pcsections !019609  %z = cmpxchg ptr %a, i128 42, i128 1 acq_rel seq_cst, align 16, !pcsections !019610  store volatile i64 1, ptr @foo, align 819611  ret void19612}19613 19614define void @atomic128_cas_seq_cst(ptr %a) {19615; O0-LABEL: atomic128_cas_seq_cst:19616; O0:       # %bb.0: # %entry19617; O0-NEXT:    pushq %rbx19618; O0-NEXT:    .cfi_def_cfa_offset 1619619; O0-NEXT:    .cfi_offset %rbx, -1619620; O0-NEXT:    movq foo(%rip), %rax19621; O0-NEXT:  .Lpcsection743:19622; O0-NEXT:    xorl %eax, %eax19623; O0-NEXT:    movl %eax, %ecx19624; O0-NEXT:    movq %rcx, {{[-0-9]+}}(%r{{[sb]}}p) # 8-byte Spill19625; O0-NEXT:  .Lpcsection744:19626; O0-NEXT:    movl $42, %eax19627; O0-NEXT:    movq %rax, {{[-0-9]+}}(%r{{[sb]}}p) # 8-byte Spill19628; O0-NEXT:  .Lpcsection745:19629; O0-NEXT:    movl $1, %ebx19630; O0-NEXT:    movq %rbx, {{[-0-9]+}}(%r{{[sb]}}p) # 8-byte Spill19631; O0-NEXT:    movq %rcx, %rdx19632; O0-NEXT:  .Lpcsection746:19633; O0-NEXT:    lock cmpxchg16b (%rdi)19634; O0-NEXT:    movq {{[-0-9]+}}(%r{{[sb]}}p), %rcx # 8-byte Reload19635; O0-NEXT:    movq {{[-0-9]+}}(%r{{[sb]}}p), %rbx # 8-byte Reload19636; O0-NEXT:  .Lpcsection747:19637; O0-NEXT:    # kill: def $rsi killed $rax19638; O0-NEXT:    movq {{[-0-9]+}}(%r{{[sb]}}p), %rax # 8-byte Reload19639; O0-NEXT:    movq %rcx, %rdx19640; O0-NEXT:  .Lpcsection748:19641; O0-NEXT:    lock cmpxchg16b (%rdi)19642; O0-NEXT:    movq {{[-0-9]+}}(%r{{[sb]}}p), %rcx # 8-byte Reload19643; O0-NEXT:    movq {{[-0-9]+}}(%r{{[sb]}}p), %rbx # 8-byte Reload19644; O0-NEXT:  .Lpcsection749:19645; O0-NEXT:    # kill: def $rsi killed $rax19646; O0-NEXT:    movq {{[-0-9]+}}(%r{{[sb]}}p), %rax # 8-byte Reload19647; O0-NEXT:    movq %rcx, %rdx19648; O0-NEXT:  .Lpcsection750:19649; O0-NEXT:    lock cmpxchg16b (%rdi)19650; O0-NEXT:    movq $3, foo19651; O0-NEXT:    popq %rbx19652; O0-NEXT:    .cfi_def_cfa_offset 819653; O0-NEXT:    retq19654;19655; O1-LABEL: atomic128_cas_seq_cst:19656; O1:       # %bb.0: # %entry19657; O1-NEXT:    pushq %rbx19658; O1-NEXT:    .cfi_def_cfa_offset 1619659; O1-NEXT:    .cfi_offset %rbx, -1619660; O1-NEXT:    movq foo(%rip), %rax19661; O1-NEXT:  .Lpcsection676:19662; O1-NEXT:    movl $42, %eax19663; O1-NEXT:  .Lpcsection677:19664; O1-NEXT:    movl $1, %ebx19665; O1-NEXT:  .Lpcsection678:19666; O1-NEXT:    xorl %edx, %edx19667; O1-NEXT:  .Lpcsection679:19668; O1-NEXT:    xorl %ecx, %ecx19669; O1-NEXT:  .Lpcsection680:19670; O1-NEXT:    lock cmpxchg16b (%rdi)19671; O1-NEXT:  .Lpcsection681:19672; O1-NEXT:    movl $42, %eax19673; O1-NEXT:  .Lpcsection682:19674; O1-NEXT:    xorl %edx, %edx19675; O1-NEXT:  .Lpcsection683:19676; O1-NEXT:    xorl %ecx, %ecx19677; O1-NEXT:  .Lpcsection684:19678; O1-NEXT:    lock cmpxchg16b (%rdi)19679; O1-NEXT:  .Lpcsection685:19680; O1-NEXT:    movl $42, %eax19681; O1-NEXT:  .Lpcsection686:19682; O1-NEXT:    xorl %edx, %edx19683; O1-NEXT:  .Lpcsection687:19684; O1-NEXT:    xorl %ecx, %ecx19685; O1-NEXT:  .Lpcsection688:19686; O1-NEXT:    lock cmpxchg16b (%rdi)19687; O1-NEXT:    movq $3, foo(%rip)19688; O1-NEXT:    popq %rbx19689; O1-NEXT:    .cfi_def_cfa_offset 819690; O1-NEXT:    retq19691;19692; O2-LABEL: atomic128_cas_seq_cst:19693; O2:       # %bb.0: # %entry19694; O2-NEXT:    pushq %rbx19695; O2-NEXT:    .cfi_def_cfa_offset 1619696; O2-NEXT:    .cfi_offset %rbx, -1619697; O2-NEXT:    movq foo(%rip), %rax19698; O2-NEXT:  .Lpcsection676:19699; O2-NEXT:    movl $42, %eax19700; O2-NEXT:  .Lpcsection677:19701; O2-NEXT:    movl $1, %ebx19702; O2-NEXT:  .Lpcsection678:19703; O2-NEXT:    xorl %edx, %edx19704; O2-NEXT:  .Lpcsection679:19705; O2-NEXT:    xorl %ecx, %ecx19706; O2-NEXT:  .Lpcsection680:19707; O2-NEXT:    lock cmpxchg16b (%rdi)19708; O2-NEXT:  .Lpcsection681:19709; O2-NEXT:    movl $42, %eax19710; O2-NEXT:  .Lpcsection682:19711; O2-NEXT:    xorl %edx, %edx19712; O2-NEXT:  .Lpcsection683:19713; O2-NEXT:    xorl %ecx, %ecx19714; O2-NEXT:  .Lpcsection684:19715; O2-NEXT:    lock cmpxchg16b (%rdi)19716; O2-NEXT:  .Lpcsection685:19717; O2-NEXT:    movl $42, %eax19718; O2-NEXT:  .Lpcsection686:19719; O2-NEXT:    xorl %edx, %edx19720; O2-NEXT:  .Lpcsection687:19721; O2-NEXT:    xorl %ecx, %ecx19722; O2-NEXT:  .Lpcsection688:19723; O2-NEXT:    lock cmpxchg16b (%rdi)19724; O2-NEXT:    movq $3, foo(%rip)19725; O2-NEXT:    popq %rbx19726; O2-NEXT:    .cfi_def_cfa_offset 819727; O2-NEXT:    retq19728;19729; O3-LABEL: atomic128_cas_seq_cst:19730; O3:       # %bb.0: # %entry19731; O3-NEXT:    pushq %rbx19732; O3-NEXT:    .cfi_def_cfa_offset 1619733; O3-NEXT:    .cfi_offset %rbx, -1619734; O3-NEXT:    movq foo(%rip), %rax19735; O3-NEXT:  .Lpcsection676:19736; O3-NEXT:    movl $42, %eax19737; O3-NEXT:  .Lpcsection677:19738; O3-NEXT:    movl $1, %ebx19739; O3-NEXT:  .Lpcsection678:19740; O3-NEXT:    xorl %edx, %edx19741; O3-NEXT:  .Lpcsection679:19742; O3-NEXT:    xorl %ecx, %ecx19743; O3-NEXT:  .Lpcsection680:19744; O3-NEXT:    lock cmpxchg16b (%rdi)19745; O3-NEXT:  .Lpcsection681:19746; O3-NEXT:    movl $42, %eax19747; O3-NEXT:  .Lpcsection682:19748; O3-NEXT:    xorl %edx, %edx19749; O3-NEXT:  .Lpcsection683:19750; O3-NEXT:    xorl %ecx, %ecx19751; O3-NEXT:  .Lpcsection684:19752; O3-NEXT:    lock cmpxchg16b (%rdi)19753; O3-NEXT:  .Lpcsection685:19754; O3-NEXT:    movl $42, %eax19755; O3-NEXT:  .Lpcsection686:19756; O3-NEXT:    xorl %edx, %edx19757; O3-NEXT:  .Lpcsection687:19758; O3-NEXT:    xorl %ecx, %ecx19759; O3-NEXT:  .Lpcsection688:19760; O3-NEXT:    lock cmpxchg16b (%rdi)19761; O3-NEXT:    movq $3, foo(%rip)19762; O3-NEXT:    popq %rbx19763; O3-NEXT:    .cfi_def_cfa_offset 819764; O3-NEXT:    retq19765;19766; HASWELL-O3-LABEL: atomic128_cas_seq_cst:19767; HASWELL-O3:       # %bb.0: # %entry19768; HASWELL-O3-NEXT:    pushq %rbx19769; HASWELL-O3-NEXT:    .cfi_def_cfa_offset 1619770; HASWELL-O3-NEXT:    .cfi_offset %rbx, -1619771; HASWELL-O3-NEXT:    movq foo(%rip), %rax19772; HASWELL-O3-NEXT:  .Lpcsection653:19773; HASWELL-O3-NEXT:    movl $42, %eax19774; HASWELL-O3-NEXT:  .Lpcsection654:19775; HASWELL-O3-NEXT:    movl $1, %ebx19776; HASWELL-O3-NEXT:  .Lpcsection655:19777; HASWELL-O3-NEXT:    xorl %edx, %edx19778; HASWELL-O3-NEXT:  .Lpcsection656:19779; HASWELL-O3-NEXT:    xorl %ecx, %ecx19780; HASWELL-O3-NEXT:  .Lpcsection657:19781; HASWELL-O3-NEXT:    lock cmpxchg16b (%rdi)19782; HASWELL-O3-NEXT:  .Lpcsection658:19783; HASWELL-O3-NEXT:    movl $42, %eax19784; HASWELL-O3-NEXT:  .Lpcsection659:19785; HASWELL-O3-NEXT:    xorl %edx, %edx19786; HASWELL-O3-NEXT:  .Lpcsection660:19787; HASWELL-O3-NEXT:    xorl %ecx, %ecx19788; HASWELL-O3-NEXT:  .Lpcsection661:19789; HASWELL-O3-NEXT:    lock cmpxchg16b (%rdi)19790; HASWELL-O3-NEXT:  .Lpcsection662:19791; HASWELL-O3-NEXT:    movl $42, %eax19792; HASWELL-O3-NEXT:  .Lpcsection663:19793; HASWELL-O3-NEXT:    xorl %edx, %edx19794; HASWELL-O3-NEXT:  .Lpcsection664:19795; HASWELL-O3-NEXT:    xorl %ecx, %ecx19796; HASWELL-O3-NEXT:  .Lpcsection665:19797; HASWELL-O3-NEXT:    lock cmpxchg16b (%rdi)19798; HASWELL-O3-NEXT:    movq $3, foo(%rip)19799; HASWELL-O3-NEXT:    popq %rbx19800; HASWELL-O3-NEXT:    .cfi_def_cfa_offset 819801; HASWELL-O3-NEXT:    retq19802entry:19803  load volatile i64, ptr @foo, align 819804  %x = cmpxchg ptr %a, i128 42, i128 1 seq_cst monotonic, align 16, !pcsections !019805  %y = cmpxchg ptr %a, i128 42, i128 1 seq_cst acquire, align 16, !pcsections !019806  %z = cmpxchg ptr %a, i128 42, i128 1 seq_cst seq_cst, align 16, !pcsections !019807  store volatile i64 3, ptr @foo, align 819808  ret void19809}19810 19811!0 = !{!"somesection"}19812