brintos

brintos / llvm-project-archived public Read only

0
0
Text · 94.5 KiB · b70f0ea Raw
2455 lines · plain
1; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py2; RUN: llc < %s -mtriple=ve | FileCheck %s3 4;;; Test atomic compare and exchange weak for all types and all memory order5;;;6;;; Note:7;;;   - We test i1/i8/i16/i32/i64/i128/u8/u16/u32/u64/u128.8;;;   - We test relaxed, acquire, and seq_cst.9;;;   - We test only exchange with variables since VE doesn't have exchange10;;;     instructions with immediate values.11;;;   - We test against an object, a stack object, and a global variable.12 13%"struct.std::__1::atomic" = type { %"struct.std::__1::__atomic_base" }14%"struct.std::__1::__atomic_base" = type { %"struct.std::__1::__cxx_atomic_impl" }15%"struct.std::__1::__cxx_atomic_impl" = type { %"struct.std::__1::__cxx_atomic_base_impl" }16%"struct.std::__1::__cxx_atomic_base_impl" = type { i8 }17%"struct.std::__1::atomic.0" = type { %"struct.std::__1::__atomic_base.1" }18%"struct.std::__1::__atomic_base.1" = type { %"struct.std::__1::__atomic_base.2" }19%"struct.std::__1::__atomic_base.2" = type { %"struct.std::__1::__cxx_atomic_impl.3" }20%"struct.std::__1::__cxx_atomic_impl.3" = type { %"struct.std::__1::__cxx_atomic_base_impl.4" }21%"struct.std::__1::__cxx_atomic_base_impl.4" = type { i8 }22%"struct.std::__1::atomic.5" = type { %"struct.std::__1::__atomic_base.6" }23%"struct.std::__1::__atomic_base.6" = type { %"struct.std::__1::__atomic_base.7" }24%"struct.std::__1::__atomic_base.7" = type { %"struct.std::__1::__cxx_atomic_impl.8" }25%"struct.std::__1::__cxx_atomic_impl.8" = type { %"struct.std::__1::__cxx_atomic_base_impl.9" }26%"struct.std::__1::__cxx_atomic_base_impl.9" = type { i8 }27%"struct.std::__1::atomic.10" = type { %"struct.std::__1::__atomic_base.11" }28%"struct.std::__1::__atomic_base.11" = type { %"struct.std::__1::__atomic_base.12" }29%"struct.std::__1::__atomic_base.12" = type { %"struct.std::__1::__cxx_atomic_impl.13" }30%"struct.std::__1::__cxx_atomic_impl.13" = type { %"struct.std::__1::__cxx_atomic_base_impl.14" }31%"struct.std::__1::__cxx_atomic_base_impl.14" = type { i16 }32%"struct.std::__1::atomic.15" = type { %"struct.std::__1::__atomic_base.16" }33%"struct.std::__1::__atomic_base.16" = type { %"struct.std::__1::__atomic_base.17" }34%"struct.std::__1::__atomic_base.17" = type { %"struct.std::__1::__cxx_atomic_impl.18" }35%"struct.std::__1::__cxx_atomic_impl.18" = type { %"struct.std::__1::__cxx_atomic_base_impl.19" }36%"struct.std::__1::__cxx_atomic_base_impl.19" = type { i16 }37%"struct.std::__1::atomic.20" = type { %"struct.std::__1::__atomic_base.21" }38%"struct.std::__1::__atomic_base.21" = type { %"struct.std::__1::__atomic_base.22" }39%"struct.std::__1::__atomic_base.22" = type { %"struct.std::__1::__cxx_atomic_impl.23" }40%"struct.std::__1::__cxx_atomic_impl.23" = type { %"struct.std::__1::__cxx_atomic_base_impl.24" }41%"struct.std::__1::__cxx_atomic_base_impl.24" = type { i32 }42%"struct.std::__1::atomic.25" = type { %"struct.std::__1::__atomic_base.26" }43%"struct.std::__1::__atomic_base.26" = type { %"struct.std::__1::__atomic_base.27" }44%"struct.std::__1::__atomic_base.27" = type { %"struct.std::__1::__cxx_atomic_impl.28" }45%"struct.std::__1::__cxx_atomic_impl.28" = type { %"struct.std::__1::__cxx_atomic_base_impl.29" }46%"struct.std::__1::__cxx_atomic_base_impl.29" = type { i32 }47%"struct.std::__1::atomic.30" = type { %"struct.std::__1::__atomic_base.31" }48%"struct.std::__1::__atomic_base.31" = type { %"struct.std::__1::__atomic_base.32" }49%"struct.std::__1::__atomic_base.32" = type { %"struct.std::__1::__cxx_atomic_impl.33" }50%"struct.std::__1::__cxx_atomic_impl.33" = type { %"struct.std::__1::__cxx_atomic_base_impl.34" }51%"struct.std::__1::__cxx_atomic_base_impl.34" = type { i64 }52%"struct.std::__1::atomic.35" = type { %"struct.std::__1::__atomic_base.36" }53%"struct.std::__1::__atomic_base.36" = type { %"struct.std::__1::__atomic_base.37" }54%"struct.std::__1::__atomic_base.37" = type { %"struct.std::__1::__cxx_atomic_impl.38" }55%"struct.std::__1::__cxx_atomic_impl.38" = type { %"struct.std::__1::__cxx_atomic_base_impl.39" }56%"struct.std::__1::__cxx_atomic_base_impl.39" = type { i64 }57%"struct.std::__1::atomic.40" = type { %"struct.std::__1::__atomic_base.41" }58%"struct.std::__1::__atomic_base.41" = type { %"struct.std::__1::__atomic_base.42" }59%"struct.std::__1::__atomic_base.42" = type { %"struct.std::__1::__cxx_atomic_impl.43" }60%"struct.std::__1::__cxx_atomic_impl.43" = type { %"struct.std::__1::__cxx_atomic_base_impl.44" }61%"struct.std::__1::__cxx_atomic_base_impl.44" = type { i128 }62%"struct.std::__1::atomic.45" = type { %"struct.std::__1::__atomic_base.46" }63%"struct.std::__1::__atomic_base.46" = type { %"struct.std::__1::__atomic_base.47" }64%"struct.std::__1::__atomic_base.47" = type { %"struct.std::__1::__cxx_atomic_impl.48" }65%"struct.std::__1::__cxx_atomic_impl.48" = type { %"struct.std::__1::__cxx_atomic_base_impl.49" }66%"struct.std::__1::__cxx_atomic_base_impl.49" = type { i128 }67 68@gv_i1 = global %"struct.std::__1::atomic" zeroinitializer, align 469@gv_i8 = global %"struct.std::__1::atomic.0" zeroinitializer, align 470@gv_u8 = global %"struct.std::__1::atomic.5" zeroinitializer, align 471@gv_i16 = global %"struct.std::__1::atomic.10" zeroinitializer, align 472@gv_u16 = global %"struct.std::__1::atomic.15" zeroinitializer, align 473@gv_i32 = global %"struct.std::__1::atomic.20" zeroinitializer, align 474@gv_u32 = global %"struct.std::__1::atomic.25" zeroinitializer, align 475@gv_i64 = global %"struct.std::__1::atomic.30" zeroinitializer, align 876@gv_u64 = global %"struct.std::__1::atomic.35" zeroinitializer, align 877@gv_i128 = global %"struct.std::__1::atomic.40" zeroinitializer, align 1678@gv_u128 = global %"struct.std::__1::atomic.45" zeroinitializer, align 1679 80; Function Attrs: nofree norecurse nounwind mustprogress81define zeroext i1 @_Z26atomic_cmp_swap_relaxed_i1RNSt3__16atomicIbEERbb(ptr nocapture nonnull align 1 dereferenceable(1) %arg, ptr nocapture nonnull align 1 dereferenceable(1) %arg1, i1 zeroext %arg2) {82; CHECK-LABEL: _Z26atomic_cmp_swap_relaxed_i1RNSt3__16atomicIbEERbb:83; CHECK:       # %bb.0: # %bb84; CHECK-NEXT:    ld1b.zx %s4, (, %s1)85; CHECK-NEXT:    and %s3, -4, %s086; CHECK-NEXT:    and %s0, 3, %s087; CHECK-NEXT:    sla.w.sx %s0, %s0, 388; CHECK-NEXT:    ldl.sx %s5, (, %s3)89; CHECK-NEXT:    sla.w.sx %s6, (56)0, %s090; CHECK-NEXT:    sla.w.sx %s2, %s2, %s091; CHECK-NEXT:    sla.w.sx %s4, %s4, %s092; CHECK-NEXT:    nnd %s5, %s6, %s593; CHECK-NEXT:    and %s5, %s5, (32)094; CHECK-NEXT:    or %s2, %s5, %s295; CHECK-NEXT:    or %s4, %s5, %s496; CHECK-NEXT:    cas.w %s2, (%s3), %s497; CHECK-NEXT:    cmps.w.sx %s4, %s2, %s498; CHECK-NEXT:    or %s3, 0, (0)199; CHECK-NEXT:    cmov.w.eq %s3, (63)0, %s4100; CHECK-NEXT:    brne.w 0, %s3, .LBB0_2101; CHECK-NEXT:  # %bb.1: # %bb7102; CHECK-NEXT:    and %s2, %s2, (32)0103; CHECK-NEXT:    srl %s0, %s2, %s0104; CHECK-NEXT:    st1b %s0, (, %s1)105; CHECK-NEXT:  .LBB0_2: # %bb9106; CHECK-NEXT:    adds.w.zx %s0, %s3, (0)1107; CHECK-NEXT:    b.l.t (, %s10)108bb:109  %i = zext i1 %arg2 to i8110  %i4 = load i8, ptr %arg1, align 1111  %i5 = cmpxchg weak ptr %arg, i8 %i4, i8 %i monotonic monotonic, align 1112  %i6 = extractvalue { i8, i1 } %i5, 1113  br i1 %i6, label %bb9, label %bb7114 115bb7:                                              ; preds = %bb116  %i8 = extractvalue { i8, i1 } %i5, 0117  store i8 %i8, ptr %arg1, align 1118  br label %bb9119 120bb9:                                              ; preds = %bb7, %bb121  ret i1 %i6122}123 124; Function Attrs: nofree norecurse nounwind mustprogress125define signext i8 @_Z26atomic_cmp_swap_relaxed_i8RNSt3__16atomicIcEERcc(ptr nocapture nonnull align 1 dereferenceable(1) %arg, ptr nocapture nonnull align 1 dereferenceable(1) %arg1, i8 signext %arg2) {126; CHECK-LABEL: _Z26atomic_cmp_swap_relaxed_i8RNSt3__16atomicIcEERcc:127; CHECK:       # %bb.0: # %bb128; CHECK-NEXT:    ld1b.zx %s4, (, %s1)129; CHECK-NEXT:    and %s3, -4, %s0130; CHECK-NEXT:    and %s0, 3, %s0131; CHECK-NEXT:    sla.w.sx %s0, %s0, 3132; CHECK-NEXT:    sla.w.sx %s5, (56)0, %s0133; CHECK-NEXT:    ldl.sx %s6, (, %s3)134; CHECK-NEXT:    and %s2, %s2, (56)0135; CHECK-NEXT:    sla.w.sx %s2, %s2, %s0136; CHECK-NEXT:    sla.w.sx %s4, %s4, %s0137; CHECK-NEXT:    nnd %s5, %s5, %s6138; CHECK-NEXT:    and %s5, %s5, (32)0139; CHECK-NEXT:    or %s2, %s5, %s2140; CHECK-NEXT:    or %s4, %s5, %s4141; CHECK-NEXT:    cas.w %s2, (%s3), %s4142; CHECK-NEXT:    cmps.w.sx %s4, %s2, %s4143; CHECK-NEXT:    or %s3, 0, (0)1144; CHECK-NEXT:    cmov.w.eq %s3, (63)0, %s4145; CHECK-NEXT:    brne.w 0, %s3, .LBB1_2146; CHECK-NEXT:  # %bb.1: # %bb6147; CHECK-NEXT:    and %s2, %s2, (32)0148; CHECK-NEXT:    srl %s0, %s2, %s0149; CHECK-NEXT:    st1b %s0, (, %s1)150; CHECK-NEXT:  .LBB1_2: # %bb8151; CHECK-NEXT:    adds.w.zx %s0, %s3, (0)1152; CHECK-NEXT:    b.l.t (, %s10)153bb:154  %i3 = load i8, ptr %arg1, align 1155  %i4 = cmpxchg weak ptr %arg, i8 %i3, i8 %arg2 monotonic monotonic, align 1156  %i5 = extractvalue { i8, i1 } %i4, 1157  br i1 %i5, label %bb8, label %bb6158 159bb6:                                              ; preds = %bb160  %i7 = extractvalue { i8, i1 } %i4, 0161  store i8 %i7, ptr %arg1, align 1162  br label %bb8163 164bb8:                                              ; preds = %bb6, %bb165  %i9 = zext i1 %i5 to i8166  ret i8 %i9167}168 169; Function Attrs: nofree norecurse nounwind mustprogress170define zeroext i8 @_Z26atomic_cmp_swap_relaxed_u8RNSt3__16atomicIhEERhh(ptr nocapture nonnull align 1 dereferenceable(1) %arg, ptr nocapture nonnull align 1 dereferenceable(1) %arg1, i8 zeroext %arg2) {171; CHECK-LABEL: _Z26atomic_cmp_swap_relaxed_u8RNSt3__16atomicIhEERhh:172; CHECK:       # %bb.0: # %bb173; CHECK-NEXT:    ld1b.zx %s4, (, %s1)174; CHECK-NEXT:    and %s3, -4, %s0175; CHECK-NEXT:    and %s0, 3, %s0176; CHECK-NEXT:    sla.w.sx %s0, %s0, 3177; CHECK-NEXT:    ldl.sx %s5, (, %s3)178; CHECK-NEXT:    sla.w.sx %s6, (56)0, %s0179; CHECK-NEXT:    sla.w.sx %s2, %s2, %s0180; CHECK-NEXT:    sla.w.sx %s4, %s4, %s0181; CHECK-NEXT:    nnd %s5, %s6, %s5182; CHECK-NEXT:    and %s5, %s5, (32)0183; CHECK-NEXT:    or %s2, %s5, %s2184; CHECK-NEXT:    or %s4, %s5, %s4185; CHECK-NEXT:    cas.w %s2, (%s3), %s4186; CHECK-NEXT:    cmps.w.sx %s4, %s2, %s4187; CHECK-NEXT:    or %s3, 0, (0)1188; CHECK-NEXT:    cmov.w.eq %s3, (63)0, %s4189; CHECK-NEXT:    brne.w 0, %s3, .LBB2_2190; CHECK-NEXT:  # %bb.1: # %bb6191; CHECK-NEXT:    and %s2, %s2, (32)0192; CHECK-NEXT:    srl %s0, %s2, %s0193; CHECK-NEXT:    st1b %s0, (, %s1)194; CHECK-NEXT:  .LBB2_2: # %bb8195; CHECK-NEXT:    adds.w.zx %s0, %s3, (0)1196; CHECK-NEXT:    b.l.t (, %s10)197bb:198  %i3 = load i8, ptr %arg1, align 1199  %i4 = cmpxchg weak ptr %arg, i8 %i3, i8 %arg2 monotonic monotonic, align 1200  %i5 = extractvalue { i8, i1 } %i4, 1201  br i1 %i5, label %bb8, label %bb6202 203bb6:                                              ; preds = %bb204  %i7 = extractvalue { i8, i1 } %i4, 0205  store i8 %i7, ptr %arg1, align 1206  br label %bb8207 208bb8:                                              ; preds = %bb6, %bb209  %i9 = zext i1 %i5 to i8210  ret i8 %i9211}212 213; Function Attrs: nofree norecurse nounwind mustprogress214define signext i16 @_Z27atomic_cmp_swap_relaxed_i16RNSt3__16atomicIsEERss(ptr nocapture nonnull align 2 dereferenceable(2) %arg, ptr nocapture nonnull align 2 dereferenceable(2) %arg1, i16 signext %arg2) {215; CHECK-LABEL: _Z27atomic_cmp_swap_relaxed_i16RNSt3__16atomicIsEERss:216; CHECK:       # %bb.0: # %bb217; CHECK-NEXT:    ld2b.zx %s4, (, %s1)218; CHECK-NEXT:    and %s3, -4, %s0219; CHECK-NEXT:    and %s0, 3, %s0220; CHECK-NEXT:    sla.w.sx %s0, %s0, 3221; CHECK-NEXT:    sla.w.sx %s5, (48)0, %s0222; CHECK-NEXT:    ldl.sx %s6, (, %s3)223; CHECK-NEXT:    and %s2, %s2, (48)0224; CHECK-NEXT:    sla.w.sx %s2, %s2, %s0225; CHECK-NEXT:    sla.w.sx %s4, %s4, %s0226; CHECK-NEXT:    nnd %s5, %s5, %s6227; CHECK-NEXT:    and %s5, %s5, (32)0228; CHECK-NEXT:    or %s2, %s5, %s2229; CHECK-NEXT:    or %s4, %s5, %s4230; CHECK-NEXT:    cas.w %s2, (%s3), %s4231; CHECK-NEXT:    cmps.w.sx %s4, %s2, %s4232; CHECK-NEXT:    or %s3, 0, (0)1233; CHECK-NEXT:    cmov.w.eq %s3, (63)0, %s4234; CHECK-NEXT:    brne.w 0, %s3, .LBB3_2235; CHECK-NEXT:  # %bb.1: # %bb6236; CHECK-NEXT:    and %s2, %s2, (32)0237; CHECK-NEXT:    srl %s0, %s2, %s0238; CHECK-NEXT:    st2b %s0, (, %s1)239; CHECK-NEXT:  .LBB3_2: # %bb8240; CHECK-NEXT:    adds.w.zx %s0, %s3, (0)1241; CHECK-NEXT:    b.l.t (, %s10)242bb:243  %i3 = load i16, ptr %arg1, align 2244  %i4 = cmpxchg weak ptr %arg, i16 %i3, i16 %arg2 monotonic monotonic, align 2245  %i5 = extractvalue { i16, i1 } %i4, 1246  br i1 %i5, label %bb8, label %bb6247 248bb6:                                              ; preds = %bb249  %i7 = extractvalue { i16, i1 } %i4, 0250  store i16 %i7, ptr %arg1, align 2251  br label %bb8252 253bb8:                                              ; preds = %bb6, %bb254  %i9 = zext i1 %i5 to i16255  ret i16 %i9256}257 258; Function Attrs: nofree norecurse nounwind mustprogress259define zeroext i16 @_Z27atomic_cmp_swap_relaxed_u16RNSt3__16atomicItEERtt(ptr nocapture nonnull align 2 dereferenceable(2) %arg, ptr nocapture nonnull align 2 dereferenceable(2) %arg1, i16 zeroext %arg2) {260; CHECK-LABEL: _Z27atomic_cmp_swap_relaxed_u16RNSt3__16atomicItEERtt:261; CHECK:       # %bb.0: # %bb262; CHECK-NEXT:    ld2b.zx %s4, (, %s1)263; CHECK-NEXT:    and %s3, -4, %s0264; CHECK-NEXT:    and %s0, 3, %s0265; CHECK-NEXT:    sla.w.sx %s0, %s0, 3266; CHECK-NEXT:    ldl.sx %s5, (, %s3)267; CHECK-NEXT:    sla.w.sx %s6, (48)0, %s0268; CHECK-NEXT:    sla.w.sx %s2, %s2, %s0269; CHECK-NEXT:    sla.w.sx %s4, %s4, %s0270; CHECK-NEXT:    nnd %s5, %s6, %s5271; CHECK-NEXT:    and %s5, %s5, (32)0272; CHECK-NEXT:    or %s2, %s5, %s2273; CHECK-NEXT:    or %s4, %s5, %s4274; CHECK-NEXT:    cas.w %s2, (%s3), %s4275; CHECK-NEXT:    cmps.w.sx %s4, %s2, %s4276; CHECK-NEXT:    or %s3, 0, (0)1277; CHECK-NEXT:    cmov.w.eq %s3, (63)0, %s4278; CHECK-NEXT:    brne.w 0, %s3, .LBB4_2279; CHECK-NEXT:  # %bb.1: # %bb6280; CHECK-NEXT:    and %s2, %s2, (32)0281; CHECK-NEXT:    srl %s0, %s2, %s0282; CHECK-NEXT:    st2b %s0, (, %s1)283; CHECK-NEXT:  .LBB4_2: # %bb8284; CHECK-NEXT:    adds.w.zx %s0, %s3, (0)1285; CHECK-NEXT:    b.l.t (, %s10)286bb:287  %i3 = load i16, ptr %arg1, align 2288  %i4 = cmpxchg weak ptr %arg, i16 %i3, i16 %arg2 monotonic monotonic, align 2289  %i5 = extractvalue { i16, i1 } %i4, 1290  br i1 %i5, label %bb8, label %bb6291 292bb6:                                              ; preds = %bb293  %i7 = extractvalue { i16, i1 } %i4, 0294  store i16 %i7, ptr %arg1, align 2295  br label %bb8296 297bb8:                                              ; preds = %bb6, %bb298  %i9 = zext i1 %i5 to i16299  ret i16 %i9300}301 302; Function Attrs: nofree norecurse nounwind mustprogress303define signext i32 @_Z27atomic_cmp_swap_relaxed_i32RNSt3__16atomicIiEERii(ptr nocapture nonnull align 4 dereferenceable(4) %arg, ptr nocapture nonnull align 4 dereferenceable(4) %arg1, i32 signext %arg2) {304; CHECK-LABEL: _Z27atomic_cmp_swap_relaxed_i32RNSt3__16atomicIiEERii:305; CHECK:       # %bb.0: # %bb306; CHECK-NEXT:    ldl.sx %s3, (, %s1)307; CHECK-NEXT:    cas.w %s2, (%s0), %s3308; CHECK-NEXT:    cmps.w.sx %s4, %s2, %s3309; CHECK-NEXT:    or %s0, 0, (0)1310; CHECK-NEXT:    cmov.w.eq %s0, (63)0, %s4311; CHECK-NEXT:    breq.w %s2, %s3, .LBB5_2312; CHECK-NEXT:  # %bb.1: # %bb6313; CHECK-NEXT:    stl %s2, (, %s1)314; CHECK-NEXT:  .LBB5_2: # %bb8315; CHECK-NEXT:    adds.w.zx %s0, %s0, (0)1316; CHECK-NEXT:    b.l.t (, %s10)317bb:318  %i3 = load i32, ptr %arg1, align 4319  %i4 = cmpxchg weak ptr %arg, i32 %i3, i32 %arg2 monotonic monotonic, align 4320  %i5 = extractvalue { i32, i1 } %i4, 1321  br i1 %i5, label %bb8, label %bb6322 323bb6:                                              ; preds = %bb324  %i7 = extractvalue { i32, i1 } %i4, 0325  store i32 %i7, ptr %arg1, align 4326  br label %bb8327 328bb8:                                              ; preds = %bb6, %bb329  %i9 = zext i1 %i5 to i32330  ret i32 %i9331}332 333; Function Attrs: nofree norecurse nounwind mustprogress334define zeroext i32 @_Z27atomic_cmp_swap_relaxed_u32RNSt3__16atomicIjEERjj(ptr nocapture nonnull align 4 dereferenceable(4) %arg, ptr nocapture nonnull align 4 dereferenceable(4) %arg1, i32 zeroext %arg2) {335; CHECK-LABEL: _Z27atomic_cmp_swap_relaxed_u32RNSt3__16atomicIjEERjj:336; CHECK:       # %bb.0: # %bb337; CHECK-NEXT:    ldl.sx %s3, (, %s1)338; CHECK-NEXT:    cas.w %s2, (%s0), %s3339; CHECK-NEXT:    cmps.w.sx %s4, %s2, %s3340; CHECK-NEXT:    or %s0, 0, (0)1341; CHECK-NEXT:    cmov.w.eq %s0, (63)0, %s4342; CHECK-NEXT:    breq.w %s2, %s3, .LBB6_2343; CHECK-NEXT:  # %bb.1: # %bb6344; CHECK-NEXT:    stl %s2, (, %s1)345; CHECK-NEXT:  .LBB6_2: # %bb8346; CHECK-NEXT:    adds.w.zx %s0, %s0, (0)1347; CHECK-NEXT:    b.l.t (, %s10)348bb:349  %i3 = load i32, ptr %arg1, align 4350  %i4 = cmpxchg weak ptr %arg, i32 %i3, i32 %arg2 monotonic monotonic, align 4351  %i5 = extractvalue { i32, i1 } %i4, 1352  br i1 %i5, label %bb8, label %bb6353 354bb6:                                              ; preds = %bb355  %i7 = extractvalue { i32, i1 } %i4, 0356  store i32 %i7, ptr %arg1, align 4357  br label %bb8358 359bb8:                                              ; preds = %bb6, %bb360  %i9 = zext i1 %i5 to i32361  ret i32 %i9362}363 364; Function Attrs: nofree norecurse nounwind mustprogress365define i64 @_Z27atomic_cmp_swap_relaxed_i64RNSt3__16atomicIlEERll(ptr nocapture nonnull align 8 dereferenceable(8) %arg, ptr nocapture nonnull align 8 dereferenceable(8) %arg1, i64 %arg2) {366; CHECK-LABEL: _Z27atomic_cmp_swap_relaxed_i64RNSt3__16atomicIlEERll:367; CHECK:       # %bb.0: # %bb368; CHECK-NEXT:    ld %s3, (, %s1)369; CHECK-NEXT:    cas.l %s2, (%s0), %s3370; CHECK-NEXT:    cmps.l %s4, %s2, %s3371; CHECK-NEXT:    or %s0, 0, (0)1372; CHECK-NEXT:    cmov.l.eq %s0, (63)0, %s4373; CHECK-NEXT:    breq.l %s2, %s3, .LBB7_2374; CHECK-NEXT:  # %bb.1: # %bb6375; CHECK-NEXT:    st %s2, (, %s1)376; CHECK-NEXT:  .LBB7_2: # %bb8377; CHECK-NEXT:    adds.w.zx %s0, %s0, (0)1378; CHECK-NEXT:    b.l.t (, %s10)379bb:380  %i3 = load i64, ptr %arg1, align 8381  %i4 = cmpxchg weak ptr %arg, i64 %i3, i64 %arg2 monotonic monotonic, align 8382  %i5 = extractvalue { i64, i1 } %i4, 1383  br i1 %i5, label %bb8, label %bb6384 385bb6:                                              ; preds = %bb386  %i7 = extractvalue { i64, i1 } %i4, 0387  store i64 %i7, ptr %arg1, align 8388  br label %bb8389 390bb8:                                              ; preds = %bb6, %bb391  %i9 = zext i1 %i5 to i64392  ret i64 %i9393}394 395; Function Attrs: nofree norecurse nounwind mustprogress396define i64 @_Z27atomic_cmp_swap_relaxed_u64RNSt3__16atomicImEERmm(ptr nocapture nonnull align 8 dereferenceable(8) %arg, ptr nocapture nonnull align 8 dereferenceable(8) %arg1, i64 %arg2) {397; CHECK-LABEL: _Z27atomic_cmp_swap_relaxed_u64RNSt3__16atomicImEERmm:398; CHECK:       # %bb.0: # %bb399; CHECK-NEXT:    ld %s3, (, %s1)400; CHECK-NEXT:    cas.l %s2, (%s0), %s3401; CHECK-NEXT:    cmps.l %s4, %s2, %s3402; CHECK-NEXT:    or %s0, 0, (0)1403; CHECK-NEXT:    cmov.l.eq %s0, (63)0, %s4404; CHECK-NEXT:    breq.l %s2, %s3, .LBB8_2405; CHECK-NEXT:  # %bb.1: # %bb6406; CHECK-NEXT:    st %s2, (, %s1)407; CHECK-NEXT:  .LBB8_2: # %bb8408; CHECK-NEXT:    adds.w.zx %s0, %s0, (0)1409; CHECK-NEXT:    b.l.t (, %s10)410bb:411  %i3 = load i64, ptr %arg1, align 8412  %i4 = cmpxchg weak ptr %arg, i64 %i3, i64 %arg2 monotonic monotonic, align 8413  %i5 = extractvalue { i64, i1 } %i4, 1414  br i1 %i5, label %bb8, label %bb6415 416bb6:                                              ; preds = %bb417  %i7 = extractvalue { i64, i1 } %i4, 0418  store i64 %i7, ptr %arg1, align 8419  br label %bb8420 421bb8:                                              ; preds = %bb6, %bb422  %i9 = zext i1 %i5 to i64423  ret i64 %i9424}425 426; Function Attrs: nounwind mustprogress427define i128 @_Z28atomic_cmp_swap_relaxed_i128RNSt3__16atomicInEERnn(ptr nonnull align 16 dereferenceable(16) %arg, ptr nonnull align 16 dereferenceable(16) %arg1, i128 %arg2) {428; CHECK-LABEL: _Z28atomic_cmp_swap_relaxed_i128RNSt3__16atomicInEERnn:429; CHECK:       # %bb.0: # %bb430; CHECK-NEXT:    st %s9, (, %s11)431; CHECK-NEXT:    st %s10, 8(, %s11)432; CHECK-NEXT:    or %s9, 0, %s11433; CHECK-NEXT:    lea %s11, -256(, %s11)434; CHECK-NEXT:    brge.l.t %s11, %s8, .LBB9_2435; CHECK-NEXT:  # %bb.1: # %bb436; CHECK-NEXT:    ld %s61, 24(, %s14)437; CHECK-NEXT:    or %s62, 0, %s0438; CHECK-NEXT:    lea %s63, 315439; CHECK-NEXT:    shm.l %s63, (%s61)440; CHECK-NEXT:    shm.l %s8, 8(%s61)441; CHECK-NEXT:    shm.l %s11, 16(%s61)442; CHECK-NEXT:    monc443; CHECK-NEXT:    or %s0, 0, %s62444; CHECK-NEXT:  .LBB9_2: # %bb445; CHECK-NEXT:    or %s6, 0, %s1446; CHECK-NEXT:    or %s1, 0, %s0447; CHECK-NEXT:    st %s3, 248(, %s11)448; CHECK-NEXT:    st %s2, 240(, %s11)449; CHECK-NEXT:    lea %s0, __atomic_compare_exchange@lo450; CHECK-NEXT:    and %s0, %s0, (32)0451; CHECK-NEXT:    lea.sl %s12, __atomic_compare_exchange@hi(, %s0)452; CHECK-NEXT:    lea %s3, 240(, %s11)453; CHECK-NEXT:    or %s0, 16, (0)1454; CHECK-NEXT:    or %s4, 0, (0)1455; CHECK-NEXT:    or %s5, 0, (0)1456; CHECK-NEXT:    or %s2, 0, %s6457; CHECK-NEXT:    bsic %s10, (, %s12)458; CHECK-NEXT:    or %s1, 0, (0)1459; CHECK-NEXT:    or %s11, 0, %s9460; CHECK-NEXT:    ld %s10, 8(, %s11)461; CHECK-NEXT:    ld %s9, (, %s11)462; CHECK-NEXT:    b.l.t (, %s10)463bb:464  %i = alloca i128, align 16465  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %i)466  store i128 %arg2, ptr %i, align 16, !tbaa !0467  %i6 = call zeroext i1 @__atomic_compare_exchange(i64 16, ptr nonnull %arg, ptr nonnull %arg1, ptr nonnull %i, i32 signext 0, i32 signext 0)468  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %i)469  %i7 = zext i1 %i6 to i128470  ret i128 %i7471}472 473; Function Attrs: nounwind mustprogress474define i128 @_Z28atomic_cmp_swap_relaxed_u128RNSt3__16atomicIoEERoo(ptr nonnull align 16 dereferenceable(16) %arg, ptr nonnull align 16 dereferenceable(16) %arg1, i128 %arg2) {475; CHECK-LABEL: _Z28atomic_cmp_swap_relaxed_u128RNSt3__16atomicIoEERoo:476; CHECK:       # %bb.0: # %bb477; CHECK-NEXT:    st %s9, (, %s11)478; CHECK-NEXT:    st %s10, 8(, %s11)479; CHECK-NEXT:    or %s9, 0, %s11480; CHECK-NEXT:    lea %s11, -256(, %s11)481; CHECK-NEXT:    brge.l.t %s11, %s8, .LBB10_2482; CHECK-NEXT:  # %bb.1: # %bb483; CHECK-NEXT:    ld %s61, 24(, %s14)484; CHECK-NEXT:    or %s62, 0, %s0485; CHECK-NEXT:    lea %s63, 315486; CHECK-NEXT:    shm.l %s63, (%s61)487; CHECK-NEXT:    shm.l %s8, 8(%s61)488; CHECK-NEXT:    shm.l %s11, 16(%s61)489; CHECK-NEXT:    monc490; CHECK-NEXT:    or %s0, 0, %s62491; CHECK-NEXT:  .LBB10_2: # %bb492; CHECK-NEXT:    or %s6, 0, %s1493; CHECK-NEXT:    or %s1, 0, %s0494; CHECK-NEXT:    st %s3, 248(, %s11)495; CHECK-NEXT:    st %s2, 240(, %s11)496; CHECK-NEXT:    lea %s0, __atomic_compare_exchange@lo497; CHECK-NEXT:    and %s0, %s0, (32)0498; CHECK-NEXT:    lea.sl %s12, __atomic_compare_exchange@hi(, %s0)499; CHECK-NEXT:    lea %s3, 240(, %s11)500; CHECK-NEXT:    or %s0, 16, (0)1501; CHECK-NEXT:    or %s4, 0, (0)1502; CHECK-NEXT:    or %s5, 0, (0)1503; CHECK-NEXT:    or %s2, 0, %s6504; CHECK-NEXT:    bsic %s10, (, %s12)505; CHECK-NEXT:    or %s1, 0, (0)1506; CHECK-NEXT:    or %s11, 0, %s9507; CHECK-NEXT:    ld %s10, 8(, %s11)508; CHECK-NEXT:    ld %s9, (, %s11)509; CHECK-NEXT:    b.l.t (, %s10)510bb:511  %i = alloca i128, align 16512  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %i)513  store i128 %arg2, ptr %i, align 16, !tbaa !0514  %i6 = call zeroext i1 @__atomic_compare_exchange(i64 16, ptr nonnull %arg, ptr nonnull %arg1, ptr nonnull %i, i32 signext 0, i32 signext 0)515  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %i)516  %i7 = zext i1 %i6 to i128517  ret i128 %i7518}519 520; Function Attrs: nofree norecurse nounwind mustprogress521define zeroext i1 @_Z26atomic_cmp_swap_acquire_i1RNSt3__16atomicIbEERbb(ptr nocapture nonnull align 1 dereferenceable(1) %arg, ptr nocapture nonnull align 1 dereferenceable(1) %arg1, i1 zeroext %arg2) {522; CHECK-LABEL: _Z26atomic_cmp_swap_acquire_i1RNSt3__16atomicIbEERbb:523; CHECK:       # %bb.0: # %bb524; CHECK-NEXT:    ld1b.zx %s4, (, %s1)525; CHECK-NEXT:    and %s3, -4, %s0526; CHECK-NEXT:    and %s0, 3, %s0527; CHECK-NEXT:    sla.w.sx %s0, %s0, 3528; CHECK-NEXT:    ldl.sx %s5, (, %s3)529; CHECK-NEXT:    sla.w.sx %s6, (56)0, %s0530; CHECK-NEXT:    sla.w.sx %s2, %s2, %s0531; CHECK-NEXT:    sla.w.sx %s4, %s4, %s0532; CHECK-NEXT:    nnd %s5, %s6, %s5533; CHECK-NEXT:    and %s5, %s5, (32)0534; CHECK-NEXT:    or %s2, %s5, %s2535; CHECK-NEXT:    or %s4, %s5, %s4536; CHECK-NEXT:    cas.w %s2, (%s3), %s4537; CHECK-NEXT:    cmps.w.sx %s4, %s2, %s4538; CHECK-NEXT:    or %s3, 0, (0)1539; CHECK-NEXT:    cmov.w.eq %s3, (63)0, %s4540; CHECK-NEXT:    fencem 2541; CHECK-NEXT:    brne.w 0, %s3, .LBB11_2542; CHECK-NEXT:  # %bb.1: # %bb7543; CHECK-NEXT:    and %s2, %s2, (32)0544; CHECK-NEXT:    srl %s0, %s2, %s0545; CHECK-NEXT:    st1b %s0, (, %s1)546; CHECK-NEXT:  .LBB11_2: # %bb9547; CHECK-NEXT:    adds.w.zx %s0, %s3, (0)1548; CHECK-NEXT:    b.l.t (, %s10)549bb:550  %i = zext i1 %arg2 to i8551  %i4 = load i8, ptr %arg1, align 1552  %i5 = cmpxchg weak ptr %arg, i8 %i4, i8 %i acquire acquire, align 1553  %i6 = extractvalue { i8, i1 } %i5, 1554  br i1 %i6, label %bb9, label %bb7555 556bb7:                                              ; preds = %bb557  %i8 = extractvalue { i8, i1 } %i5, 0558  store i8 %i8, ptr %arg1, align 1559  br label %bb9560 561bb9:                                              ; preds = %bb7, %bb562  ret i1 %i6563}564 565; Function Attrs: nofree norecurse nounwind mustprogress566define signext i8 @_Z26atomic_cmp_swap_acquire_i8RNSt3__16atomicIcEERcc(ptr nocapture nonnull align 1 dereferenceable(1) %arg, ptr nocapture nonnull align 1 dereferenceable(1) %arg1, i8 signext %arg2) {567; CHECK-LABEL: _Z26atomic_cmp_swap_acquire_i8RNSt3__16atomicIcEERcc:568; CHECK:       # %bb.0: # %bb569; CHECK-NEXT:    ld1b.zx %s4, (, %s1)570; CHECK-NEXT:    and %s3, -4, %s0571; CHECK-NEXT:    and %s0, 3, %s0572; CHECK-NEXT:    sla.w.sx %s0, %s0, 3573; CHECK-NEXT:    sla.w.sx %s5, (56)0, %s0574; CHECK-NEXT:    ldl.sx %s6, (, %s3)575; CHECK-NEXT:    and %s2, %s2, (56)0576; CHECK-NEXT:    sla.w.sx %s2, %s2, %s0577; CHECK-NEXT:    sla.w.sx %s4, %s4, %s0578; CHECK-NEXT:    nnd %s5, %s5, %s6579; CHECK-NEXT:    and %s5, %s5, (32)0580; CHECK-NEXT:    or %s2, %s5, %s2581; CHECK-NEXT:    or %s4, %s5, %s4582; CHECK-NEXT:    cas.w %s2, (%s3), %s4583; CHECK-NEXT:    cmps.w.sx %s4, %s2, %s4584; CHECK-NEXT:    or %s3, 0, (0)1585; CHECK-NEXT:    cmov.w.eq %s3, (63)0, %s4586; CHECK-NEXT:    fencem 2587; CHECK-NEXT:    brne.w 0, %s3, .LBB12_2588; CHECK-NEXT:  # %bb.1: # %bb6589; CHECK-NEXT:    and %s2, %s2, (32)0590; CHECK-NEXT:    srl %s0, %s2, %s0591; CHECK-NEXT:    st1b %s0, (, %s1)592; CHECK-NEXT:  .LBB12_2: # %bb8593; CHECK-NEXT:    adds.w.zx %s0, %s3, (0)1594; CHECK-NEXT:    b.l.t (, %s10)595bb:596  %i3 = load i8, ptr %arg1, align 1597  %i4 = cmpxchg weak ptr %arg, i8 %i3, i8 %arg2 acquire acquire, align 1598  %i5 = extractvalue { i8, i1 } %i4, 1599  br i1 %i5, label %bb8, label %bb6600 601bb6:                                              ; preds = %bb602  %i7 = extractvalue { i8, i1 } %i4, 0603  store i8 %i7, ptr %arg1, align 1604  br label %bb8605 606bb8:                                              ; preds = %bb6, %bb607  %i9 = zext i1 %i5 to i8608  ret i8 %i9609}610 611; Function Attrs: nofree norecurse nounwind mustprogress612define zeroext i8 @_Z26atomic_cmp_swap_acquire_u8RNSt3__16atomicIhEERhh(ptr nocapture nonnull align 1 dereferenceable(1) %arg, ptr nocapture nonnull align 1 dereferenceable(1) %arg1, i8 zeroext %arg2) {613; CHECK-LABEL: _Z26atomic_cmp_swap_acquire_u8RNSt3__16atomicIhEERhh:614; CHECK:       # %bb.0: # %bb615; CHECK-NEXT:    ld1b.zx %s4, (, %s1)616; CHECK-NEXT:    and %s3, -4, %s0617; CHECK-NEXT:    and %s0, 3, %s0618; CHECK-NEXT:    sla.w.sx %s0, %s0, 3619; CHECK-NEXT:    ldl.sx %s5, (, %s3)620; CHECK-NEXT:    sla.w.sx %s6, (56)0, %s0621; CHECK-NEXT:    sla.w.sx %s2, %s2, %s0622; CHECK-NEXT:    sla.w.sx %s4, %s4, %s0623; CHECK-NEXT:    nnd %s5, %s6, %s5624; CHECK-NEXT:    and %s5, %s5, (32)0625; CHECK-NEXT:    or %s2, %s5, %s2626; CHECK-NEXT:    or %s4, %s5, %s4627; CHECK-NEXT:    cas.w %s2, (%s3), %s4628; CHECK-NEXT:    cmps.w.sx %s4, %s2, %s4629; CHECK-NEXT:    or %s3, 0, (0)1630; CHECK-NEXT:    cmov.w.eq %s3, (63)0, %s4631; CHECK-NEXT:    fencem 2632; CHECK-NEXT:    brne.w 0, %s3, .LBB13_2633; CHECK-NEXT:  # %bb.1: # %bb6634; CHECK-NEXT:    and %s2, %s2, (32)0635; CHECK-NEXT:    srl %s0, %s2, %s0636; CHECK-NEXT:    st1b %s0, (, %s1)637; CHECK-NEXT:  .LBB13_2: # %bb8638; CHECK-NEXT:    adds.w.zx %s0, %s3, (0)1639; CHECK-NEXT:    b.l.t (, %s10)640bb:641  %i3 = load i8, ptr %arg1, align 1642  %i4 = cmpxchg weak ptr %arg, i8 %i3, i8 %arg2 acquire acquire, align 1643  %i5 = extractvalue { i8, i1 } %i4, 1644  br i1 %i5, label %bb8, label %bb6645 646bb6:                                              ; preds = %bb647  %i7 = extractvalue { i8, i1 } %i4, 0648  store i8 %i7, ptr %arg1, align 1649  br label %bb8650 651bb8:                                              ; preds = %bb6, %bb652  %i9 = zext i1 %i5 to i8653  ret i8 %i9654}655 656; Function Attrs: nofree norecurse nounwind mustprogress657define signext i16 @_Z27atomic_cmp_swap_acquire_i16RNSt3__16atomicIsEERss(ptr nocapture nonnull align 2 dereferenceable(2) %arg, ptr nocapture nonnull align 2 dereferenceable(2) %arg1, i16 signext %arg2) {658; CHECK-LABEL: _Z27atomic_cmp_swap_acquire_i16RNSt3__16atomicIsEERss:659; CHECK:       # %bb.0: # %bb660; CHECK-NEXT:    ld2b.zx %s4, (, %s1)661; CHECK-NEXT:    and %s3, -4, %s0662; CHECK-NEXT:    and %s0, 3, %s0663; CHECK-NEXT:    sla.w.sx %s0, %s0, 3664; CHECK-NEXT:    sla.w.sx %s5, (48)0, %s0665; CHECK-NEXT:    ldl.sx %s6, (, %s3)666; CHECK-NEXT:    and %s2, %s2, (48)0667; CHECK-NEXT:    sla.w.sx %s2, %s2, %s0668; CHECK-NEXT:    sla.w.sx %s4, %s4, %s0669; CHECK-NEXT:    nnd %s5, %s5, %s6670; CHECK-NEXT:    and %s5, %s5, (32)0671; CHECK-NEXT:    or %s2, %s5, %s2672; CHECK-NEXT:    or %s4, %s5, %s4673; CHECK-NEXT:    cas.w %s2, (%s3), %s4674; CHECK-NEXT:    cmps.w.sx %s4, %s2, %s4675; CHECK-NEXT:    or %s3, 0, (0)1676; CHECK-NEXT:    cmov.w.eq %s3, (63)0, %s4677; CHECK-NEXT:    fencem 2678; CHECK-NEXT:    brne.w 0, %s3, .LBB14_2679; CHECK-NEXT:  # %bb.1: # %bb6680; CHECK-NEXT:    and %s2, %s2, (32)0681; CHECK-NEXT:    srl %s0, %s2, %s0682; CHECK-NEXT:    st2b %s0, (, %s1)683; CHECK-NEXT:  .LBB14_2: # %bb8684; CHECK-NEXT:    adds.w.zx %s0, %s3, (0)1685; CHECK-NEXT:    b.l.t (, %s10)686bb:687  %i3 = load i16, ptr %arg1, align 2688  %i4 = cmpxchg weak ptr %arg, i16 %i3, i16 %arg2 acquire acquire, align 2689  %i5 = extractvalue { i16, i1 } %i4, 1690  br i1 %i5, label %bb8, label %bb6691 692bb6:                                              ; preds = %bb693  %i7 = extractvalue { i16, i1 } %i4, 0694  store i16 %i7, ptr %arg1, align 2695  br label %bb8696 697bb8:                                              ; preds = %bb6, %bb698  %i9 = zext i1 %i5 to i16699  ret i16 %i9700}701 702; Function Attrs: nofree norecurse nounwind mustprogress703define zeroext i16 @_Z27atomic_cmp_swap_acquire_u16RNSt3__16atomicItEERtt(ptr nocapture nonnull align 2 dereferenceable(2) %arg, ptr nocapture nonnull align 2 dereferenceable(2) %arg1, i16 zeroext %arg2) {704; CHECK-LABEL: _Z27atomic_cmp_swap_acquire_u16RNSt3__16atomicItEERtt:705; CHECK:       # %bb.0: # %bb706; CHECK-NEXT:    ld2b.zx %s4, (, %s1)707; CHECK-NEXT:    and %s3, -4, %s0708; CHECK-NEXT:    and %s0, 3, %s0709; CHECK-NEXT:    sla.w.sx %s0, %s0, 3710; CHECK-NEXT:    ldl.sx %s5, (, %s3)711; CHECK-NEXT:    sla.w.sx %s6, (48)0, %s0712; CHECK-NEXT:    sla.w.sx %s2, %s2, %s0713; CHECK-NEXT:    sla.w.sx %s4, %s4, %s0714; CHECK-NEXT:    nnd %s5, %s6, %s5715; CHECK-NEXT:    and %s5, %s5, (32)0716; CHECK-NEXT:    or %s2, %s5, %s2717; CHECK-NEXT:    or %s4, %s5, %s4718; CHECK-NEXT:    cas.w %s2, (%s3), %s4719; CHECK-NEXT:    cmps.w.sx %s4, %s2, %s4720; CHECK-NEXT:    or %s3, 0, (0)1721; CHECK-NEXT:    cmov.w.eq %s3, (63)0, %s4722; CHECK-NEXT:    fencem 2723; CHECK-NEXT:    brne.w 0, %s3, .LBB15_2724; CHECK-NEXT:  # %bb.1: # %bb6725; CHECK-NEXT:    and %s2, %s2, (32)0726; CHECK-NEXT:    srl %s0, %s2, %s0727; CHECK-NEXT:    st2b %s0, (, %s1)728; CHECK-NEXT:  .LBB15_2: # %bb8729; CHECK-NEXT:    adds.w.zx %s0, %s3, (0)1730; CHECK-NEXT:    b.l.t (, %s10)731bb:732  %i3 = load i16, ptr %arg1, align 2733  %i4 = cmpxchg weak ptr %arg, i16 %i3, i16 %arg2 acquire acquire, align 2734  %i5 = extractvalue { i16, i1 } %i4, 1735  br i1 %i5, label %bb8, label %bb6736 737bb6:                                              ; preds = %bb738  %i7 = extractvalue { i16, i1 } %i4, 0739  store i16 %i7, ptr %arg1, align 2740  br label %bb8741 742bb8:                                              ; preds = %bb6, %bb743  %i9 = zext i1 %i5 to i16744  ret i16 %i9745}746 747; Function Attrs: nofree norecurse nounwind mustprogress748define signext i32 @_Z27atomic_cmp_swap_acquire_i32RNSt3__16atomicIiEERii(ptr nocapture nonnull align 4 dereferenceable(4) %arg, ptr nocapture nonnull align 4 dereferenceable(4) %arg1, i32 signext %arg2) {749; CHECK-LABEL: _Z27atomic_cmp_swap_acquire_i32RNSt3__16atomicIiEERii:750; CHECK:       # %bb.0: # %bb751; CHECK-NEXT:    ldl.sx %s3, (, %s1)752; CHECK-NEXT:    cas.w %s2, (%s0), %s3753; CHECK-NEXT:    cmps.w.sx %s4, %s2, %s3754; CHECK-NEXT:    or %s0, 0, (0)1755; CHECK-NEXT:    cmov.w.eq %s0, (63)0, %s4756; CHECK-NEXT:    fencem 2757; CHECK-NEXT:    breq.w %s2, %s3, .LBB16_2758; CHECK-NEXT:  # %bb.1: # %bb6759; CHECK-NEXT:    stl %s2, (, %s1)760; CHECK-NEXT:  .LBB16_2: # %bb8761; CHECK-NEXT:    adds.w.zx %s0, %s0, (0)1762; CHECK-NEXT:    b.l.t (, %s10)763bb:764  %i3 = load i32, ptr %arg1, align 4765  %i4 = cmpxchg weak ptr %arg, i32 %i3, i32 %arg2 acquire acquire, align 4766  %i5 = extractvalue { i32, i1 } %i4, 1767  br i1 %i5, label %bb8, label %bb6768 769bb6:                                              ; preds = %bb770  %i7 = extractvalue { i32, i1 } %i4, 0771  store i32 %i7, ptr %arg1, align 4772  br label %bb8773 774bb8:                                              ; preds = %bb6, %bb775  %i9 = zext i1 %i5 to i32776  ret i32 %i9777}778 779; Function Attrs: nofree norecurse nounwind mustprogress780define zeroext i32 @_Z27atomic_cmp_swap_acquire_u32RNSt3__16atomicIjEERjj(ptr nocapture nonnull align 4 dereferenceable(4) %arg, ptr nocapture nonnull align 4 dereferenceable(4) %arg1, i32 zeroext %arg2) {781; CHECK-LABEL: _Z27atomic_cmp_swap_acquire_u32RNSt3__16atomicIjEERjj:782; CHECK:       # %bb.0: # %bb783; CHECK-NEXT:    ldl.sx %s3, (, %s1)784; CHECK-NEXT:    cas.w %s2, (%s0), %s3785; CHECK-NEXT:    cmps.w.sx %s4, %s2, %s3786; CHECK-NEXT:    or %s0, 0, (0)1787; CHECK-NEXT:    cmov.w.eq %s0, (63)0, %s4788; CHECK-NEXT:    fencem 2789; CHECK-NEXT:    breq.w %s2, %s3, .LBB17_2790; CHECK-NEXT:  # %bb.1: # %bb6791; CHECK-NEXT:    stl %s2, (, %s1)792; CHECK-NEXT:  .LBB17_2: # %bb8793; CHECK-NEXT:    adds.w.zx %s0, %s0, (0)1794; CHECK-NEXT:    b.l.t (, %s10)795bb:796  %i3 = load i32, ptr %arg1, align 4797  %i4 = cmpxchg weak ptr %arg, i32 %i3, i32 %arg2 acquire acquire, align 4798  %i5 = extractvalue { i32, i1 } %i4, 1799  br i1 %i5, label %bb8, label %bb6800 801bb6:                                              ; preds = %bb802  %i7 = extractvalue { i32, i1 } %i4, 0803  store i32 %i7, ptr %arg1, align 4804  br label %bb8805 806bb8:                                              ; preds = %bb6, %bb807  %i9 = zext i1 %i5 to i32808  ret i32 %i9809}810 811; Function Attrs: nofree norecurse nounwind mustprogress812define i64 @_Z27atomic_cmp_swap_acquire_i64RNSt3__16atomicIlEERll(ptr nocapture nonnull align 8 dereferenceable(8) %arg, ptr nocapture nonnull align 8 dereferenceable(8) %arg1, i64 %arg2) {813; CHECK-LABEL: _Z27atomic_cmp_swap_acquire_i64RNSt3__16atomicIlEERll:814; CHECK:       # %bb.0: # %bb815; CHECK-NEXT:    ld %s3, (, %s1)816; CHECK-NEXT:    cas.l %s2, (%s0), %s3817; CHECK-NEXT:    cmps.l %s4, %s2, %s3818; CHECK-NEXT:    or %s0, 0, (0)1819; CHECK-NEXT:    cmov.l.eq %s0, (63)0, %s4820; CHECK-NEXT:    fencem 2821; CHECK-NEXT:    breq.l %s2, %s3, .LBB18_2822; CHECK-NEXT:  # %bb.1: # %bb6823; CHECK-NEXT:    st %s2, (, %s1)824; CHECK-NEXT:  .LBB18_2: # %bb8825; CHECK-NEXT:    adds.w.zx %s0, %s0, (0)1826; CHECK-NEXT:    b.l.t (, %s10)827bb:828  %i3 = load i64, ptr %arg1, align 8829  %i4 = cmpxchg weak ptr %arg, i64 %i3, i64 %arg2 acquire acquire, align 8830  %i5 = extractvalue { i64, i1 } %i4, 1831  br i1 %i5, label %bb8, label %bb6832 833bb6:                                              ; preds = %bb834  %i7 = extractvalue { i64, i1 } %i4, 0835  store i64 %i7, ptr %arg1, align 8836  br label %bb8837 838bb8:                                              ; preds = %bb6, %bb839  %i9 = zext i1 %i5 to i64840  ret i64 %i9841}842 843; Function Attrs: nofree norecurse nounwind mustprogress844define i64 @_Z27atomic_cmp_swap_acquire_u64RNSt3__16atomicImEERmm(ptr nocapture nonnull align 8 dereferenceable(8) %arg, ptr nocapture nonnull align 8 dereferenceable(8) %arg1, i64 %arg2) {845; CHECK-LABEL: _Z27atomic_cmp_swap_acquire_u64RNSt3__16atomicImEERmm:846; CHECK:       # %bb.0: # %bb847; CHECK-NEXT:    ld %s3, (, %s1)848; CHECK-NEXT:    cas.l %s2, (%s0), %s3849; CHECK-NEXT:    cmps.l %s4, %s2, %s3850; CHECK-NEXT:    or %s0, 0, (0)1851; CHECK-NEXT:    cmov.l.eq %s0, (63)0, %s4852; CHECK-NEXT:    fencem 2853; CHECK-NEXT:    breq.l %s2, %s3, .LBB19_2854; CHECK-NEXT:  # %bb.1: # %bb6855; CHECK-NEXT:    st %s2, (, %s1)856; CHECK-NEXT:  .LBB19_2: # %bb8857; CHECK-NEXT:    adds.w.zx %s0, %s0, (0)1858; CHECK-NEXT:    b.l.t (, %s10)859bb:860  %i3 = load i64, ptr %arg1, align 8861  %i4 = cmpxchg weak ptr %arg, i64 %i3, i64 %arg2 acquire acquire, align 8862  %i5 = extractvalue { i64, i1 } %i4, 1863  br i1 %i5, label %bb8, label %bb6864 865bb6:                                              ; preds = %bb866  %i7 = extractvalue { i64, i1 } %i4, 0867  store i64 %i7, ptr %arg1, align 8868  br label %bb8869 870bb8:                                              ; preds = %bb6, %bb871  %i9 = zext i1 %i5 to i64872  ret i64 %i9873}874 875; Function Attrs: nounwind mustprogress876define i128 @_Z28atomic_cmp_swap_acquire_i128RNSt3__16atomicInEERnn(ptr nonnull align 16 dereferenceable(16) %arg, ptr nonnull align 16 dereferenceable(16) %arg1, i128 %arg2) {877; CHECK-LABEL: _Z28atomic_cmp_swap_acquire_i128RNSt3__16atomicInEERnn:878; CHECK:       # %bb.0: # %bb879; CHECK-NEXT:    st %s9, (, %s11)880; CHECK-NEXT:    st %s10, 8(, %s11)881; CHECK-NEXT:    or %s9, 0, %s11882; CHECK-NEXT:    lea %s11, -256(, %s11)883; CHECK-NEXT:    brge.l.t %s11, %s8, .LBB20_2884; CHECK-NEXT:  # %bb.1: # %bb885; CHECK-NEXT:    ld %s61, 24(, %s14)886; CHECK-NEXT:    or %s62, 0, %s0887; CHECK-NEXT:    lea %s63, 315888; CHECK-NEXT:    shm.l %s63, (%s61)889; CHECK-NEXT:    shm.l %s8, 8(%s61)890; CHECK-NEXT:    shm.l %s11, 16(%s61)891; CHECK-NEXT:    monc892; CHECK-NEXT:    or %s0, 0, %s62893; CHECK-NEXT:  .LBB20_2: # %bb894; CHECK-NEXT:    or %s6, 0, %s1895; CHECK-NEXT:    or %s1, 0, %s0896; CHECK-NEXT:    st %s3, 248(, %s11)897; CHECK-NEXT:    st %s2, 240(, %s11)898; CHECK-NEXT:    lea %s0, __atomic_compare_exchange@lo899; CHECK-NEXT:    and %s0, %s0, (32)0900; CHECK-NEXT:    lea.sl %s12, __atomic_compare_exchange@hi(, %s0)901; CHECK-NEXT:    lea %s3, 240(, %s11)902; CHECK-NEXT:    or %s0, 16, (0)1903; CHECK-NEXT:    or %s4, 2, (0)1904; CHECK-NEXT:    or %s5, 2, (0)1905; CHECK-NEXT:    or %s2, 0, %s6906; CHECK-NEXT:    bsic %s10, (, %s12)907; CHECK-NEXT:    or %s1, 0, (0)1908; CHECK-NEXT:    or %s11, 0, %s9909; CHECK-NEXT:    ld %s10, 8(, %s11)910; CHECK-NEXT:    ld %s9, (, %s11)911; CHECK-NEXT:    b.l.t (, %s10)912bb:913  %i = alloca i128, align 16914  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %i)915  store i128 %arg2, ptr %i, align 16, !tbaa !0916  %i6 = call zeroext i1 @__atomic_compare_exchange(i64 16, ptr nonnull %arg, ptr nonnull %arg1, ptr nonnull %i, i32 signext 2, i32 signext 2)917  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %i)918  %i7 = zext i1 %i6 to i128919  ret i128 %i7920}921 922; Function Attrs: nounwind mustprogress923define i128 @_Z28atomic_cmp_swap_acquire_u128RNSt3__16atomicIoEERoo(ptr nonnull align 16 dereferenceable(16) %arg, ptr nonnull align 16 dereferenceable(16) %arg1, i128 %arg2) {924; CHECK-LABEL: _Z28atomic_cmp_swap_acquire_u128RNSt3__16atomicIoEERoo:925; CHECK:       # %bb.0: # %bb926; CHECK-NEXT:    st %s9, (, %s11)927; CHECK-NEXT:    st %s10, 8(, %s11)928; CHECK-NEXT:    or %s9, 0, %s11929; CHECK-NEXT:    lea %s11, -256(, %s11)930; CHECK-NEXT:    brge.l.t %s11, %s8, .LBB21_2931; CHECK-NEXT:  # %bb.1: # %bb932; CHECK-NEXT:    ld %s61, 24(, %s14)933; CHECK-NEXT:    or %s62, 0, %s0934; CHECK-NEXT:    lea %s63, 315935; CHECK-NEXT:    shm.l %s63, (%s61)936; CHECK-NEXT:    shm.l %s8, 8(%s61)937; CHECK-NEXT:    shm.l %s11, 16(%s61)938; CHECK-NEXT:    monc939; CHECK-NEXT:    or %s0, 0, %s62940; CHECK-NEXT:  .LBB21_2: # %bb941; CHECK-NEXT:    or %s6, 0, %s1942; CHECK-NEXT:    or %s1, 0, %s0943; CHECK-NEXT:    st %s3, 248(, %s11)944; CHECK-NEXT:    st %s2, 240(, %s11)945; CHECK-NEXT:    lea %s0, __atomic_compare_exchange@lo946; CHECK-NEXT:    and %s0, %s0, (32)0947; CHECK-NEXT:    lea.sl %s12, __atomic_compare_exchange@hi(, %s0)948; CHECK-NEXT:    lea %s3, 240(, %s11)949; CHECK-NEXT:    or %s0, 16, (0)1950; CHECK-NEXT:    or %s4, 2, (0)1951; CHECK-NEXT:    or %s5, 2, (0)1952; CHECK-NEXT:    or %s2, 0, %s6953; CHECK-NEXT:    bsic %s10, (, %s12)954; CHECK-NEXT:    or %s1, 0, (0)1955; CHECK-NEXT:    or %s11, 0, %s9956; CHECK-NEXT:    ld %s10, 8(, %s11)957; CHECK-NEXT:    ld %s9, (, %s11)958; CHECK-NEXT:    b.l.t (, %s10)959bb:960  %i = alloca i128, align 16961  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %i)962  store i128 %arg2, ptr %i, align 16, !tbaa !0963  %i6 = call zeroext i1 @__atomic_compare_exchange(i64 16, ptr nonnull %arg, ptr nonnull %arg1, ptr nonnull %i, i32 signext 2, i32 signext 2)964  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %i)965  %i7 = zext i1 %i6 to i128966  ret i128 %i7967}968 969; Function Attrs: nofree norecurse nounwind mustprogress970define zeroext i1 @_Z26atomic_cmp_swap_seq_cst_i1RNSt3__16atomicIbEERbb(ptr nocapture nonnull align 1 dereferenceable(1) %arg, ptr nocapture nonnull align 1 dereferenceable(1) %arg1, i1 zeroext %arg2) {971; CHECK-LABEL: _Z26atomic_cmp_swap_seq_cst_i1RNSt3__16atomicIbEERbb:972; CHECK:       # %bb.0: # %bb973; CHECK-NEXT:    ld1b.zx %s4, (, %s1)974; CHECK-NEXT:    fencem 3975; CHECK-NEXT:    and %s3, -4, %s0976; CHECK-NEXT:    and %s0, 3, %s0977; CHECK-NEXT:    sla.w.sx %s0, %s0, 3978; CHECK-NEXT:    ldl.sx %s5, (, %s3)979; CHECK-NEXT:    sla.w.sx %s6, (56)0, %s0980; CHECK-NEXT:    sla.w.sx %s2, %s2, %s0981; CHECK-NEXT:    sla.w.sx %s4, %s4, %s0982; CHECK-NEXT:    nnd %s5, %s6, %s5983; CHECK-NEXT:    and %s5, %s5, (32)0984; CHECK-NEXT:    or %s2, %s5, %s2985; CHECK-NEXT:    or %s4, %s5, %s4986; CHECK-NEXT:    cas.w %s2, (%s3), %s4987; CHECK-NEXT:    cmps.w.sx %s4, %s2, %s4988; CHECK-NEXT:    or %s3, 0, (0)1989; CHECK-NEXT:    cmov.w.eq %s3, (63)0, %s4990; CHECK-NEXT:    fencem 3991; CHECK-NEXT:    brne.w 0, %s3, .LBB22_2992; CHECK-NEXT:  # %bb.1: # %bb7993; CHECK-NEXT:    and %s2, %s2, (32)0994; CHECK-NEXT:    srl %s0, %s2, %s0995; CHECK-NEXT:    st1b %s0, (, %s1)996; CHECK-NEXT:  .LBB22_2: # %bb9997; CHECK-NEXT:    adds.w.zx %s0, %s3, (0)1998; CHECK-NEXT:    b.l.t (, %s10)999bb:1000  %i = zext i1 %arg2 to i81001  %i4 = load i8, ptr %arg1, align 11002  %i5 = cmpxchg weak ptr %arg, i8 %i4, i8 %i seq_cst seq_cst, align 11003  %i6 = extractvalue { i8, i1 } %i5, 11004  br i1 %i6, label %bb9, label %bb71005 1006bb7:                                              ; preds = %bb1007  %i8 = extractvalue { i8, i1 } %i5, 01008  store i8 %i8, ptr %arg1, align 11009  br label %bb91010 1011bb9:                                              ; preds = %bb7, %bb1012  ret i1 %i61013}1014 1015; Function Attrs: nofree norecurse nounwind mustprogress1016define signext i8 @_Z26atomic_cmp_swap_seq_cst_i8RNSt3__16atomicIcEERcc(ptr nocapture nonnull align 1 dereferenceable(1) %arg, ptr nocapture nonnull align 1 dereferenceable(1) %arg1, i8 signext %arg2) {1017; CHECK-LABEL: _Z26atomic_cmp_swap_seq_cst_i8RNSt3__16atomicIcEERcc:1018; CHECK:       # %bb.0: # %bb1019; CHECK-NEXT:    ld1b.zx %s4, (, %s1)1020; CHECK-NEXT:    fencem 31021; CHECK-NEXT:    and %s3, -4, %s01022; CHECK-NEXT:    and %s0, 3, %s01023; CHECK-NEXT:    sla.w.sx %s0, %s0, 31024; CHECK-NEXT:    sla.w.sx %s5, (56)0, %s01025; CHECK-NEXT:    ldl.sx %s6, (, %s3)1026; CHECK-NEXT:    and %s2, %s2, (56)01027; CHECK-NEXT:    sla.w.sx %s2, %s2, %s01028; CHECK-NEXT:    sla.w.sx %s4, %s4, %s01029; CHECK-NEXT:    nnd %s5, %s5, %s61030; CHECK-NEXT:    and %s5, %s5, (32)01031; CHECK-NEXT:    or %s2, %s5, %s21032; CHECK-NEXT:    or %s4, %s5, %s41033; CHECK-NEXT:    cas.w %s2, (%s3), %s41034; CHECK-NEXT:    cmps.w.sx %s4, %s2, %s41035; CHECK-NEXT:    or %s3, 0, (0)11036; CHECK-NEXT:    cmov.w.eq %s3, (63)0, %s41037; CHECK-NEXT:    fencem 31038; CHECK-NEXT:    brne.w 0, %s3, .LBB23_21039; CHECK-NEXT:  # %bb.1: # %bb61040; CHECK-NEXT:    and %s2, %s2, (32)01041; CHECK-NEXT:    srl %s0, %s2, %s01042; CHECK-NEXT:    st1b %s0, (, %s1)1043; CHECK-NEXT:  .LBB23_2: # %bb81044; CHECK-NEXT:    adds.w.zx %s0, %s3, (0)11045; CHECK-NEXT:    b.l.t (, %s10)1046bb:1047  %i3 = load i8, ptr %arg1, align 11048  %i4 = cmpxchg weak ptr %arg, i8 %i3, i8 %arg2 seq_cst seq_cst, align 11049  %i5 = extractvalue { i8, i1 } %i4, 11050  br i1 %i5, label %bb8, label %bb61051 1052bb6:                                              ; preds = %bb1053  %i7 = extractvalue { i8, i1 } %i4, 01054  store i8 %i7, ptr %arg1, align 11055  br label %bb81056 1057bb8:                                              ; preds = %bb6, %bb1058  %i9 = zext i1 %i5 to i81059  ret i8 %i91060}1061 1062; Function Attrs: nofree norecurse nounwind mustprogress1063define zeroext i8 @_Z26atomic_cmp_swap_seq_cst_u8RNSt3__16atomicIhEERhh(ptr nocapture nonnull align 1 dereferenceable(1) %arg, ptr nocapture nonnull align 1 dereferenceable(1) %arg1, i8 zeroext %arg2) {1064; CHECK-LABEL: _Z26atomic_cmp_swap_seq_cst_u8RNSt3__16atomicIhEERhh:1065; CHECK:       # %bb.0: # %bb1066; CHECK-NEXT:    ld1b.zx %s4, (, %s1)1067; CHECK-NEXT:    fencem 31068; CHECK-NEXT:    and %s3, -4, %s01069; CHECK-NEXT:    and %s0, 3, %s01070; CHECK-NEXT:    sla.w.sx %s0, %s0, 31071; CHECK-NEXT:    ldl.sx %s5, (, %s3)1072; CHECK-NEXT:    sla.w.sx %s6, (56)0, %s01073; CHECK-NEXT:    sla.w.sx %s2, %s2, %s01074; CHECK-NEXT:    sla.w.sx %s4, %s4, %s01075; CHECK-NEXT:    nnd %s5, %s6, %s51076; CHECK-NEXT:    and %s5, %s5, (32)01077; CHECK-NEXT:    or %s2, %s5, %s21078; CHECK-NEXT:    or %s4, %s5, %s41079; CHECK-NEXT:    cas.w %s2, (%s3), %s41080; CHECK-NEXT:    cmps.w.sx %s4, %s2, %s41081; CHECK-NEXT:    or %s3, 0, (0)11082; CHECK-NEXT:    cmov.w.eq %s3, (63)0, %s41083; CHECK-NEXT:    fencem 31084; CHECK-NEXT:    brne.w 0, %s3, .LBB24_21085; CHECK-NEXT:  # %bb.1: # %bb61086; CHECK-NEXT:    and %s2, %s2, (32)01087; CHECK-NEXT:    srl %s0, %s2, %s01088; CHECK-NEXT:    st1b %s0, (, %s1)1089; CHECK-NEXT:  .LBB24_2: # %bb81090; CHECK-NEXT:    adds.w.zx %s0, %s3, (0)11091; CHECK-NEXT:    b.l.t (, %s10)1092bb:1093  %i3 = load i8, ptr %arg1, align 11094  %i4 = cmpxchg weak ptr %arg, i8 %i3, i8 %arg2 seq_cst seq_cst, align 11095  %i5 = extractvalue { i8, i1 } %i4, 11096  br i1 %i5, label %bb8, label %bb61097 1098bb6:                                              ; preds = %bb1099  %i7 = extractvalue { i8, i1 } %i4, 01100  store i8 %i7, ptr %arg1, align 11101  br label %bb81102 1103bb8:                                              ; preds = %bb6, %bb1104  %i9 = zext i1 %i5 to i81105  ret i8 %i91106}1107 1108; Function Attrs: nofree norecurse nounwind mustprogress1109define signext i16 @_Z27atomic_cmp_swap_seq_cst_i16RNSt3__16atomicIsEERss(ptr nocapture nonnull align 2 dereferenceable(2) %arg, ptr nocapture nonnull align 2 dereferenceable(2) %arg1, i16 signext %arg2) {1110; CHECK-LABEL: _Z27atomic_cmp_swap_seq_cst_i16RNSt3__16atomicIsEERss:1111; CHECK:       # %bb.0: # %bb1112; CHECK-NEXT:    ld2b.zx %s4, (, %s1)1113; CHECK-NEXT:    fencem 31114; CHECK-NEXT:    and %s3, -4, %s01115; CHECK-NEXT:    and %s0, 3, %s01116; CHECK-NEXT:    sla.w.sx %s0, %s0, 31117; CHECK-NEXT:    sla.w.sx %s5, (48)0, %s01118; CHECK-NEXT:    ldl.sx %s6, (, %s3)1119; CHECK-NEXT:    and %s2, %s2, (48)01120; CHECK-NEXT:    sla.w.sx %s2, %s2, %s01121; CHECK-NEXT:    sla.w.sx %s4, %s4, %s01122; CHECK-NEXT:    nnd %s5, %s5, %s61123; CHECK-NEXT:    and %s5, %s5, (32)01124; CHECK-NEXT:    or %s2, %s5, %s21125; CHECK-NEXT:    or %s4, %s5, %s41126; CHECK-NEXT:    cas.w %s2, (%s3), %s41127; CHECK-NEXT:    cmps.w.sx %s4, %s2, %s41128; CHECK-NEXT:    or %s3, 0, (0)11129; CHECK-NEXT:    cmov.w.eq %s3, (63)0, %s41130; CHECK-NEXT:    fencem 31131; CHECK-NEXT:    brne.w 0, %s3, .LBB25_21132; CHECK-NEXT:  # %bb.1: # %bb61133; CHECK-NEXT:    and %s2, %s2, (32)01134; CHECK-NEXT:    srl %s0, %s2, %s01135; CHECK-NEXT:    st2b %s0, (, %s1)1136; CHECK-NEXT:  .LBB25_2: # %bb81137; CHECK-NEXT:    adds.w.zx %s0, %s3, (0)11138; CHECK-NEXT:    b.l.t (, %s10)1139bb:1140  %i3 = load i16, ptr %arg1, align 21141  %i4 = cmpxchg weak ptr %arg, i16 %i3, i16 %arg2 seq_cst seq_cst, align 21142  %i5 = extractvalue { i16, i1 } %i4, 11143  br i1 %i5, label %bb8, label %bb61144 1145bb6:                                              ; preds = %bb1146  %i7 = extractvalue { i16, i1 } %i4, 01147  store i16 %i7, ptr %arg1, align 21148  br label %bb81149 1150bb8:                                              ; preds = %bb6, %bb1151  %i9 = zext i1 %i5 to i161152  ret i16 %i91153}1154 1155; Function Attrs: nofree norecurse nounwind mustprogress1156define zeroext i16 @_Z27atomic_cmp_swap_seq_cst_u16RNSt3__16atomicItEERtt(ptr nocapture nonnull align 2 dereferenceable(2) %arg, ptr nocapture nonnull align 2 dereferenceable(2) %arg1, i16 zeroext %arg2) {1157; CHECK-LABEL: _Z27atomic_cmp_swap_seq_cst_u16RNSt3__16atomicItEERtt:1158; CHECK:       # %bb.0: # %bb1159; CHECK-NEXT:    ld2b.zx %s4, (, %s1)1160; CHECK-NEXT:    fencem 31161; CHECK-NEXT:    and %s3, -4, %s01162; CHECK-NEXT:    and %s0, 3, %s01163; CHECK-NEXT:    sla.w.sx %s0, %s0, 31164; CHECK-NEXT:    ldl.sx %s5, (, %s3)1165; CHECK-NEXT:    sla.w.sx %s6, (48)0, %s01166; CHECK-NEXT:    sla.w.sx %s2, %s2, %s01167; CHECK-NEXT:    sla.w.sx %s4, %s4, %s01168; CHECK-NEXT:    nnd %s5, %s6, %s51169; CHECK-NEXT:    and %s5, %s5, (32)01170; CHECK-NEXT:    or %s2, %s5, %s21171; CHECK-NEXT:    or %s4, %s5, %s41172; CHECK-NEXT:    cas.w %s2, (%s3), %s41173; CHECK-NEXT:    cmps.w.sx %s4, %s2, %s41174; CHECK-NEXT:    or %s3, 0, (0)11175; CHECK-NEXT:    cmov.w.eq %s3, (63)0, %s41176; CHECK-NEXT:    fencem 31177; CHECK-NEXT:    brne.w 0, %s3, .LBB26_21178; CHECK-NEXT:  # %bb.1: # %bb61179; CHECK-NEXT:    and %s2, %s2, (32)01180; CHECK-NEXT:    srl %s0, %s2, %s01181; CHECK-NEXT:    st2b %s0, (, %s1)1182; CHECK-NEXT:  .LBB26_2: # %bb81183; CHECK-NEXT:    adds.w.zx %s0, %s3, (0)11184; CHECK-NEXT:    b.l.t (, %s10)1185bb:1186  %i3 = load i16, ptr %arg1, align 21187  %i4 = cmpxchg weak ptr %arg, i16 %i3, i16 %arg2 seq_cst seq_cst, align 21188  %i5 = extractvalue { i16, i1 } %i4, 11189  br i1 %i5, label %bb8, label %bb61190 1191bb6:                                              ; preds = %bb1192  %i7 = extractvalue { i16, i1 } %i4, 01193  store i16 %i7, ptr %arg1, align 21194  br label %bb81195 1196bb8:                                              ; preds = %bb6, %bb1197  %i9 = zext i1 %i5 to i161198  ret i16 %i91199}1200 1201; Function Attrs: nofree norecurse nounwind mustprogress1202define signext i32 @_Z27atomic_cmp_swap_seq_cst_i32RNSt3__16atomicIiEERii(ptr nocapture nonnull align 4 dereferenceable(4) %arg, ptr nocapture nonnull align 4 dereferenceable(4) %arg1, i32 signext %arg2) {1203; CHECK-LABEL: _Z27atomic_cmp_swap_seq_cst_i32RNSt3__16atomicIiEERii:1204; CHECK:       # %bb.0: # %bb1205; CHECK-NEXT:    ldl.sx %s3, (, %s1)1206; CHECK-NEXT:    fencem 31207; CHECK-NEXT:    cas.w %s2, (%s0), %s31208; CHECK-NEXT:    cmps.w.sx %s4, %s2, %s31209; CHECK-NEXT:    or %s0, 0, (0)11210; CHECK-NEXT:    cmov.w.eq %s0, (63)0, %s41211; CHECK-NEXT:    fencem 31212; CHECK-NEXT:    breq.w %s2, %s3, .LBB27_21213; CHECK-NEXT:  # %bb.1: # %bb61214; CHECK-NEXT:    stl %s2, (, %s1)1215; CHECK-NEXT:  .LBB27_2: # %bb81216; CHECK-NEXT:    adds.w.zx %s0, %s0, (0)11217; CHECK-NEXT:    b.l.t (, %s10)1218bb:1219  %i3 = load i32, ptr %arg1, align 41220  %i4 = cmpxchg weak ptr %arg, i32 %i3, i32 %arg2 seq_cst seq_cst, align 41221  %i5 = extractvalue { i32, i1 } %i4, 11222  br i1 %i5, label %bb8, label %bb61223 1224bb6:                                              ; preds = %bb1225  %i7 = extractvalue { i32, i1 } %i4, 01226  store i32 %i7, ptr %arg1, align 41227  br label %bb81228 1229bb8:                                              ; preds = %bb6, %bb1230  %i9 = zext i1 %i5 to i321231  ret i32 %i91232}1233 1234; Function Attrs: nofree norecurse nounwind mustprogress1235define zeroext i32 @_Z27atomic_cmp_swap_seq_cst_u32RNSt3__16atomicIjEERjj(ptr nocapture nonnull align 4 dereferenceable(4) %arg, ptr nocapture nonnull align 4 dereferenceable(4) %arg1, i32 zeroext %arg2) {1236; CHECK-LABEL: _Z27atomic_cmp_swap_seq_cst_u32RNSt3__16atomicIjEERjj:1237; CHECK:       # %bb.0: # %bb1238; CHECK-NEXT:    ldl.sx %s3, (, %s1)1239; CHECK-NEXT:    fencem 31240; CHECK-NEXT:    cas.w %s2, (%s0), %s31241; CHECK-NEXT:    cmps.w.sx %s4, %s2, %s31242; CHECK-NEXT:    or %s0, 0, (0)11243; CHECK-NEXT:    cmov.w.eq %s0, (63)0, %s41244; CHECK-NEXT:    fencem 31245; CHECK-NEXT:    breq.w %s2, %s3, .LBB28_21246; CHECK-NEXT:  # %bb.1: # %bb61247; CHECK-NEXT:    stl %s2, (, %s1)1248; CHECK-NEXT:  .LBB28_2: # %bb81249; CHECK-NEXT:    adds.w.zx %s0, %s0, (0)11250; CHECK-NEXT:    b.l.t (, %s10)1251bb:1252  %i3 = load i32, ptr %arg1, align 41253  %i4 = cmpxchg weak ptr %arg, i32 %i3, i32 %arg2 seq_cst seq_cst, align 41254  %i5 = extractvalue { i32, i1 } %i4, 11255  br i1 %i5, label %bb8, label %bb61256 1257bb6:                                              ; preds = %bb1258  %i7 = extractvalue { i32, i1 } %i4, 01259  store i32 %i7, ptr %arg1, align 41260  br label %bb81261 1262bb8:                                              ; preds = %bb6, %bb1263  %i9 = zext i1 %i5 to i321264  ret i32 %i91265}1266 1267; Function Attrs: nofree norecurse nounwind mustprogress1268define i64 @_Z27atomic_cmp_swap_seq_cst_i64RNSt3__16atomicIlEERll(ptr nocapture nonnull align 8 dereferenceable(8) %arg, ptr nocapture nonnull align 8 dereferenceable(8) %arg1, i64 %arg2) {1269; CHECK-LABEL: _Z27atomic_cmp_swap_seq_cst_i64RNSt3__16atomicIlEERll:1270; CHECK:       # %bb.0: # %bb1271; CHECK-NEXT:    ld %s3, (, %s1)1272; CHECK-NEXT:    fencem 31273; CHECK-NEXT:    cas.l %s2, (%s0), %s31274; CHECK-NEXT:    cmps.l %s4, %s2, %s31275; CHECK-NEXT:    or %s0, 0, (0)11276; CHECK-NEXT:    cmov.l.eq %s0, (63)0, %s41277; CHECK-NEXT:    fencem 31278; CHECK-NEXT:    breq.l %s2, %s3, .LBB29_21279; CHECK-NEXT:  # %bb.1: # %bb61280; CHECK-NEXT:    st %s2, (, %s1)1281; CHECK-NEXT:  .LBB29_2: # %bb81282; CHECK-NEXT:    adds.w.zx %s0, %s0, (0)11283; CHECK-NEXT:    b.l.t (, %s10)1284bb:1285  %i3 = load i64, ptr %arg1, align 81286  %i4 = cmpxchg weak ptr %arg, i64 %i3, i64 %arg2 seq_cst seq_cst, align 81287  %i5 = extractvalue { i64, i1 } %i4, 11288  br i1 %i5, label %bb8, label %bb61289 1290bb6:                                              ; preds = %bb1291  %i7 = extractvalue { i64, i1 } %i4, 01292  store i64 %i7, ptr %arg1, align 81293  br label %bb81294 1295bb8:                                              ; preds = %bb6, %bb1296  %i9 = zext i1 %i5 to i641297  ret i64 %i91298}1299 1300; Function Attrs: nofree norecurse nounwind mustprogress1301define i64 @_Z27atomic_cmp_swap_seq_cst_u64RNSt3__16atomicImEERmm(ptr nocapture nonnull align 8 dereferenceable(8) %arg, ptr nocapture nonnull align 8 dereferenceable(8) %arg1, i64 %arg2) {1302; CHECK-LABEL: _Z27atomic_cmp_swap_seq_cst_u64RNSt3__16atomicImEERmm:1303; CHECK:       # %bb.0: # %bb1304; CHECK-NEXT:    ld %s3, (, %s1)1305; CHECK-NEXT:    fencem 31306; CHECK-NEXT:    cas.l %s2, (%s0), %s31307; CHECK-NEXT:    cmps.l %s4, %s2, %s31308; CHECK-NEXT:    or %s0, 0, (0)11309; CHECK-NEXT:    cmov.l.eq %s0, (63)0, %s41310; CHECK-NEXT:    fencem 31311; CHECK-NEXT:    breq.l %s2, %s3, .LBB30_21312; CHECK-NEXT:  # %bb.1: # %bb61313; CHECK-NEXT:    st %s2, (, %s1)1314; CHECK-NEXT:  .LBB30_2: # %bb81315; CHECK-NEXT:    adds.w.zx %s0, %s0, (0)11316; CHECK-NEXT:    b.l.t (, %s10)1317bb:1318  %i3 = load i64, ptr %arg1, align 81319  %i4 = cmpxchg weak ptr %arg, i64 %i3, i64 %arg2 seq_cst seq_cst, align 81320  %i5 = extractvalue { i64, i1 } %i4, 11321  br i1 %i5, label %bb8, label %bb61322 1323bb6:                                              ; preds = %bb1324  %i7 = extractvalue { i64, i1 } %i4, 01325  store i64 %i7, ptr %arg1, align 81326  br label %bb81327 1328bb8:                                              ; preds = %bb6, %bb1329  %i9 = zext i1 %i5 to i641330  ret i64 %i91331}1332 1333; Function Attrs: nounwind mustprogress1334define i128 @_Z28atomic_cmp_swap_seq_cst_i128RNSt3__16atomicInEERnn(ptr nonnull align 16 dereferenceable(16) %arg, ptr nonnull align 16 dereferenceable(16) %arg1, i128 %arg2) {1335; CHECK-LABEL: _Z28atomic_cmp_swap_seq_cst_i128RNSt3__16atomicInEERnn:1336; CHECK:       # %bb.0: # %bb1337; CHECK-NEXT:    st %s9, (, %s11)1338; CHECK-NEXT:    st %s10, 8(, %s11)1339; CHECK-NEXT:    or %s9, 0, %s111340; CHECK-NEXT:    lea %s11, -256(, %s11)1341; CHECK-NEXT:    brge.l.t %s11, %s8, .LBB31_21342; CHECK-NEXT:  # %bb.1: # %bb1343; CHECK-NEXT:    ld %s61, 24(, %s14)1344; CHECK-NEXT:    or %s62, 0, %s01345; CHECK-NEXT:    lea %s63, 3151346; CHECK-NEXT:    shm.l %s63, (%s61)1347; CHECK-NEXT:    shm.l %s8, 8(%s61)1348; CHECK-NEXT:    shm.l %s11, 16(%s61)1349; CHECK-NEXT:    monc1350; CHECK-NEXT:    or %s0, 0, %s621351; CHECK-NEXT:  .LBB31_2: # %bb1352; CHECK-NEXT:    or %s6, 0, %s11353; CHECK-NEXT:    or %s1, 0, %s01354; CHECK-NEXT:    st %s3, 248(, %s11)1355; CHECK-NEXT:    st %s2, 240(, %s11)1356; CHECK-NEXT:    lea %s0, __atomic_compare_exchange@lo1357; CHECK-NEXT:    and %s0, %s0, (32)01358; CHECK-NEXT:    lea.sl %s12, __atomic_compare_exchange@hi(, %s0)1359; CHECK-NEXT:    lea %s3, 240(, %s11)1360; CHECK-NEXT:    or %s0, 16, (0)11361; CHECK-NEXT:    or %s4, 5, (0)11362; CHECK-NEXT:    or %s5, 5, (0)11363; CHECK-NEXT:    or %s2, 0, %s61364; CHECK-NEXT:    bsic %s10, (, %s12)1365; CHECK-NEXT:    or %s1, 0, (0)11366; CHECK-NEXT:    or %s11, 0, %s91367; CHECK-NEXT:    ld %s10, 8(, %s11)1368; CHECK-NEXT:    ld %s9, (, %s11)1369; CHECK-NEXT:    b.l.t (, %s10)1370bb:1371  %i = alloca i128, align 161372  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %i)1373  store i128 %arg2, ptr %i, align 16, !tbaa !01374  %i6 = call zeroext i1 @__atomic_compare_exchange(i64 16, ptr nonnull %arg, ptr nonnull %arg1, ptr nonnull %i, i32 signext 5, i32 signext 5)1375  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %i)1376  %i7 = zext i1 %i6 to i1281377  ret i128 %i71378}1379 1380; Function Attrs: nounwind mustprogress1381define i128 @_Z28atomic_cmp_swap_seq_cst_u128RNSt3__16atomicIoEERoo(ptr nonnull align 16 dereferenceable(16) %arg, ptr nonnull align 16 dereferenceable(16) %arg1, i128 %arg2) {1382; CHECK-LABEL: _Z28atomic_cmp_swap_seq_cst_u128RNSt3__16atomicIoEERoo:1383; CHECK:       # %bb.0: # %bb1384; CHECK-NEXT:    st %s9, (, %s11)1385; CHECK-NEXT:    st %s10, 8(, %s11)1386; CHECK-NEXT:    or %s9, 0, %s111387; CHECK-NEXT:    lea %s11, -256(, %s11)1388; CHECK-NEXT:    brge.l.t %s11, %s8, .LBB32_21389; CHECK-NEXT:  # %bb.1: # %bb1390; CHECK-NEXT:    ld %s61, 24(, %s14)1391; CHECK-NEXT:    or %s62, 0, %s01392; CHECK-NEXT:    lea %s63, 3151393; CHECK-NEXT:    shm.l %s63, (%s61)1394; CHECK-NEXT:    shm.l %s8, 8(%s61)1395; CHECK-NEXT:    shm.l %s11, 16(%s61)1396; CHECK-NEXT:    monc1397; CHECK-NEXT:    or %s0, 0, %s621398; CHECK-NEXT:  .LBB32_2: # %bb1399; CHECK-NEXT:    or %s6, 0, %s11400; CHECK-NEXT:    or %s1, 0, %s01401; CHECK-NEXT:    st %s3, 248(, %s11)1402; CHECK-NEXT:    st %s2, 240(, %s11)1403; CHECK-NEXT:    lea %s0, __atomic_compare_exchange@lo1404; CHECK-NEXT:    and %s0, %s0, (32)01405; CHECK-NEXT:    lea.sl %s12, __atomic_compare_exchange@hi(, %s0)1406; CHECK-NEXT:    lea %s3, 240(, %s11)1407; CHECK-NEXT:    or %s0, 16, (0)11408; CHECK-NEXT:    or %s4, 5, (0)11409; CHECK-NEXT:    or %s5, 5, (0)11410; CHECK-NEXT:    or %s2, 0, %s61411; CHECK-NEXT:    bsic %s10, (, %s12)1412; CHECK-NEXT:    or %s1, 0, (0)11413; CHECK-NEXT:    or %s11, 0, %s91414; CHECK-NEXT:    ld %s10, 8(, %s11)1415; CHECK-NEXT:    ld %s9, (, %s11)1416; CHECK-NEXT:    b.l.t (, %s10)1417bb:1418  %i = alloca i128, align 161419  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %i)1420  store i128 %arg2, ptr %i, align 16, !tbaa !01421  %i6 = call zeroext i1 @__atomic_compare_exchange(i64 16, ptr nonnull %arg, ptr nonnull %arg1, ptr nonnull %i, i32 signext 5, i32 signext 5)1422  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %i)1423  %i7 = zext i1 %i6 to i1281424  ret i128 %i71425}1426 1427; Function Attrs: nofree nounwind mustprogress1428define zeroext i1 @_Z30atomic_cmp_swap_relaxed_stk_i1Rbb(ptr nocapture nonnull align 1 dereferenceable(1) %arg, i1 zeroext %arg1) {1429; CHECK-LABEL: _Z30atomic_cmp_swap_relaxed_stk_i1Rbb:1430; CHECK:       # %bb.0: # %bb1431; CHECK-NEXT:    adds.l %s11, -16, %s111432; CHECK-NEXT:    brge.l %s11, %s8, .LBB33_41433; CHECK-NEXT:  # %bb.3: # %bb1434; CHECK-NEXT:    ld %s61, 24(, %s14)1435; CHECK-NEXT:    or %s62, 0, %s01436; CHECK-NEXT:    lea %s63, 3151437; CHECK-NEXT:    shm.l %s63, (%s61)1438; CHECK-NEXT:    shm.l %s8, 8(%s61)1439; CHECK-NEXT:    shm.l %s11, 16(%s61)1440; CHECK-NEXT:    monc1441; CHECK-NEXT:    or %s0, 0, %s621442; CHECK-NEXT:  .LBB33_4: # %bb1443; CHECK-NEXT:    and %s1, %s1, (32)01444; CHECK-NEXT:    ld1b.zx %s3, (, %s0)1445; CHECK-NEXT:    ldl.zx %s4, 8(, %s11)1446; CHECK-NEXT:    lea %s2, 8(, %s11)1447; CHECK-NEXT:    lea %s5, -2561448; CHECK-NEXT:    and %s5, %s5, (32)01449; CHECK-NEXT:    and %s4, %s4, %s51450; CHECK-NEXT:    and %s4, %s4, (32)01451; CHECK-NEXT:    or %s1, %s4, %s11452; CHECK-NEXT:    or %s3, %s4, %s31453; CHECK-NEXT:    cas.w %s1, (%s2), %s31454; CHECK-NEXT:    cmps.w.sx %s3, %s1, %s31455; CHECK-NEXT:    or %s2, 0, (0)11456; CHECK-NEXT:    cmov.w.eq %s2, (63)0, %s31457; CHECK-NEXT:    brne.w 0, %s2, .LBB33_21458; CHECK-NEXT:  # %bb.1: # %bb71459; CHECK-NEXT:    st1b %s1, (, %s0)1460; CHECK-NEXT:  .LBB33_2: # %bb91461; CHECK-NEXT:    adds.w.zx %s0, %s2, (0)11462; CHECK-NEXT:    adds.l %s11, 16, %s111463; CHECK-NEXT:    b.l.t (, %s10)1464bb:1465  %i = alloca %"struct.std::__1::atomic", align 81466  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %i)1467  %i3 = zext i1 %arg1 to i81468  %i4 = load i8, ptr %arg, align 11469  %i5 = cmpxchg weak volatile ptr %i, i8 %i4, i8 %i3 monotonic monotonic, align 11470  %i6 = extractvalue { i8, i1 } %i5, 11471  br i1 %i6, label %bb9, label %bb71472 1473bb7:                                              ; preds = %bb1474  %i8 = extractvalue { i8, i1 } %i5, 01475  store i8 %i8, ptr %arg, align 11476  br label %bb91477 1478bb9:                                              ; preds = %bb7, %bb1479  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %i)1480  ret i1 %i61481}1482 1483; Function Attrs: argmemonly nofree nosync nounwind willreturn1484declare void @llvm.lifetime.start.p0(i64 immarg, ptr nocapture)1485 1486; Function Attrs: argmemonly nofree nosync nounwind willreturn1487declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture)1488 1489; Function Attrs: nofree nounwind mustprogress1490define signext i8 @_Z30atomic_cmp_swap_relaxed_stk_i8Rcc(ptr nocapture nonnull align 1 dereferenceable(1) %arg, i8 signext %arg1) {1491; CHECK-LABEL: _Z30atomic_cmp_swap_relaxed_stk_i8Rcc:1492; CHECK:       # %bb.0: # %bb1493; CHECK-NEXT:    adds.l %s11, -16, %s111494; CHECK-NEXT:    brge.l %s11, %s8, .LBB34_41495; CHECK-NEXT:  # %bb.3: # %bb1496; CHECK-NEXT:    ld %s61, 24(, %s14)1497; CHECK-NEXT:    or %s62, 0, %s01498; CHECK-NEXT:    lea %s63, 3151499; CHECK-NEXT:    shm.l %s63, (%s61)1500; CHECK-NEXT:    shm.l %s8, 8(%s61)1501; CHECK-NEXT:    shm.l %s11, 16(%s61)1502; CHECK-NEXT:    monc1503; CHECK-NEXT:    or %s0, 0, %s621504; CHECK-NEXT:  .LBB34_4: # %bb1505; CHECK-NEXT:    ld1b.zx %s3, (, %s0)1506; CHECK-NEXT:    lea %s2, 8(, %s11)1507; CHECK-NEXT:    and %s1, %s1, (56)01508; CHECK-NEXT:    ldl.zx %s4, 8(, %s11)1509; CHECK-NEXT:    and %s1, %s1, (32)01510; CHECK-NEXT:    lea %s5, -2561511; CHECK-NEXT:    and %s5, %s5, (32)01512; CHECK-NEXT:    and %s4, %s4, %s51513; CHECK-NEXT:    and %s4, %s4, (32)01514; CHECK-NEXT:    or %s1, %s4, %s11515; CHECK-NEXT:    or %s3, %s4, %s31516; CHECK-NEXT:    cas.w %s1, (%s2), %s31517; CHECK-NEXT:    cmps.w.sx %s3, %s1, %s31518; CHECK-NEXT:    or %s2, 0, (0)11519; CHECK-NEXT:    cmov.w.eq %s2, (63)0, %s31520; CHECK-NEXT:    brne.w 0, %s2, .LBB34_21521; CHECK-NEXT:  # %bb.1: # %bb61522; CHECK-NEXT:    st1b %s1, (, %s0)1523; CHECK-NEXT:  .LBB34_2: # %bb81524; CHECK-NEXT:    adds.w.zx %s0, %s2, (0)11525; CHECK-NEXT:    adds.l %s11, 16, %s111526; CHECK-NEXT:    b.l.t (, %s10)1527bb:1528  %i = alloca %"struct.std::__1::atomic.0", align 81529  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %i)1530  %i3 = load i8, ptr %arg, align 11531  %i4 = cmpxchg weak volatile ptr %i, i8 %i3, i8 %arg1 monotonic monotonic, align 11532  %i5 = extractvalue { i8, i1 } %i4, 11533  br i1 %i5, label %bb8, label %bb61534 1535bb6:                                              ; preds = %bb1536  %i7 = extractvalue { i8, i1 } %i4, 01537  store i8 %i7, ptr %arg, align 11538  br label %bb81539 1540bb8:                                              ; preds = %bb6, %bb1541  %i9 = zext i1 %i5 to i81542  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %i)1543  ret i8 %i91544}1545 1546; Function Attrs: nofree nounwind mustprogress1547define zeroext i8 @_Z30atomic_cmp_swap_relaxed_stk_u8Rhh(ptr nocapture nonnull align 1 dereferenceable(1) %arg, i8 zeroext %arg1) {1548; CHECK-LABEL: _Z30atomic_cmp_swap_relaxed_stk_u8Rhh:1549; CHECK:       # %bb.0: # %bb1550; CHECK-NEXT:    adds.l %s11, -16, %s111551; CHECK-NEXT:    brge.l %s11, %s8, .LBB35_41552; CHECK-NEXT:  # %bb.3: # %bb1553; CHECK-NEXT:    ld %s61, 24(, %s14)1554; CHECK-NEXT:    or %s62, 0, %s01555; CHECK-NEXT:    lea %s63, 3151556; CHECK-NEXT:    shm.l %s63, (%s61)1557; CHECK-NEXT:    shm.l %s8, 8(%s61)1558; CHECK-NEXT:    shm.l %s11, 16(%s61)1559; CHECK-NEXT:    monc1560; CHECK-NEXT:    or %s0, 0, %s621561; CHECK-NEXT:  .LBB35_4: # %bb1562; CHECK-NEXT:    and %s1, %s1, (32)01563; CHECK-NEXT:    ld1b.zx %s3, (, %s0)1564; CHECK-NEXT:    ldl.zx %s4, 8(, %s11)1565; CHECK-NEXT:    lea %s2, 8(, %s11)1566; CHECK-NEXT:    lea %s5, -2561567; CHECK-NEXT:    and %s5, %s5, (32)01568; CHECK-NEXT:    and %s4, %s4, %s51569; CHECK-NEXT:    and %s4, %s4, (32)01570; CHECK-NEXT:    or %s1, %s4, %s11571; CHECK-NEXT:    or %s3, %s4, %s31572; CHECK-NEXT:    cas.w %s1, (%s2), %s31573; CHECK-NEXT:    cmps.w.sx %s3, %s1, %s31574; CHECK-NEXT:    or %s2, 0, (0)11575; CHECK-NEXT:    cmov.w.eq %s2, (63)0, %s31576; CHECK-NEXT:    brne.w 0, %s2, .LBB35_21577; CHECK-NEXT:  # %bb.1: # %bb61578; CHECK-NEXT:    st1b %s1, (, %s0)1579; CHECK-NEXT:  .LBB35_2: # %bb81580; CHECK-NEXT:    adds.w.zx %s0, %s2, (0)11581; CHECK-NEXT:    adds.l %s11, 16, %s111582; CHECK-NEXT:    b.l.t (, %s10)1583bb:1584  %i = alloca %"struct.std::__1::atomic.5", align 81585  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %i)1586  %i3 = load i8, ptr %arg, align 11587  %i4 = cmpxchg weak volatile ptr %i, i8 %i3, i8 %arg1 monotonic monotonic, align 11588  %i5 = extractvalue { i8, i1 } %i4, 11589  br i1 %i5, label %bb8, label %bb61590 1591bb6:                                              ; preds = %bb1592  %i7 = extractvalue { i8, i1 } %i4, 01593  store i8 %i7, ptr %arg, align 11594  br label %bb81595 1596bb8:                                              ; preds = %bb6, %bb1597  %i9 = zext i1 %i5 to i81598  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %i)1599  ret i8 %i91600}1601 1602; Function Attrs: nofree nounwind mustprogress1603define signext i16 @_Z31atomic_cmp_swap_relaxed_stk_i16Rss(ptr nocapture nonnull align 2 dereferenceable(2) %arg, i16 signext %arg1) {1604; CHECK-LABEL: _Z31atomic_cmp_swap_relaxed_stk_i16Rss:1605; CHECK:       # %bb.0: # %bb1606; CHECK-NEXT:    adds.l %s11, -16, %s111607; CHECK-NEXT:    brge.l %s11, %s8, .LBB36_41608; CHECK-NEXT:  # %bb.3: # %bb1609; CHECK-NEXT:    ld %s61, 24(, %s14)1610; CHECK-NEXT:    or %s62, 0, %s01611; CHECK-NEXT:    lea %s63, 3151612; CHECK-NEXT:    shm.l %s63, (%s61)1613; CHECK-NEXT:    shm.l %s8, 8(%s61)1614; CHECK-NEXT:    shm.l %s11, 16(%s61)1615; CHECK-NEXT:    monc1616; CHECK-NEXT:    or %s0, 0, %s621617; CHECK-NEXT:  .LBB36_4: # %bb1618; CHECK-NEXT:    ld2b.zx %s3, (, %s0)1619; CHECK-NEXT:    lea %s2, 8(, %s11)1620; CHECK-NEXT:    and %s1, %s1, (48)01621; CHECK-NEXT:    ldl.zx %s4, 8(, %s11)1622; CHECK-NEXT:    and %s1, %s1, (32)01623; CHECK-NEXT:    lea %s5, -655361624; CHECK-NEXT:    and %s5, %s5, (32)01625; CHECK-NEXT:    and %s4, %s4, %s51626; CHECK-NEXT:    and %s4, %s4, (32)01627; CHECK-NEXT:    or %s1, %s4, %s11628; CHECK-NEXT:    or %s3, %s4, %s31629; CHECK-NEXT:    cas.w %s1, (%s2), %s31630; CHECK-NEXT:    cmps.w.sx %s3, %s1, %s31631; CHECK-NEXT:    or %s2, 0, (0)11632; CHECK-NEXT:    cmov.w.eq %s2, (63)0, %s31633; CHECK-NEXT:    brne.w 0, %s2, .LBB36_21634; CHECK-NEXT:  # %bb.1: # %bb71635; CHECK-NEXT:    st2b %s1, (, %s0)1636; CHECK-NEXT:  .LBB36_2: # %bb91637; CHECK-NEXT:    adds.w.zx %s0, %s2, (0)11638; CHECK-NEXT:    adds.l %s11, 16, %s111639; CHECK-NEXT:    b.l.t (, %s10)1640bb:1641  %i = alloca %"struct.std::__1::atomic.10", align 81642  call void @llvm.lifetime.start.p0(i64 2, ptr nonnull %i)1643  %i4 = load i16, ptr %arg, align 21644  %i5 = cmpxchg weak volatile ptr %i, i16 %i4, i16 %arg1 monotonic monotonic, align 21645  %i6 = extractvalue { i16, i1 } %i5, 11646  br i1 %i6, label %bb9, label %bb71647 1648bb7:                                              ; preds = %bb1649  %i8 = extractvalue { i16, i1 } %i5, 01650  store i16 %i8, ptr %arg, align 21651  br label %bb91652 1653bb9:                                              ; preds = %bb7, %bb1654  %i10 = zext i1 %i6 to i161655  call void @llvm.lifetime.end.p0(i64 2, ptr nonnull %i)1656  ret i16 %i101657}1658 1659; Function Attrs: nofree nounwind mustprogress1660define zeroext i16 @_Z31atomic_cmp_swap_relaxed_stk_u16Rtt(ptr nocapture nonnull align 2 dereferenceable(2) %arg, i16 zeroext %arg1) {1661; CHECK-LABEL: _Z31atomic_cmp_swap_relaxed_stk_u16Rtt:1662; CHECK:       # %bb.0: # %bb1663; CHECK-NEXT:    adds.l %s11, -16, %s111664; CHECK-NEXT:    brge.l %s11, %s8, .LBB37_41665; CHECK-NEXT:  # %bb.3: # %bb1666; CHECK-NEXT:    ld %s61, 24(, %s14)1667; CHECK-NEXT:    or %s62, 0, %s01668; CHECK-NEXT:    lea %s63, 3151669; CHECK-NEXT:    shm.l %s63, (%s61)1670; CHECK-NEXT:    shm.l %s8, 8(%s61)1671; CHECK-NEXT:    shm.l %s11, 16(%s61)1672; CHECK-NEXT:    monc1673; CHECK-NEXT:    or %s0, 0, %s621674; CHECK-NEXT:  .LBB37_4: # %bb1675; CHECK-NEXT:    and %s1, %s1, (32)01676; CHECK-NEXT:    ld2b.zx %s3, (, %s0)1677; CHECK-NEXT:    ldl.zx %s4, 8(, %s11)1678; CHECK-NEXT:    lea %s2, 8(, %s11)1679; CHECK-NEXT:    lea %s5, -655361680; CHECK-NEXT:    and %s5, %s5, (32)01681; CHECK-NEXT:    and %s4, %s4, %s51682; CHECK-NEXT:    and %s4, %s4, (32)01683; CHECK-NEXT:    or %s1, %s4, %s11684; CHECK-NEXT:    or %s3, %s4, %s31685; CHECK-NEXT:    cas.w %s1, (%s2), %s31686; CHECK-NEXT:    cmps.w.sx %s3, %s1, %s31687; CHECK-NEXT:    or %s2, 0, (0)11688; CHECK-NEXT:    cmov.w.eq %s2, (63)0, %s31689; CHECK-NEXT:    brne.w 0, %s2, .LBB37_21690; CHECK-NEXT:  # %bb.1: # %bb71691; CHECK-NEXT:    st2b %s1, (, %s0)1692; CHECK-NEXT:  .LBB37_2: # %bb91693; CHECK-NEXT:    adds.w.zx %s0, %s2, (0)11694; CHECK-NEXT:    adds.l %s11, 16, %s111695; CHECK-NEXT:    b.l.t (, %s10)1696bb:1697  %i = alloca %"struct.std::__1::atomic.15", align 81698  call void @llvm.lifetime.start.p0(i64 2, ptr nonnull %i)1699  %i4 = load i16, ptr %arg, align 21700  %i5 = cmpxchg weak volatile ptr %i, i16 %i4, i16 %arg1 monotonic monotonic, align 21701  %i6 = extractvalue { i16, i1 } %i5, 11702  br i1 %i6, label %bb9, label %bb71703 1704bb7:                                              ; preds = %bb1705  %i8 = extractvalue { i16, i1 } %i5, 01706  store i16 %i8, ptr %arg, align 21707  br label %bb91708 1709bb9:                                              ; preds = %bb7, %bb1710  %i10 = zext i1 %i6 to i161711  call void @llvm.lifetime.end.p0(i64 2, ptr nonnull %i)1712  ret i16 %i101713}1714 1715; Function Attrs: nofree nounwind mustprogress1716define signext i32 @_Z31atomic_cmp_swap_relaxed_stk_i32Rii(ptr nocapture nonnull align 4 dereferenceable(4) %arg, i32 signext %arg1) {1717; CHECK-LABEL: _Z31atomic_cmp_swap_relaxed_stk_i32Rii:1718; CHECK:       # %bb.0: # %bb1719; CHECK-NEXT:    adds.l %s11, -16, %s111720; CHECK-NEXT:    brge.l %s11, %s8, .LBB38_41721; CHECK-NEXT:  # %bb.3: # %bb1722; CHECK-NEXT:    ld %s61, 24(, %s14)1723; CHECK-NEXT:    or %s62, 0, %s01724; CHECK-NEXT:    lea %s63, 3151725; CHECK-NEXT:    shm.l %s63, (%s61)1726; CHECK-NEXT:    shm.l %s8, 8(%s61)1727; CHECK-NEXT:    shm.l %s11, 16(%s61)1728; CHECK-NEXT:    monc1729; CHECK-NEXT:    or %s0, 0, %s621730; CHECK-NEXT:  .LBB38_4: # %bb1731; CHECK-NEXT:    ldl.sx %s3, (, %s0)1732; CHECK-NEXT:    cas.w %s1, 8(%s11), %s31733; CHECK-NEXT:    cmps.w.sx %s4, %s1, %s31734; CHECK-NEXT:    or %s2, 0, (0)11735; CHECK-NEXT:    cmov.w.eq %s2, (63)0, %s41736; CHECK-NEXT:    breq.w %s1, %s3, .LBB38_21737; CHECK-NEXT:  # %bb.1: # %bb71738; CHECK-NEXT:    stl %s1, (, %s0)1739; CHECK-NEXT:  .LBB38_2: # %bb91740; CHECK-NEXT:    adds.w.zx %s0, %s2, (0)11741; CHECK-NEXT:    adds.l %s11, 16, %s111742; CHECK-NEXT:    b.l.t (, %s10)1743bb:1744  %i = alloca %"struct.std::__1::atomic.20", align 81745  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %i)1746  %i4 = load i32, ptr %arg, align 41747  %i5 = cmpxchg weak volatile ptr %i, i32 %i4, i32 %arg1 monotonic monotonic, align 41748  %i6 = extractvalue { i32, i1 } %i5, 11749  br i1 %i6, label %bb9, label %bb71750 1751bb7:                                              ; preds = %bb1752  %i8 = extractvalue { i32, i1 } %i5, 01753  store i32 %i8, ptr %arg, align 41754  br label %bb91755 1756bb9:                                              ; preds = %bb7, %bb1757  %i10 = zext i1 %i6 to i321758  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %i)1759  ret i32 %i101760}1761 1762; Function Attrs: nofree nounwind mustprogress1763define zeroext i32 @_Z31atomic_cmp_swap_relaxed_stk_u32Rjj(ptr nocapture nonnull align 4 dereferenceable(4) %arg, i32 zeroext %arg1) {1764; CHECK-LABEL: _Z31atomic_cmp_swap_relaxed_stk_u32Rjj:1765; CHECK:       # %bb.0: # %bb1766; CHECK-NEXT:    adds.l %s11, -16, %s111767; CHECK-NEXT:    brge.l %s11, %s8, .LBB39_41768; CHECK-NEXT:  # %bb.3: # %bb1769; CHECK-NEXT:    ld %s61, 24(, %s14)1770; CHECK-NEXT:    or %s62, 0, %s01771; CHECK-NEXT:    lea %s63, 3151772; CHECK-NEXT:    shm.l %s63, (%s61)1773; CHECK-NEXT:    shm.l %s8, 8(%s61)1774; CHECK-NEXT:    shm.l %s11, 16(%s61)1775; CHECK-NEXT:    monc1776; CHECK-NEXT:    or %s0, 0, %s621777; CHECK-NEXT:  .LBB39_4: # %bb1778; CHECK-NEXT:    ldl.sx %s3, (, %s0)1779; CHECK-NEXT:    cas.w %s1, 8(%s11), %s31780; CHECK-NEXT:    cmps.w.sx %s4, %s1, %s31781; CHECK-NEXT:    or %s2, 0, (0)11782; CHECK-NEXT:    cmov.w.eq %s2, (63)0, %s41783; CHECK-NEXT:    breq.w %s1, %s3, .LBB39_21784; CHECK-NEXT:  # %bb.1: # %bb71785; CHECK-NEXT:    stl %s1, (, %s0)1786; CHECK-NEXT:  .LBB39_2: # %bb91787; CHECK-NEXT:    adds.w.zx %s0, %s2, (0)11788; CHECK-NEXT:    adds.l %s11, 16, %s111789; CHECK-NEXT:    b.l.t (, %s10)1790bb:1791  %i = alloca %"struct.std::__1::atomic.25", align 81792  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %i)1793  %i4 = load i32, ptr %arg, align 41794  %i5 = cmpxchg weak volatile ptr %i, i32 %i4, i32 %arg1 monotonic monotonic, align 41795  %i6 = extractvalue { i32, i1 } %i5, 11796  br i1 %i6, label %bb9, label %bb71797 1798bb7:                                              ; preds = %bb1799  %i8 = extractvalue { i32, i1 } %i5, 01800  store i32 %i8, ptr %arg, align 41801  br label %bb91802 1803bb9:                                              ; preds = %bb7, %bb1804  %i10 = zext i1 %i6 to i321805  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %i)1806  ret i32 %i101807}1808 1809; Function Attrs: nofree nounwind mustprogress1810define i64 @_Z31atomic_cmp_swap_relaxed_stk_i64Rll(ptr nocapture nonnull align 8 dereferenceable(8) %arg, i64 %arg1) {1811; CHECK-LABEL: _Z31atomic_cmp_swap_relaxed_stk_i64Rll:1812; CHECK:       # %bb.0: # %bb1813; CHECK-NEXT:    adds.l %s11, -16, %s111814; CHECK-NEXT:    brge.l %s11, %s8, .LBB40_41815; CHECK-NEXT:  # %bb.3: # %bb1816; CHECK-NEXT:    ld %s61, 24(, %s14)1817; CHECK-NEXT:    or %s62, 0, %s01818; CHECK-NEXT:    lea %s63, 3151819; CHECK-NEXT:    shm.l %s63, (%s61)1820; CHECK-NEXT:    shm.l %s8, 8(%s61)1821; CHECK-NEXT:    shm.l %s11, 16(%s61)1822; CHECK-NEXT:    monc1823; CHECK-NEXT:    or %s0, 0, %s621824; CHECK-NEXT:  .LBB40_4: # %bb1825; CHECK-NEXT:    ld %s3, (, %s0)1826; CHECK-NEXT:    cas.l %s1, 8(%s11), %s31827; CHECK-NEXT:    cmps.l %s4, %s1, %s31828; CHECK-NEXT:    or %s2, 0, (0)11829; CHECK-NEXT:    cmov.l.eq %s2, (63)0, %s41830; CHECK-NEXT:    breq.l %s1, %s3, .LBB40_21831; CHECK-NEXT:  # %bb.1: # %bb71832; CHECK-NEXT:    st %s1, (, %s0)1833; CHECK-NEXT:  .LBB40_2: # %bb91834; CHECK-NEXT:    adds.w.zx %s0, %s2, (0)11835; CHECK-NEXT:    adds.l %s11, 16, %s111836; CHECK-NEXT:    b.l.t (, %s10)1837bb:1838  %i = alloca %"struct.std::__1::atomic.30", align 81839  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %i)1840  %i4 = load i64, ptr %arg, align 81841  %i5 = cmpxchg weak volatile ptr %i, i64 %i4, i64 %arg1 monotonic monotonic, align 81842  %i6 = extractvalue { i64, i1 } %i5, 11843  br i1 %i6, label %bb9, label %bb71844 1845bb7:                                              ; preds = %bb1846  %i8 = extractvalue { i64, i1 } %i5, 01847  store i64 %i8, ptr %arg, align 81848  br label %bb91849 1850bb9:                                              ; preds = %bb7, %bb1851  %i10 = zext i1 %i6 to i641852  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %i)1853  ret i64 %i101854}1855 1856; Function Attrs: nofree nounwind mustprogress1857define i64 @_Z31atomic_cmp_swap_relaxed_stk_u64Rmm(ptr nocapture nonnull align 8 dereferenceable(8) %arg, i64 %arg1) {1858; CHECK-LABEL: _Z31atomic_cmp_swap_relaxed_stk_u64Rmm:1859; CHECK:       # %bb.0: # %bb1860; CHECK-NEXT:    adds.l %s11, -16, %s111861; CHECK-NEXT:    brge.l %s11, %s8, .LBB41_41862; CHECK-NEXT:  # %bb.3: # %bb1863; CHECK-NEXT:    ld %s61, 24(, %s14)1864; CHECK-NEXT:    or %s62, 0, %s01865; CHECK-NEXT:    lea %s63, 3151866; CHECK-NEXT:    shm.l %s63, (%s61)1867; CHECK-NEXT:    shm.l %s8, 8(%s61)1868; CHECK-NEXT:    shm.l %s11, 16(%s61)1869; CHECK-NEXT:    monc1870; CHECK-NEXT:    or %s0, 0, %s621871; CHECK-NEXT:  .LBB41_4: # %bb1872; CHECK-NEXT:    ld %s3, (, %s0)1873; CHECK-NEXT:    cas.l %s1, 8(%s11), %s31874; CHECK-NEXT:    cmps.l %s4, %s1, %s31875; CHECK-NEXT:    or %s2, 0, (0)11876; CHECK-NEXT:    cmov.l.eq %s2, (63)0, %s41877; CHECK-NEXT:    breq.l %s1, %s3, .LBB41_21878; CHECK-NEXT:  # %bb.1: # %bb71879; CHECK-NEXT:    st %s1, (, %s0)1880; CHECK-NEXT:  .LBB41_2: # %bb91881; CHECK-NEXT:    adds.w.zx %s0, %s2, (0)11882; CHECK-NEXT:    adds.l %s11, 16, %s111883; CHECK-NEXT:    b.l.t (, %s10)1884bb:1885  %i = alloca %"struct.std::__1::atomic.35", align 81886  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %i)1887  %i4 = load i64, ptr %arg, align 81888  %i5 = cmpxchg weak volatile ptr %i, i64 %i4, i64 %arg1 monotonic monotonic, align 81889  %i6 = extractvalue { i64, i1 } %i5, 11890  br i1 %i6, label %bb9, label %bb71891 1892bb7:                                              ; preds = %bb1893  %i8 = extractvalue { i64, i1 } %i5, 01894  store i64 %i8, ptr %arg, align 81895  br label %bb91896 1897bb9:                                              ; preds = %bb7, %bb1898  %i10 = zext i1 %i6 to i641899  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %i)1900  ret i64 %i101901}1902 1903; Function Attrs: nounwind mustprogress1904define i128 @_Z32atomic_cmp_swap_relaxed_stk_i128Rnn(ptr nonnull align 16 dereferenceable(16) %arg, i128 %arg1) {1905; CHECK-LABEL: _Z32atomic_cmp_swap_relaxed_stk_i128Rnn:1906; CHECK:       # %bb.0: # %bb1907; CHECK-NEXT:    st %s9, (, %s11)1908; CHECK-NEXT:    st %s10, 8(, %s11)1909; CHECK-NEXT:    or %s9, 0, %s111910; CHECK-NEXT:    lea %s11, -272(, %s11)1911; CHECK-NEXT:    brge.l.t %s11, %s8, .LBB42_21912; CHECK-NEXT:  # %bb.1: # %bb1913; CHECK-NEXT:    ld %s61, 24(, %s14)1914; CHECK-NEXT:    or %s62, 0, %s01915; CHECK-NEXT:    lea %s63, 3151916; CHECK-NEXT:    shm.l %s63, (%s61)1917; CHECK-NEXT:    shm.l %s8, 8(%s61)1918; CHECK-NEXT:    shm.l %s11, 16(%s61)1919; CHECK-NEXT:    monc1920; CHECK-NEXT:    or %s0, 0, %s621921; CHECK-NEXT:  .LBB42_2: # %bb1922; CHECK-NEXT:    or %s6, 0, %s01923; CHECK-NEXT:    st %s2, 264(, %s11)1924; CHECK-NEXT:    st %s1, 256(, %s11)1925; CHECK-NEXT:    lea %s0, __atomic_compare_exchange@lo1926; CHECK-NEXT:    and %s0, %s0, (32)01927; CHECK-NEXT:    lea.sl %s12, __atomic_compare_exchange@hi(, %s0)1928; CHECK-NEXT:    lea %s1, 240(, %s11)1929; CHECK-NEXT:    lea %s3, 256(, %s11)1930; CHECK-NEXT:    or %s0, 16, (0)11931; CHECK-NEXT:    or %s4, 0, (0)11932; CHECK-NEXT:    or %s5, 0, (0)11933; CHECK-NEXT:    or %s2, 0, %s61934; CHECK-NEXT:    bsic %s10, (, %s12)1935; CHECK-NEXT:    or %s1, 0, (0)11936; CHECK-NEXT:    or %s11, 0, %s91937; CHECK-NEXT:    ld %s10, 8(, %s11)1938; CHECK-NEXT:    ld %s9, (, %s11)1939; CHECK-NEXT:    b.l.t (, %s10)1940bb:1941  %i = alloca i128, align 161942  %i2 = alloca %"struct.std::__1::atomic.40", align 161943  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %i2)1944  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %i)1945  store i128 %arg1, ptr %i, align 16, !tbaa !01946  %i6 = call zeroext i1 @__atomic_compare_exchange(i64 16, ptr nonnull %i2, ptr nonnull %arg, ptr nonnull %i, i32 signext 0, i32 signext 0)1947  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %i)1948  %i7 = zext i1 %i6 to i1281949  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %i2)1950  ret i128 %i71951}1952 1953; Function Attrs: nounwind mustprogress1954define i128 @_Z32atomic_cmp_swap_relaxed_stk_u128Roo(ptr nonnull align 16 dereferenceable(16) %arg, i128 %arg1) {1955; CHECK-LABEL: _Z32atomic_cmp_swap_relaxed_stk_u128Roo:1956; CHECK:       # %bb.0: # %bb1957; CHECK-NEXT:    st %s9, (, %s11)1958; CHECK-NEXT:    st %s10, 8(, %s11)1959; CHECK-NEXT:    or %s9, 0, %s111960; CHECK-NEXT:    lea %s11, -272(, %s11)1961; CHECK-NEXT:    brge.l.t %s11, %s8, .LBB43_21962; CHECK-NEXT:  # %bb.1: # %bb1963; CHECK-NEXT:    ld %s61, 24(, %s14)1964; CHECK-NEXT:    or %s62, 0, %s01965; CHECK-NEXT:    lea %s63, 3151966; CHECK-NEXT:    shm.l %s63, (%s61)1967; CHECK-NEXT:    shm.l %s8, 8(%s61)1968; CHECK-NEXT:    shm.l %s11, 16(%s61)1969; CHECK-NEXT:    monc1970; CHECK-NEXT:    or %s0, 0, %s621971; CHECK-NEXT:  .LBB43_2: # %bb1972; CHECK-NEXT:    or %s6, 0, %s01973; CHECK-NEXT:    st %s2, 264(, %s11)1974; CHECK-NEXT:    st %s1, 256(, %s11)1975; CHECK-NEXT:    lea %s0, __atomic_compare_exchange@lo1976; CHECK-NEXT:    and %s0, %s0, (32)01977; CHECK-NEXT:    lea.sl %s12, __atomic_compare_exchange@hi(, %s0)1978; CHECK-NEXT:    lea %s1, 240(, %s11)1979; CHECK-NEXT:    lea %s3, 256(, %s11)1980; CHECK-NEXT:    or %s0, 16, (0)11981; CHECK-NEXT:    or %s4, 0, (0)11982; CHECK-NEXT:    or %s5, 0, (0)11983; CHECK-NEXT:    or %s2, 0, %s61984; CHECK-NEXT:    bsic %s10, (, %s12)1985; CHECK-NEXT:    or %s1, 0, (0)11986; CHECK-NEXT:    or %s11, 0, %s91987; CHECK-NEXT:    ld %s10, 8(, %s11)1988; CHECK-NEXT:    ld %s9, (, %s11)1989; CHECK-NEXT:    b.l.t (, %s10)1990bb:1991  %i = alloca i128, align 161992  %i2 = alloca %"struct.std::__1::atomic.45", align 161993  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %i2)1994  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %i)1995  store i128 %arg1, ptr %i, align 16, !tbaa !01996  %i6 = call zeroext i1 @__atomic_compare_exchange(i64 16, ptr nonnull %i2, ptr nonnull %arg, ptr nonnull %i, i32 signext 0, i32 signext 0)1997  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %i)1998  %i7 = zext i1 %i6 to i1281999  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %i2)2000  ret i128 %i72001}2002 2003; Function Attrs: nofree norecurse nounwind mustprogress2004define zeroext i1 @_Z29atomic_cmp_swap_relaxed_gv_i1Rbb(ptr nocapture nonnull align 1 dereferenceable(1) %arg, i1 zeroext %arg1) {2005; CHECK-LABEL: _Z29atomic_cmp_swap_relaxed_gv_i1Rbb:2006; CHECK:       # %bb.0: # %bb2007; CHECK-NEXT:    and %s2, %s1, (32)02008; CHECK-NEXT:    lea %s1, gv_i1@lo2009; CHECK-NEXT:    and %s1, %s1, (32)02010; CHECK-NEXT:    lea.sl %s1, gv_i1@hi(, %s1)2011; CHECK-NEXT:    and %s1, -4, %s12012; CHECK-NEXT:    ldl.zx %s4, (, %s1)2013; CHECK-NEXT:    ld1b.zx %s3, (, %s0)2014; CHECK-NEXT:    lea %s5, -2562015; CHECK-NEXT:    and %s5, %s5, (32)02016; CHECK-NEXT:    and %s4, %s4, %s52017; CHECK-NEXT:    and %s4, %s4, (32)02018; CHECK-NEXT:    or %s2, %s4, %s22019; CHECK-NEXT:    or %s3, %s4, %s32020; CHECK-NEXT:    cas.w %s2, (%s1), %s32021; CHECK-NEXT:    cmps.w.sx %s3, %s2, %s32022; CHECK-NEXT:    or %s1, 0, (0)12023; CHECK-NEXT:    cmov.w.eq %s1, (63)0, %s32024; CHECK-NEXT:    brne.w 0, %s1, .LBB44_22025; CHECK-NEXT:  # %bb.1: # %bb52026; CHECK-NEXT:    st1b %s2, (, %s0)2027; CHECK-NEXT:  .LBB44_2: # %bb72028; CHECK-NEXT:    adds.w.zx %s0, %s1, (0)12029; CHECK-NEXT:    b.l.t (, %s10)2030bb:2031  %i = zext i1 %arg1 to i82032  %i2 = load i8, ptr %arg, align 12033  %i3 = cmpxchg weak ptr @gv_i1, i8 %i2, i8 %i monotonic monotonic, align 12034  %i4 = extractvalue { i8, i1 } %i3, 12035  br i1 %i4, label %bb7, label %bb52036 2037bb5:                                              ; preds = %bb2038  %i6 = extractvalue { i8, i1 } %i3, 02039  store i8 %i6, ptr %arg, align 12040  br label %bb72041 2042bb7:                                              ; preds = %bb5, %bb2043  ret i1 %i42044}2045 2046; Function Attrs: nofree norecurse nounwind mustprogress2047define signext i8 @_Z29atomic_cmp_swap_relaxed_gv_i8Rcc(ptr nocapture nonnull align 1 dereferenceable(1) %arg, i8 signext %arg1) {2048; CHECK-LABEL: _Z29atomic_cmp_swap_relaxed_gv_i8Rcc:2049; CHECK:       # %bb.0: # %bb2050; CHECK-NEXT:    ld1b.zx %s2, (, %s0)2051; CHECK-NEXT:    lea %s3, gv_i8@lo2052; CHECK-NEXT:    and %s3, %s3, (32)02053; CHECK-NEXT:    lea.sl %s3, gv_i8@hi(, %s3)2054; CHECK-NEXT:    and %s3, -4, %s32055; CHECK-NEXT:    and %s1, %s1, (56)02056; CHECK-NEXT:    ldl.zx %s4, (, %s3)2057; CHECK-NEXT:    and %s1, %s1, (32)02058; CHECK-NEXT:    lea %s5, -2562059; CHECK-NEXT:    and %s5, %s5, (32)02060; CHECK-NEXT:    and %s4, %s4, %s52061; CHECK-NEXT:    and %s4, %s4, (32)02062; CHECK-NEXT:    or %s1, %s4, %s12063; CHECK-NEXT:    or %s2, %s4, %s22064; CHECK-NEXT:    cas.w %s1, (%s3), %s22065; CHECK-NEXT:    cmps.w.sx %s3, %s1, %s22066; CHECK-NEXT:    or %s2, 0, (0)12067; CHECK-NEXT:    cmov.w.eq %s2, (63)0, %s32068; CHECK-NEXT:    brne.w 0, %s2, .LBB45_22069; CHECK-NEXT:  # %bb.1: # %bb42070; CHECK-NEXT:    st1b %s1, (, %s0)2071; CHECK-NEXT:  .LBB45_2: # %bb62072; CHECK-NEXT:    adds.w.zx %s0, %s2, (0)12073; CHECK-NEXT:    b.l.t (, %s10)2074bb:2075  %i = load i8, ptr %arg, align 12076  %i2 = cmpxchg weak ptr @gv_i8, i8 %i, i8 %arg1 monotonic monotonic, align 12077  %i3 = extractvalue { i8, i1 } %i2, 12078  br i1 %i3, label %bb6, label %bb42079 2080bb4:                                              ; preds = %bb2081  %i5 = extractvalue { i8, i1 } %i2, 02082  store i8 %i5, ptr %arg, align 12083  br label %bb62084 2085bb6:                                              ; preds = %bb4, %bb2086  %i7 = zext i1 %i3 to i82087  ret i8 %i72088}2089 2090; Function Attrs: nofree norecurse nounwind mustprogress2091define zeroext i8 @_Z29atomic_cmp_swap_relaxed_gv_u8Rhh(ptr nocapture nonnull align 1 dereferenceable(1) %arg, i8 zeroext %arg1) {2092; CHECK-LABEL: _Z29atomic_cmp_swap_relaxed_gv_u8Rhh:2093; CHECK:       # %bb.0: # %bb2094; CHECK-NEXT:    and %s2, %s1, (32)02095; CHECK-NEXT:    lea %s1, gv_u8@lo2096; CHECK-NEXT:    and %s1, %s1, (32)02097; CHECK-NEXT:    lea.sl %s1, gv_u8@hi(, %s1)2098; CHECK-NEXT:    and %s1, -4, %s12099; CHECK-NEXT:    ldl.zx %s4, (, %s1)2100; CHECK-NEXT:    ld1b.zx %s3, (, %s0)2101; CHECK-NEXT:    lea %s5, -2562102; CHECK-NEXT:    and %s5, %s5, (32)02103; CHECK-NEXT:    and %s4, %s4, %s52104; CHECK-NEXT:    and %s4, %s4, (32)02105; CHECK-NEXT:    or %s2, %s4, %s22106; CHECK-NEXT:    or %s3, %s4, %s32107; CHECK-NEXT:    cas.w %s2, (%s1), %s32108; CHECK-NEXT:    cmps.w.sx %s3, %s2, %s32109; CHECK-NEXT:    or %s1, 0, (0)12110; CHECK-NEXT:    cmov.w.eq %s1, (63)0, %s32111; CHECK-NEXT:    brne.w 0, %s1, .LBB46_22112; CHECK-NEXT:  # %bb.1: # %bb42113; CHECK-NEXT:    st1b %s2, (, %s0)2114; CHECK-NEXT:  .LBB46_2: # %bb62115; CHECK-NEXT:    adds.w.zx %s0, %s1, (0)12116; CHECK-NEXT:    b.l.t (, %s10)2117bb:2118  %i = load i8, ptr %arg, align 12119  %i2 = cmpxchg weak ptr @gv_u8, i8 %i, i8 %arg1 monotonic monotonic, align 12120  %i3 = extractvalue { i8, i1 } %i2, 12121  br i1 %i3, label %bb6, label %bb42122 2123bb4:                                              ; preds = %bb2124  %i5 = extractvalue { i8, i1 } %i2, 02125  store i8 %i5, ptr %arg, align 12126  br label %bb62127 2128bb6:                                              ; preds = %bb4, %bb2129  %i7 = zext i1 %i3 to i82130  ret i8 %i72131}2132 2133; Function Attrs: nofree norecurse nounwind mustprogress2134define signext i16 @_Z30atomic_cmp_swap_relaxed_gv_i16Rss(ptr nocapture nonnull align 2 dereferenceable(2) %arg, i16 signext %arg1) {2135; CHECK-LABEL: _Z30atomic_cmp_swap_relaxed_gv_i16Rss:2136; CHECK:       # %bb.0: # %bb2137; CHECK-NEXT:    lea %s2, gv_i16@lo2138; CHECK-NEXT:    and %s2, %s2, (32)02139; CHECK-NEXT:    lea.sl %s2, gv_i16@hi(, %s2)2140; CHECK-NEXT:    and %s2, -4, %s22141; CHECK-NEXT:    ld2b.zx %s4, 2(, %s2)2142; CHECK-NEXT:    ld2b.zx %s3, (, %s0)2143; CHECK-NEXT:    and %s1, %s1, (48)02144; CHECK-NEXT:    and %s1, %s1, (32)02145; CHECK-NEXT:    sla.w.sx %s4, %s4, 162146; CHECK-NEXT:    or %s1, %s4, %s12147; CHECK-NEXT:    or %s3, %s4, %s32148; CHECK-NEXT:    cas.w %s1, (%s2), %s32149; CHECK-NEXT:    cmps.w.sx %s3, %s1, %s32150; CHECK-NEXT:    or %s2, 0, (0)12151; CHECK-NEXT:    cmov.w.eq %s2, (63)0, %s32152; CHECK-NEXT:    brne.w 0, %s2, .LBB47_22153; CHECK-NEXT:  # %bb.1: # %bb42154; CHECK-NEXT:    st2b %s1, (, %s0)2155; CHECK-NEXT:  .LBB47_2: # %bb62156; CHECK-NEXT:    adds.w.zx %s0, %s2, (0)12157; CHECK-NEXT:    b.l.t (, %s10)2158bb:2159  %i = load i16, ptr %arg, align 22160  %i2 = cmpxchg weak ptr @gv_i16, i16 %i, i16 %arg1 monotonic monotonic, align 22161  %i3 = extractvalue { i16, i1 } %i2, 12162  br i1 %i3, label %bb6, label %bb42163 2164bb4:                                              ; preds = %bb2165  %i5 = extractvalue { i16, i1 } %i2, 02166  store i16 %i5, ptr %arg, align 22167  br label %bb62168 2169bb6:                                              ; preds = %bb4, %bb2170  %i7 = zext i1 %i3 to i162171  ret i16 %i72172}2173 2174; Function Attrs: nofree norecurse nounwind mustprogress2175define zeroext i16 @_Z30atomic_cmp_swap_relaxed_gv_u16Rtt(ptr nocapture nonnull align 2 dereferenceable(2) %arg, i16 zeroext %arg1) {2176; CHECK-LABEL: _Z30atomic_cmp_swap_relaxed_gv_u16Rtt:2177; CHECK:       # %bb.0: # %bb2178; CHECK-NEXT:    lea %s2, gv_u16@lo2179; CHECK-NEXT:    and %s2, %s2, (32)02180; CHECK-NEXT:    lea.sl %s2, gv_u16@hi(, %s2)2181; CHECK-NEXT:    and %s2, -4, %s22182; CHECK-NEXT:    ld2b.zx %s4, 2(, %s2)2183; CHECK-NEXT:    ld2b.zx %s3, (, %s0)2184; CHECK-NEXT:    and %s1, %s1, (32)02185; CHECK-NEXT:    sla.w.sx %s4, %s4, 162186; CHECK-NEXT:    or %s1, %s4, %s12187; CHECK-NEXT:    or %s3, %s4, %s32188; CHECK-NEXT:    cas.w %s1, (%s2), %s32189; CHECK-NEXT:    cmps.w.sx %s3, %s1, %s32190; CHECK-NEXT:    or %s2, 0, (0)12191; CHECK-NEXT:    cmov.w.eq %s2, (63)0, %s32192; CHECK-NEXT:    brne.w 0, %s2, .LBB48_22193; CHECK-NEXT:  # %bb.1: # %bb42194; CHECK-NEXT:    st2b %s1, (, %s0)2195; CHECK-NEXT:  .LBB48_2: # %bb62196; CHECK-NEXT:    adds.w.zx %s0, %s2, (0)12197; CHECK-NEXT:    b.l.t (, %s10)2198bb:2199  %i = load i16, ptr %arg, align 22200  %i2 = cmpxchg weak ptr @gv_u16, i16 %i, i16 %arg1 monotonic monotonic, align 22201  %i3 = extractvalue { i16, i1 } %i2, 12202  br i1 %i3, label %bb6, label %bb42203 2204bb4:                                              ; preds = %bb2205  %i5 = extractvalue { i16, i1 } %i2, 02206  store i16 %i5, ptr %arg, align 22207  br label %bb62208 2209bb6:                                              ; preds = %bb4, %bb2210  %i7 = zext i1 %i3 to i162211  ret i16 %i72212}2213 2214; Function Attrs: nofree norecurse nounwind mustprogress2215define signext i32 @_Z30atomic_cmp_swap_relaxed_gv_i32Rii(ptr nocapture nonnull align 4 dereferenceable(4) %arg, i32 signext %arg1) {2216; CHECK-LABEL: _Z30atomic_cmp_swap_relaxed_gv_i32Rii:2217; CHECK:       # %bb.0: # %bb2218; CHECK-NEXT:    ldl.sx %s3, (, %s0)2219; CHECK-NEXT:    lea %s2, gv_i32@lo2220; CHECK-NEXT:    and %s2, %s2, (32)02221; CHECK-NEXT:    lea.sl %s2, gv_i32@hi(, %s2)2222; CHECK-NEXT:    cas.w %s1, (%s2), %s32223; CHECK-NEXT:    cmps.w.sx %s4, %s1, %s32224; CHECK-NEXT:    or %s2, 0, (0)12225; CHECK-NEXT:    cmov.w.eq %s2, (63)0, %s42226; CHECK-NEXT:    breq.w %s1, %s3, .LBB49_22227; CHECK-NEXT:  # %bb.1: # %bb42228; CHECK-NEXT:    stl %s1, (, %s0)2229; CHECK-NEXT:  .LBB49_2: # %bb62230; CHECK-NEXT:    adds.w.zx %s0, %s2, (0)12231; CHECK-NEXT:    b.l.t (, %s10)2232bb:2233  %i = load i32, ptr %arg, align 42234  %i2 = cmpxchg weak ptr @gv_i32, i32 %i, i32 %arg1 monotonic monotonic, align 42235  %i3 = extractvalue { i32, i1 } %i2, 12236  br i1 %i3, label %bb6, label %bb42237 2238bb4:                                              ; preds = %bb2239  %i5 = extractvalue { i32, i1 } %i2, 02240  store i32 %i5, ptr %arg, align 42241  br label %bb62242 2243bb6:                                              ; preds = %bb4, %bb2244  %i7 = zext i1 %i3 to i322245  ret i32 %i72246}2247 2248; Function Attrs: nofree norecurse nounwind mustprogress2249define zeroext i32 @_Z30atomic_cmp_swap_relaxed_gv_u32Rjj(ptr nocapture nonnull align 4 dereferenceable(4) %arg, i32 zeroext %arg1) {2250; CHECK-LABEL: _Z30atomic_cmp_swap_relaxed_gv_u32Rjj:2251; CHECK:       # %bb.0: # %bb2252; CHECK-NEXT:    ldl.sx %s3, (, %s0)2253; CHECK-NEXT:    lea %s2, gv_u32@lo2254; CHECK-NEXT:    and %s2, %s2, (32)02255; CHECK-NEXT:    lea.sl %s2, gv_u32@hi(, %s2)2256; CHECK-NEXT:    cas.w %s1, (%s2), %s32257; CHECK-NEXT:    cmps.w.sx %s4, %s1, %s32258; CHECK-NEXT:    or %s2, 0, (0)12259; CHECK-NEXT:    cmov.w.eq %s2, (63)0, %s42260; CHECK-NEXT:    breq.w %s1, %s3, .LBB50_22261; CHECK-NEXT:  # %bb.1: # %bb42262; CHECK-NEXT:    stl %s1, (, %s0)2263; CHECK-NEXT:  .LBB50_2: # %bb62264; CHECK-NEXT:    adds.w.zx %s0, %s2, (0)12265; CHECK-NEXT:    b.l.t (, %s10)2266bb:2267  %i = load i32, ptr %arg, align 42268  %i2 = cmpxchg weak ptr @gv_u32, i32 %i, i32 %arg1 monotonic monotonic, align 42269  %i3 = extractvalue { i32, i1 } %i2, 12270  br i1 %i3, label %bb6, label %bb42271 2272bb4:                                              ; preds = %bb2273  %i5 = extractvalue { i32, i1 } %i2, 02274  store i32 %i5, ptr %arg, align 42275  br label %bb62276 2277bb6:                                              ; preds = %bb4, %bb2278  %i7 = zext i1 %i3 to i322279  ret i32 %i72280}2281 2282; Function Attrs: nofree norecurse nounwind mustprogress2283define i64 @_Z30atomic_cmp_swap_relaxed_gv_i64Rll(ptr nocapture nonnull align 8 dereferenceable(8) %arg, i64 %arg1) {2284; CHECK-LABEL: _Z30atomic_cmp_swap_relaxed_gv_i64Rll:2285; CHECK:       # %bb.0: # %bb2286; CHECK-NEXT:    ld %s3, (, %s0)2287; CHECK-NEXT:    lea %s2, gv_i64@lo2288; CHECK-NEXT:    and %s2, %s2, (32)02289; CHECK-NEXT:    lea.sl %s2, gv_i64@hi(, %s2)2290; CHECK-NEXT:    cas.l %s1, (%s2), %s32291; CHECK-NEXT:    cmps.l %s4, %s1, %s32292; CHECK-NEXT:    or %s2, 0, (0)12293; CHECK-NEXT:    cmov.l.eq %s2, (63)0, %s42294; CHECK-NEXT:    breq.l %s1, %s3, .LBB51_22295; CHECK-NEXT:  # %bb.1: # %bb42296; CHECK-NEXT:    st %s1, (, %s0)2297; CHECK-NEXT:  .LBB51_2: # %bb62298; CHECK-NEXT:    adds.w.zx %s0, %s2, (0)12299; CHECK-NEXT:    b.l.t (, %s10)2300bb:2301  %i = load i64, ptr %arg, align 82302  %i2 = cmpxchg weak ptr @gv_i64, i64 %i, i64 %arg1 monotonic monotonic, align 82303  %i3 = extractvalue { i64, i1 } %i2, 12304  br i1 %i3, label %bb6, label %bb42305 2306bb4:                                              ; preds = %bb2307  %i5 = extractvalue { i64, i1 } %i2, 02308  store i64 %i5, ptr %arg, align 82309  br label %bb62310 2311bb6:                                              ; preds = %bb4, %bb2312  %i7 = zext i1 %i3 to i642313  ret i64 %i72314}2315 2316; Function Attrs: nofree norecurse nounwind mustprogress2317define i64 @_Z30atomic_cmp_swap_relaxed_gv_u64Rmm(ptr nocapture nonnull align 8 dereferenceable(8) %arg, i64 %arg1) {2318; CHECK-LABEL: _Z30atomic_cmp_swap_relaxed_gv_u64Rmm:2319; CHECK:       # %bb.0: # %bb2320; CHECK-NEXT:    ld %s3, (, %s0)2321; CHECK-NEXT:    lea %s2, gv_u64@lo2322; CHECK-NEXT:    and %s2, %s2, (32)02323; CHECK-NEXT:    lea.sl %s2, gv_u64@hi(, %s2)2324; CHECK-NEXT:    cas.l %s1, (%s2), %s32325; CHECK-NEXT:    cmps.l %s4, %s1, %s32326; CHECK-NEXT:    or %s2, 0, (0)12327; CHECK-NEXT:    cmov.l.eq %s2, (63)0, %s42328; CHECK-NEXT:    breq.l %s1, %s3, .LBB52_22329; CHECK-NEXT:  # %bb.1: # %bb42330; CHECK-NEXT:    st %s1, (, %s0)2331; CHECK-NEXT:  .LBB52_2: # %bb62332; CHECK-NEXT:    adds.w.zx %s0, %s2, (0)12333; CHECK-NEXT:    b.l.t (, %s10)2334bb:2335  %i = load i64, ptr %arg, align 82336  %i2 = cmpxchg weak ptr @gv_u64, i64 %i, i64 %arg1 monotonic monotonic, align 82337  %i3 = extractvalue { i64, i1 } %i2, 12338  br i1 %i3, label %bb6, label %bb42339 2340bb4:                                              ; preds = %bb2341  %i5 = extractvalue { i64, i1 } %i2, 02342  store i64 %i5, ptr %arg, align 82343  br label %bb62344 2345bb6:                                              ; preds = %bb4, %bb2346  %i7 = zext i1 %i3 to i642347  ret i64 %i72348}2349 2350; Function Attrs: nounwind mustprogress2351define i128 @_Z31atomic_cmp_swap_relaxed_gv_i128Rnn(ptr nonnull align 16 dereferenceable(16) %arg, i128 %arg1) {2352; CHECK-LABEL: _Z31atomic_cmp_swap_relaxed_gv_i128Rnn:2353; CHECK:       # %bb.0: # %bb2354; CHECK-NEXT:    st %s9, (, %s11)2355; CHECK-NEXT:    st %s10, 8(, %s11)2356; CHECK-NEXT:    or %s9, 0, %s112357; CHECK-NEXT:    lea %s11, -256(, %s11)2358; CHECK-NEXT:    brge.l.t %s11, %s8, .LBB53_22359; CHECK-NEXT:  # %bb.1: # %bb2360; CHECK-NEXT:    ld %s61, 24(, %s14)2361; CHECK-NEXT:    or %s62, 0, %s02362; CHECK-NEXT:    lea %s63, 3152363; CHECK-NEXT:    shm.l %s63, (%s61)2364; CHECK-NEXT:    shm.l %s8, 8(%s61)2365; CHECK-NEXT:    shm.l %s11, 16(%s61)2366; CHECK-NEXT:    monc2367; CHECK-NEXT:    or %s0, 0, %s622368; CHECK-NEXT:  .LBB53_2: # %bb2369; CHECK-NEXT:    or %s6, 0, %s02370; CHECK-NEXT:    st %s2, 248(, %s11)2371; CHECK-NEXT:    st %s1, 240(, %s11)2372; CHECK-NEXT:    lea %s0, __atomic_compare_exchange@lo2373; CHECK-NEXT:    and %s0, %s0, (32)02374; CHECK-NEXT:    lea.sl %s12, __atomic_compare_exchange@hi(, %s0)2375; CHECK-NEXT:    lea %s0, gv_i128@lo2376; CHECK-NEXT:    and %s0, %s0, (32)02377; CHECK-NEXT:    lea.sl %s1, gv_i128@hi(, %s0)2378; CHECK-NEXT:    lea %s3, 240(, %s11)2379; CHECK-NEXT:    or %s0, 16, (0)12380; CHECK-NEXT:    or %s4, 0, (0)12381; CHECK-NEXT:    or %s5, 0, (0)12382; CHECK-NEXT:    or %s2, 0, %s62383; CHECK-NEXT:    bsic %s10, (, %s12)2384; CHECK-NEXT:    or %s1, 0, (0)12385; CHECK-NEXT:    or %s11, 0, %s92386; CHECK-NEXT:    ld %s10, 8(, %s11)2387; CHECK-NEXT:    ld %s9, (, %s11)2388; CHECK-NEXT:    b.l.t (, %s10)2389bb:2390  %i = alloca i128, align 162391  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %i)2392  store i128 %arg1, ptr %i, align 16, !tbaa !02393  %i4 = call zeroext i1 @__atomic_compare_exchange(i64 16, ptr nonnull @gv_i128, ptr nonnull %arg, ptr nonnull %i, i32 signext 0, i32 signext 0)2394  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %i)2395  %i5 = zext i1 %i4 to i1282396  ret i128 %i52397}2398 2399; Function Attrs: nounwind mustprogress2400define i128 @_Z31atomic_cmp_swap_relaxed_gv_u128Roo(ptr nonnull align 16 dereferenceable(16) %arg, i128 %arg1) {2401; CHECK-LABEL: _Z31atomic_cmp_swap_relaxed_gv_u128Roo:2402; CHECK:       # %bb.0: # %bb2403; CHECK-NEXT:    st %s9, (, %s11)2404; CHECK-NEXT:    st %s10, 8(, %s11)2405; CHECK-NEXT:    or %s9, 0, %s112406; CHECK-NEXT:    lea %s11, -256(, %s11)2407; CHECK-NEXT:    brge.l.t %s11, %s8, .LBB54_22408; CHECK-NEXT:  # %bb.1: # %bb2409; CHECK-NEXT:    ld %s61, 24(, %s14)2410; CHECK-NEXT:    or %s62, 0, %s02411; CHECK-NEXT:    lea %s63, 3152412; CHECK-NEXT:    shm.l %s63, (%s61)2413; CHECK-NEXT:    shm.l %s8, 8(%s61)2414; CHECK-NEXT:    shm.l %s11, 16(%s61)2415; CHECK-NEXT:    monc2416; CHECK-NEXT:    or %s0, 0, %s622417; CHECK-NEXT:  .LBB54_2: # %bb2418; CHECK-NEXT:    or %s6, 0, %s02419; CHECK-NEXT:    st %s2, 248(, %s11)2420; CHECK-NEXT:    st %s1, 240(, %s11)2421; CHECK-NEXT:    lea %s0, __atomic_compare_exchange@lo2422; CHECK-NEXT:    and %s0, %s0, (32)02423; CHECK-NEXT:    lea.sl %s12, __atomic_compare_exchange@hi(, %s0)2424; CHECK-NEXT:    lea %s0, gv_u128@lo2425; CHECK-NEXT:    and %s0, %s0, (32)02426; CHECK-NEXT:    lea.sl %s1, gv_u128@hi(, %s0)2427; CHECK-NEXT:    lea %s3, 240(, %s11)2428; CHECK-NEXT:    or %s0, 16, (0)12429; CHECK-NEXT:    or %s4, 0, (0)12430; CHECK-NEXT:    or %s5, 0, (0)12431; CHECK-NEXT:    or %s2, 0, %s62432; CHECK-NEXT:    bsic %s10, (, %s12)2433; CHECK-NEXT:    or %s1, 0, (0)12434; CHECK-NEXT:    or %s11, 0, %s92435; CHECK-NEXT:    ld %s10, 8(, %s11)2436; CHECK-NEXT:    ld %s9, (, %s11)2437; CHECK-NEXT:    b.l.t (, %s10)2438bb:2439  %i = alloca i128, align 162440  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %i)2441  store i128 %arg1, ptr %i, align 16, !tbaa !02442  %i4 = call zeroext i1 @__atomic_compare_exchange(i64 16, ptr nonnull @gv_u128, ptr nonnull %arg, ptr nonnull %i, i32 signext 0, i32 signext 0)2443  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %i)2444  %i5 = zext i1 %i4 to i1282445  ret i128 %i52446}2447 2448; Function Attrs: nounwind willreturn2449declare i1 @__atomic_compare_exchange(i64, ptr, ptr, ptr, i32, i32)2450 2451!0 = !{!1, !1, i64 0}2452!1 = !{!"__int128", !2, i64 0}2453!2 = !{!"omnipotent char", !3, i64 0}2454!3 = !{!"Simple C++ TBAA"}2455