1; RUN: llc < %s -mtriple=ve | FileCheck %s 2 3;;; Test atomic store for all types and all memory order 4;;; 5;;; Note: 6;;; We test i1/i8/i16/i32/i64/i128/u8/u16/u32/u64/u128. 7;;; We test relaxed, release, and seq_cst. 8 9%"struct.std::__1::atomic" = type { %"struct.std::__1::__atomic_base" } 10%"struct.std::__1::__atomic_base" = type { %"struct.std::__1::__cxx_atomic_impl" } 11%"struct.std::__1::__cxx_atomic_impl" = type { %"struct.std::__1::__cxx_atomic_base_impl" } 12%"struct.std::__1::__cxx_atomic_base_impl" = type { i8 } 13%"struct.std::__1::atomic.0" = type { %"struct.std::__1::__atomic_base.1" } 14%"struct.std::__1::__atomic_base.1" = type { %"struct.std::__1::__atomic_base.2" } 15%"struct.std::__1::__atomic_base.2" = type { %"struct.std::__1::__cxx_atomic_impl.3" } 16%"struct.std::__1::__cxx_atomic_impl.3" = type { %"struct.std::__1::__cxx_atomic_base_impl.4" } 17%"struct.std::__1::__cxx_atomic_base_impl.4" = type { i8 } 18%"struct.std::__1::atomic.5" = type { %"struct.std::__1::__atomic_base.6" } 19%"struct.std::__1::__atomic_base.6" = type { %"struct.std::__1::__atomic_base.7" } 20%"struct.std::__1::__atomic_base.7" = type { %"struct.std::__1::__cxx_atomic_impl.8" } 21%"struct.std::__1::__cxx_atomic_impl.8" = type { %"struct.std::__1::__cxx_atomic_base_impl.9" } 22%"struct.std::__1::__cxx_atomic_base_impl.9" = type { i8 } 23%"struct.std::__1::atomic.10" = type { %"struct.std::__1::__atomic_base.11" } 24%"struct.std::__1::__atomic_base.11" = type { %"struct.std::__1::__atomic_base.12" } 25%"struct.std::__1::__atomic_base.12" = type { %"struct.std::__1::__cxx_atomic_impl.13" } 26%"struct.std::__1::__cxx_atomic_impl.13" = type { %"struct.std::__1::__cxx_atomic_base_impl.14" } 27%"struct.std::__1::__cxx_atomic_base_impl.14" = type { i16 } 28%"struct.std::__1::atomic.15" = type { %"struct.std::__1::__atomic_base.16" } 29%"struct.std::__1::__atomic_base.16" = type { %"struct.std::__1::__atomic_base.17" } 30%"struct.std::__1::__atomic_base.17" = type { %"struct.std::__1::__cxx_atomic_impl.18" } 31%"struct.std::__1::__cxx_atomic_impl.18" = type { %"struct.std::__1::__cxx_atomic_base_impl.19" } 32%"struct.std::__1::__cxx_atomic_base_impl.19" = type { i16 } 33%"struct.std::__1::atomic.20" = type { %"struct.std::__1::__atomic_base.21" } 34%"struct.std::__1::__atomic_base.21" = type { %"struct.std::__1::__atomic_base.22" } 35%"struct.std::__1::__atomic_base.22" = type { %"struct.std::__1::__cxx_atomic_impl.23" } 36%"struct.std::__1::__cxx_atomic_impl.23" = type { %"struct.std::__1::__cxx_atomic_base_impl.24" } 37%"struct.std::__1::__cxx_atomic_base_impl.24" = type { i32 } 38%"struct.std::__1::atomic.25" = type { %"struct.std::__1::__atomic_base.26" } 39%"struct.std::__1::__atomic_base.26" = type { %"struct.std::__1::__atomic_base.27" } 40%"struct.std::__1::__atomic_base.27" = type { %"struct.std::__1::__cxx_atomic_impl.28" } 41%"struct.std::__1::__cxx_atomic_impl.28" = type { %"struct.std::__1::__cxx_atomic_base_impl.29" } 42%"struct.std::__1::__cxx_atomic_base_impl.29" = type { i32 } 43%"struct.std::__1::atomic.30" = type { %"struct.std::__1::__atomic_base.31" } 44%"struct.std::__1::__atomic_base.31" = type { %"struct.std::__1::__atomic_base.32" } 45%"struct.std::__1::__atomic_base.32" = type { %"struct.std::__1::__cxx_atomic_impl.33" } 46%"struct.std::__1::__cxx_atomic_impl.33" = type { %"struct.std::__1::__cxx_atomic_base_impl.34" } 47%"struct.std::__1::__cxx_atomic_base_impl.34" = type { i64 } 48%"struct.std::__1::atomic.35" = type { %"struct.std::__1::__atomic_base.36" } 49%"struct.std::__1::__atomic_base.36" = type { %"struct.std::__1::__atomic_base.37" } 50%"struct.std::__1::__atomic_base.37" = type { %"struct.std::__1::__cxx_atomic_impl.38" } 51%"struct.std::__1::__cxx_atomic_impl.38" = type { %"struct.std::__1::__cxx_atomic_base_impl.39" } 52%"struct.std::__1::__cxx_atomic_base_impl.39" = type { i64 } 53%"struct.std::__1::atomic.40" = type { %"struct.std::__1::__atomic_base.41" } 54%"struct.std::__1::__atomic_base.41" = type { %"struct.std::__1::__atomic_base.42" } 55%"struct.std::__1::__atomic_base.42" = type { %"struct.std::__1::__cxx_atomic_impl.43" } 56%"struct.std::__1::__cxx_atomic_impl.43" = type { %"struct.std::__1::__cxx_atomic_base_impl.44" } 57%"struct.std::__1::__cxx_atomic_base_impl.44" = type { i128 } 58%"struct.std::__1::atomic.45" = type { %"struct.std::__1::__atomic_base.46" } 59%"struct.std::__1::__atomic_base.46" = type { %"struct.std::__1::__atomic_base.47" } 60%"struct.std::__1::__atomic_base.47" = type { %"struct.std::__1::__cxx_atomic_impl.48" } 61%"struct.std::__1::__cxx_atomic_impl.48" = type { %"struct.std::__1::__cxx_atomic_base_impl.49" } 62%"struct.std::__1::__cxx_atomic_base_impl.49" = type { i128 } 63 64; Function Attrs: nofree norecurse nounwind 65define void @_Z23atomic_store_relaxed_i1RNSt3__16atomicIbEEb(%"struct.std::__1::atomic"* nocapture nonnull align 1 dereferenceable(1) %0, i1 zeroext %1) { 66; CHECK-LABEL: _Z23atomic_store_relaxed_i1RNSt3__16atomicIbEEb: 67; CHECK: # %bb.0: 68; CHECK-NEXT: st1b %s1, (, %s0) 69; CHECK-NEXT: b.l.t (, %s10) 70 %3 = zext i1 %1 to i8 71 %4 = getelementptr inbounds %"struct.std::__1::atomic", %"struct.std::__1::atomic"* %0, i64 0, i32 0, i32 0, i32 0, i32 0 72 store atomic i8 %3, i8* %4 monotonic, align 1 73 ret void 74} 75 76; Function Attrs: nofree norecurse nounwind 77define void @_Z23atomic_store_relaxed_i8RNSt3__16atomicIcEEc(%"struct.std::__1::atomic.0"* nocapture nonnull align 1 dereferenceable(1) %0, i8 signext %1) { 78; CHECK-LABEL: _Z23atomic_store_relaxed_i8RNSt3__16atomicIcEEc: 79; CHECK: # %bb.0: 80; CHECK-NEXT: st1b %s1, (, %s0) 81; CHECK-NEXT: b.l.t (, %s10) 82 %3 = getelementptr inbounds %"struct.std::__1::atomic.0", %"struct.std::__1::atomic.0"* %0, i64 0, i32 0, i32 0, i32 0, i32 0, i32 0 83 store atomic i8 %1, i8* %3 monotonic, align 1 84 ret void 85} 86 87; Function Attrs: nofree norecurse nounwind 88define void @_Z23atomic_store_relaxed_u8RNSt3__16atomicIhEEh(%"struct.std::__1::atomic.5"* nocapture nonnull align 1 dereferenceable(1) %0, i8 zeroext %1) { 89; CHECK-LABEL: _Z23atomic_store_relaxed_u8RNSt3__16atomicIhEEh: 90; CHECK: # %bb.0: 91; CHECK-NEXT: st1b %s1, (, %s0) 92; CHECK-NEXT: b.l.t (, %s10) 93 %3 = getelementptr inbounds %"struct.std::__1::atomic.5", %"struct.std::__1::atomic.5"* %0, i64 0, i32 0, i32 0, i32 0, i32 0, i32 0 94 store atomic i8 %1, i8* %3 monotonic, align 1 95 ret void 96} 97 98; Function Attrs: nofree norecurse nounwind 99define void @_Z24atomic_store_relaxed_i16RNSt3__16atomicIsEEs(%"struct.std::__1::atomic.10"* nocapture nonnull align 2 dereferenceable(2) %0, i16 signext %1) { 100; CHECK-LABEL: _Z24atomic_store_relaxed_i16RNSt3__16atomicIsEEs: 101; CHECK: # %bb.0: 102; CHECK-NEXT: st2b %s1, (, %s0) 103; CHECK-NEXT: b.l.t (, %s10) 104 %3 = getelementptr inbounds %"struct.std::__1::atomic.10", %"struct.std::__1::atomic.10"* %0, i64 0, i32 0, i32 0, i32 0, i32 0, i32 0 105 store atomic i16 %1, i16* %3 monotonic, align 2 106 ret void 107} 108 109; Function Attrs: nofree norecurse nounwind 110define void @_Z24atomic_store_relaxed_u16RNSt3__16atomicItEEt(%"struct.std::__1::atomic.15"* nocapture nonnull align 2 dereferenceable(2) %0, i16 zeroext %1) { 111; CHECK-LABEL: _Z24atomic_store_relaxed_u16RNSt3__16atomicItEEt: 112; CHECK: # %bb.0: 113; CHECK-NEXT: st2b %s1, (, %s0) 114; CHECK-NEXT: b.l.t (, %s10) 115 %3 = getelementptr inbounds %"struct.std::__1::atomic.15", %"struct.std::__1::atomic.15"* %0, i64 0, i32 0, i32 0, i32 0, i32 0, i32 0 116 store atomic i16 %1, i16* %3 monotonic, align 2 117 ret void 118} 119 120; Function Attrs: nofree norecurse nounwind 121define void @_Z24atomic_store_relaxed_i32RNSt3__16atomicIiEEi(%"struct.std::__1::atomic.20"* nocapture nonnull align 4 dereferenceable(4) %0, i32 signext %1) { 122; CHECK-LABEL: _Z24atomic_store_relaxed_i32RNSt3__16atomicIiEEi: 123; CHECK: # %bb.0: 124; CHECK-NEXT: stl %s1, (, %s0) 125; CHECK-NEXT: b.l.t (, %s10) 126 %3 = getelementptr inbounds %"struct.std::__1::atomic.20", %"struct.std::__1::atomic.20"* %0, i64 0, i32 0, i32 0, i32 0, i32 0, i32 0 127 store atomic i32 %1, i32* %3 monotonic, align 4 128 ret void 129} 130 131; Function Attrs: nofree norecurse nounwind 132define void @_Z24atomic_store_relaxed_u32RNSt3__16atomicIjEEj(%"struct.std::__1::atomic.25"* nocapture nonnull align 4 dereferenceable(4) %0, i32 zeroext %1) { 133; CHECK-LABEL: _Z24atomic_store_relaxed_u32RNSt3__16atomicIjEEj: 134; CHECK: # %bb.0: 135; CHECK-NEXT: stl %s1, (, %s0) 136; CHECK-NEXT: b.l.t (, %s10) 137 %3 = getelementptr inbounds %"struct.std::__1::atomic.25", %"struct.std::__1::atomic.25"* %0, i64 0, i32 0, i32 0, i32 0, i32 0, i32 0 138 store atomic i32 %1, i32* %3 monotonic, align 4 139 ret void 140} 141 142; Function Attrs: nofree norecurse nounwind 143define void @_Z24atomic_store_relaxed_i64RNSt3__16atomicIlEEl(%"struct.std::__1::atomic.30"* nocapture nonnull align 8 dereferenceable(8) %0, i64 %1) { 144; CHECK-LABEL: _Z24atomic_store_relaxed_i64RNSt3__16atomicIlEEl: 145; CHECK: # %bb.0: 146; CHECK-NEXT: st %s1, (, %s0) 147; CHECK-NEXT: b.l.t (, %s10) 148 %3 = getelementptr inbounds %"struct.std::__1::atomic.30", %"struct.std::__1::atomic.30"* %0, i64 0, i32 0, i32 0, i32 0, i32 0, i32 0 149 store atomic i64 %1, i64* %3 monotonic, align 8 150 ret void 151} 152 153; Function Attrs: nofree norecurse nounwind 154define void @_Z24atomic_store_relaxed_u64RNSt3__16atomicImEEm(%"struct.std::__1::atomic.35"* nocapture nonnull align 8 dereferenceable(8) %0, i64 %1) { 155; CHECK-LABEL: _Z24atomic_store_relaxed_u64RNSt3__16atomicImEEm: 156; CHECK: # %bb.0: 157; CHECK-NEXT: st %s1, (, %s0) 158; CHECK-NEXT: b.l.t (, %s10) 159 %3 = getelementptr inbounds %"struct.std::__1::atomic.35", %"struct.std::__1::atomic.35"* %0, i64 0, i32 0, i32 0, i32 0, i32 0, i32 0 160 store atomic i64 %1, i64* %3 monotonic, align 8 161 ret void 162} 163 164; Function Attrs: nounwind 165define void @_Z25atomic_store_relaxed_i128RNSt3__16atomicInEEn(%"struct.std::__1::atomic.40"* nonnull align 16 dereferenceable(16) %0, i128 %1) { 166; CHECK-LABEL: _Z25atomic_store_relaxed_i128RNSt3__16atomicInEEn: 167; CHECK: .LBB{{[0-9]+}}_2: 168; CHECK-NEXT: or %s4, 0, %s0 169; CHECK-NEXT: st %s2, 248(, %s11) 170; CHECK-NEXT: st %s1, 240(, %s11) 171; CHECK-NEXT: lea %s0, __atomic_store@lo 172; CHECK-NEXT: and %s0, %s0, (32)0 173; CHECK-NEXT: lea.sl %s12, __atomic_store@hi(, %s0) 174; CHECK-NEXT: lea %s2, 240(, %s11) 175; CHECK-NEXT: or %s0, 16, (0)1 176; CHECK-NEXT: or %s3, 0, (0)1 177; CHECK-NEXT: or %s1, 0, %s4 178; CHECK-NEXT: bsic %s10, (, %s12) 179; CHECK-NEXT: or %s11, 0, %s9 180 %3 = alloca i128, align 16 181 %4 = bitcast i128* %3 to i8* 182 call void @llvm.lifetime.start.p0i8(i64 16, i8* nonnull %4) 183 store i128 %1, i128* %3, align 16, !tbaa !2 184 %5 = bitcast %"struct.std::__1::atomic.40"* %0 to i8* 185 call void @__atomic_store(i64 16, i8* nonnull %5, i8* nonnull %4, i32 signext 0) 186 call void @llvm.lifetime.end.p0i8(i64 16, i8* nonnull %4) 187 ret void 188} 189 190; Function Attrs: nounwind 191define void @_Z25atomic_store_relaxed_u128RNSt3__16atomicIoEEo(%"struct.std::__1::atomic.45"* nonnull align 16 dereferenceable(16) %0, i128 %1) { 192; CHECK-LABEL: _Z25atomic_store_relaxed_u128RNSt3__16atomicIoEEo: 193; CHECK: .LBB{{[0-9]+}}_2: 194; CHECK-NEXT: or %s4, 0, %s0 195; CHECK-NEXT: st %s2, 248(, %s11) 196; CHECK-NEXT: st %s1, 240(, %s11) 197; CHECK-NEXT: lea %s0, __atomic_store@lo 198; CHECK-NEXT: and %s0, %s0, (32)0 199; CHECK-NEXT: lea.sl %s12, __atomic_store@hi(, %s0) 200; CHECK-NEXT: lea %s2, 240(, %s11) 201; CHECK-NEXT: or %s0, 16, (0)1 202; CHECK-NEXT: or %s3, 0, (0)1 203; CHECK-NEXT: or %s1, 0, %s4 204; CHECK-NEXT: bsic %s10, (, %s12) 205; CHECK-NEXT: or %s11, 0, %s9 206 %3 = alloca i128, align 16 207 %4 = bitcast i128* %3 to i8* 208 call void @llvm.lifetime.start.p0i8(i64 16, i8* nonnull %4) 209 store i128 %1, i128* %3, align 16, !tbaa !2 210 %5 = bitcast %"struct.std::__1::atomic.45"* %0 to i8* 211 call void @__atomic_store(i64 16, i8* nonnull %5, i8* nonnull %4, i32 signext 0) 212 call void @llvm.lifetime.end.p0i8(i64 16, i8* nonnull %4) 213 ret void 214} 215 216; Function Attrs: nofree norecurse nounwind 217define void @_Z23atomic_store_release_i1RNSt3__16atomicIbEEb(%"struct.std::__1::atomic"* nocapture nonnull align 1 dereferenceable(1) %0, i1 zeroext %1) { 218; CHECK-LABEL: _Z23atomic_store_release_i1RNSt3__16atomicIbEEb: 219; CHECK: # %bb.0: 220; CHECK-NEXT: fencem 1 221; CHECK-NEXT: st1b %s1, (, %s0) 222; CHECK-NEXT: b.l.t (, %s10) 223 %3 = zext i1 %1 to i8 224 %4 = getelementptr inbounds %"struct.std::__1::atomic", %"struct.std::__1::atomic"* %0, i64 0, i32 0, i32 0, i32 0, i32 0 225 store atomic i8 %3, i8* %4 release, align 1 226 ret void 227} 228 229; Function Attrs: nofree norecurse nounwind 230define void @_Z23atomic_store_release_i8RNSt3__16atomicIcEEc(%"struct.std::__1::atomic.0"* nocapture nonnull align 1 dereferenceable(1) %0, i8 signext %1) { 231; CHECK-LABEL: _Z23atomic_store_release_i8RNSt3__16atomicIcEEc: 232; CHECK: # %bb.0: 233; CHECK-NEXT: fencem 1 234; CHECK-NEXT: st1b %s1, (, %s0) 235; CHECK-NEXT: b.l.t (, %s10) 236 %3 = getelementptr inbounds %"struct.std::__1::atomic.0", %"struct.std::__1::atomic.0"* %0, i64 0, i32 0, i32 0, i32 0, i32 0, i32 0 237 store atomic i8 %1, i8* %3 release, align 1 238 ret void 239} 240 241; Function Attrs: nofree norecurse nounwind 242define void @_Z23atomic_store_release_u8RNSt3__16atomicIhEEh(%"struct.std::__1::atomic.5"* nocapture nonnull align 1 dereferenceable(1) %0, i8 zeroext %1) { 243; CHECK-LABEL: _Z23atomic_store_release_u8RNSt3__16atomicIhEEh: 244; CHECK: # %bb.0: 245; CHECK-NEXT: fencem 1 246; CHECK-NEXT: st1b %s1, (, %s0) 247; CHECK-NEXT: b.l.t (, %s10) 248 %3 = getelementptr inbounds %"struct.std::__1::atomic.5", %"struct.std::__1::atomic.5"* %0, i64 0, i32 0, i32 0, i32 0, i32 0, i32 0 249 store atomic i8 %1, i8* %3 release, align 1 250 ret void 251} 252 253; Function Attrs: nofree norecurse nounwind 254define void @_Z24atomic_store_release_i16RNSt3__16atomicIsEEs(%"struct.std::__1::atomic.10"* nocapture nonnull align 2 dereferenceable(2) %0, i16 signext %1) { 255; CHECK-LABEL: _Z24atomic_store_release_i16RNSt3__16atomicIsEEs: 256; CHECK: # %bb.0: 257; CHECK-NEXT: fencem 1 258; CHECK-NEXT: st2b %s1, (, %s0) 259; CHECK-NEXT: b.l.t (, %s10) 260 %3 = getelementptr inbounds %"struct.std::__1::atomic.10", %"struct.std::__1::atomic.10"* %0, i64 0, i32 0, i32 0, i32 0, i32 0, i32 0 261 store atomic i16 %1, i16* %3 release, align 2 262 ret void 263} 264 265; Function Attrs: nofree norecurse nounwind 266define void @_Z24atomic_store_release_u16RNSt3__16atomicItEEt(%"struct.std::__1::atomic.15"* nocapture nonnull align 2 dereferenceable(2) %0, i16 zeroext %1) { 267; CHECK-LABEL: _Z24atomic_store_release_u16RNSt3__16atomicItEEt: 268; CHECK: # %bb.0: 269; CHECK-NEXT: fencem 1 270; CHECK-NEXT: st2b %s1, (, %s0) 271; CHECK-NEXT: b.l.t (, %s10) 272 %3 = getelementptr inbounds %"struct.std::__1::atomic.15", %"struct.std::__1::atomic.15"* %0, i64 0, i32 0, i32 0, i32 0, i32 0, i32 0 273 store atomic i16 %1, i16* %3 release, align 2 274 ret void 275} 276 277; Function Attrs: nofree norecurse nounwind 278define void @_Z24atomic_store_release_i32RNSt3__16atomicIiEEi(%"struct.std::__1::atomic.20"* nocapture nonnull align 4 dereferenceable(4) %0, i32 signext %1) { 279; CHECK-LABEL: _Z24atomic_store_release_i32RNSt3__16atomicIiEEi: 280; CHECK: # %bb.0: 281; CHECK-NEXT: fencem 1 282; CHECK-NEXT: stl %s1, (, %s0) 283; CHECK-NEXT: b.l.t (, %s10) 284 %3 = getelementptr inbounds %"struct.std::__1::atomic.20", %"struct.std::__1::atomic.20"* %0, i64 0, i32 0, i32 0, i32 0, i32 0, i32 0 285 store atomic i32 %1, i32* %3 release, align 4 286 ret void 287} 288 289; Function Attrs: nofree norecurse nounwind 290define void @_Z24atomic_store_release_u32RNSt3__16atomicIjEEj(%"struct.std::__1::atomic.25"* nocapture nonnull align 4 dereferenceable(4) %0, i32 zeroext %1) { 291; CHECK-LABEL: _Z24atomic_store_release_u32RNSt3__16atomicIjEEj: 292; CHECK: # %bb.0: 293; CHECK-NEXT: fencem 1 294; CHECK-NEXT: stl %s1, (, %s0) 295; CHECK-NEXT: b.l.t (, %s10) 296 %3 = getelementptr inbounds %"struct.std::__1::atomic.25", %"struct.std::__1::atomic.25"* %0, i64 0, i32 0, i32 0, i32 0, i32 0, i32 0 297 store atomic i32 %1, i32* %3 release, align 4 298 ret void 299} 300 301; Function Attrs: nofree norecurse nounwind 302define void @_Z24atomic_store_release_i64RNSt3__16atomicIlEEl(%"struct.std::__1::atomic.30"* nocapture nonnull align 8 dereferenceable(8) %0, i64 %1) { 303; CHECK-LABEL: _Z24atomic_store_release_i64RNSt3__16atomicIlEEl: 304; CHECK: # %bb.0: 305; CHECK-NEXT: fencem 1 306; CHECK-NEXT: st %s1, (, %s0) 307; CHECK-NEXT: b.l.t (, %s10) 308 %3 = getelementptr inbounds %"struct.std::__1::atomic.30", %"struct.std::__1::atomic.30"* %0, i64 0, i32 0, i32 0, i32 0, i32 0, i32 0 309 store atomic i64 %1, i64* %3 release, align 8 310 ret void 311} 312 313; Function Attrs: nofree norecurse nounwind 314define void @_Z24atomic_store_release_u64RNSt3__16atomicImEEm(%"struct.std::__1::atomic.35"* nocapture nonnull align 8 dereferenceable(8) %0, i64 %1) { 315; CHECK-LABEL: _Z24atomic_store_release_u64RNSt3__16atomicImEEm: 316; CHECK: # %bb.0: 317; CHECK-NEXT: fencem 1 318; CHECK-NEXT: st %s1, (, %s0) 319; CHECK-NEXT: b.l.t (, %s10) 320 %3 = getelementptr inbounds %"struct.std::__1::atomic.35", %"struct.std::__1::atomic.35"* %0, i64 0, i32 0, i32 0, i32 0, i32 0, i32 0 321 store atomic i64 %1, i64* %3 release, align 8 322 ret void 323} 324 325; Function Attrs: nounwind 326define void @_Z25atomic_store_release_i128RNSt3__16atomicInEEn(%"struct.std::__1::atomic.40"* nonnull align 16 dereferenceable(16) %0, i128 %1) { 327; CHECK-LABEL: _Z25atomic_store_release_i128RNSt3__16atomicInEEn: 328; CHECK: .LBB{{[0-9]+}}_2: 329; CHECK-NEXT: or %s4, 0, %s0 330; CHECK-NEXT: st %s2, 248(, %s11) 331; CHECK-NEXT: st %s1, 240(, %s11) 332; CHECK-NEXT: lea %s0, __atomic_store@lo 333; CHECK-NEXT: and %s0, %s0, (32)0 334; CHECK-NEXT: lea.sl %s12, __atomic_store@hi(, %s0) 335; CHECK-NEXT: lea %s2, 240(, %s11) 336; CHECK-NEXT: or %s0, 16, (0)1 337; CHECK-NEXT: or %s3, 3, (0)1 338; CHECK-NEXT: or %s1, 0, %s4 339; CHECK-NEXT: bsic %s10, (, %s12) 340; CHECK-NEXT: or %s11, 0, %s9 341 %3 = alloca i128, align 16 342 %4 = bitcast i128* %3 to i8* 343 call void @llvm.lifetime.start.p0i8(i64 16, i8* nonnull %4) 344 store i128 %1, i128* %3, align 16, !tbaa !2 345 %5 = bitcast %"struct.std::__1::atomic.40"* %0 to i8* 346 call void @__atomic_store(i64 16, i8* nonnull %5, i8* nonnull %4, i32 signext 3) 347 call void @llvm.lifetime.end.p0i8(i64 16, i8* nonnull %4) 348 ret void 349} 350 351; Function Attrs: nounwind 352define void @_Z25atomic_store_release_u128RNSt3__16atomicIoEEo(%"struct.std::__1::atomic.45"* nonnull align 16 dereferenceable(16) %0, i128 %1) { 353; CHECK-LABEL: _Z25atomic_store_release_u128RNSt3__16atomicIoEEo: 354; CHECK: .LBB{{[0-9]+}}_2: 355; CHECK-NEXT: or %s4, 0, %s0 356; CHECK-NEXT: st %s2, 248(, %s11) 357; CHECK-NEXT: st %s1, 240(, %s11) 358; CHECK-NEXT: lea %s0, __atomic_store@lo 359; CHECK-NEXT: and %s0, %s0, (32)0 360; CHECK-NEXT: lea.sl %s12, __atomic_store@hi(, %s0) 361; CHECK-NEXT: lea %s2, 240(, %s11) 362; CHECK-NEXT: or %s0, 16, (0)1 363; CHECK-NEXT: or %s3, 3, (0)1 364; CHECK-NEXT: or %s1, 0, %s4 365; CHECK-NEXT: bsic %s10, (, %s12) 366; CHECK-NEXT: or %s11, 0, %s9 367 %3 = alloca i128, align 16 368 %4 = bitcast i128* %3 to i8* 369 call void @llvm.lifetime.start.p0i8(i64 16, i8* nonnull %4) 370 store i128 %1, i128* %3, align 16, !tbaa !2 371 %5 = bitcast %"struct.std::__1::atomic.45"* %0 to i8* 372 call void @__atomic_store(i64 16, i8* nonnull %5, i8* nonnull %4, i32 signext 3) 373 call void @llvm.lifetime.end.p0i8(i64 16, i8* nonnull %4) 374 ret void 375} 376 377; Function Attrs: nofree norecurse nounwind 378define void @_Z23atomic_store_seq_cst_i1RNSt3__16atomicIbEEb(%"struct.std::__1::atomic"* nocapture nonnull align 1 dereferenceable(1) %0, i1 zeroext %1) { 379; CHECK-LABEL: _Z23atomic_store_seq_cst_i1RNSt3__16atomicIbEEb: 380; CHECK: # %bb.0: 381; CHECK-NEXT: fencem 3 382; CHECK-NEXT: st1b %s1, (, %s0) 383; CHECK-NEXT: fencem 3 384; CHECK-NEXT: b.l.t (, %s10) 385 %3 = zext i1 %1 to i8 386 %4 = getelementptr inbounds %"struct.std::__1::atomic", %"struct.std::__1::atomic"* %0, i64 0, i32 0, i32 0, i32 0, i32 0 387 store atomic i8 %3, i8* %4 seq_cst, align 1 388 ret void 389} 390 391; Function Attrs: nofree norecurse nounwind 392define void @_Z23atomic_store_seq_cst_i8RNSt3__16atomicIcEEc(%"struct.std::__1::atomic.0"* nocapture nonnull align 1 dereferenceable(1) %0, i8 signext %1) { 393; CHECK-LABEL: _Z23atomic_store_seq_cst_i8RNSt3__16atomicIcEEc: 394; CHECK: # %bb.0: 395; CHECK-NEXT: fencem 3 396; CHECK-NEXT: st1b %s1, (, %s0) 397; CHECK-NEXT: fencem 3 398; CHECK-NEXT: b.l.t (, %s10) 399 %3 = getelementptr inbounds %"struct.std::__1::atomic.0", %"struct.std::__1::atomic.0"* %0, i64 0, i32 0, i32 0, i32 0, i32 0, i32 0 400 store atomic i8 %1, i8* %3 seq_cst, align 1 401 ret void 402} 403 404; Function Attrs: nofree norecurse nounwind 405define void @_Z23atomic_store_seq_cst_u8RNSt3__16atomicIhEEh(%"struct.std::__1::atomic.5"* nocapture nonnull align 1 dereferenceable(1) %0, i8 zeroext %1) { 406; CHECK-LABEL: _Z23atomic_store_seq_cst_u8RNSt3__16atomicIhEEh: 407; CHECK: # %bb.0: 408; CHECK-NEXT: fencem 3 409; CHECK-NEXT: st1b %s1, (, %s0) 410; CHECK-NEXT: fencem 3 411; CHECK-NEXT: b.l.t (, %s10) 412 %3 = getelementptr inbounds %"struct.std::__1::atomic.5", %"struct.std::__1::atomic.5"* %0, i64 0, i32 0, i32 0, i32 0, i32 0, i32 0 413 store atomic i8 %1, i8* %3 seq_cst, align 1 414 ret void 415} 416 417; Function Attrs: nofree norecurse nounwind 418define void @_Z24atomic_store_seq_cst_i16RNSt3__16atomicIsEEs(%"struct.std::__1::atomic.10"* nocapture nonnull align 2 dereferenceable(2) %0, i16 signext %1) { 419; CHECK-LABEL: _Z24atomic_store_seq_cst_i16RNSt3__16atomicIsEEs: 420; CHECK: # %bb.0: 421; CHECK-NEXT: fencem 3 422; CHECK-NEXT: st2b %s1, (, %s0) 423; CHECK-NEXT: fencem 3 424; CHECK-NEXT: b.l.t (, %s10) 425 %3 = getelementptr inbounds %"struct.std::__1::atomic.10", %"struct.std::__1::atomic.10"* %0, i64 0, i32 0, i32 0, i32 0, i32 0, i32 0 426 store atomic i16 %1, i16* %3 seq_cst, align 2 427 ret void 428} 429 430; Function Attrs: nofree norecurse nounwind 431define void @_Z24atomic_store_seq_cst_u16RNSt3__16atomicItEEt(%"struct.std::__1::atomic.15"* nocapture nonnull align 2 dereferenceable(2) %0, i16 zeroext %1) { 432; CHECK-LABEL: _Z24atomic_store_seq_cst_u16RNSt3__16atomicItEEt: 433; CHECK: # %bb.0: 434; CHECK-NEXT: fencem 3 435; CHECK-NEXT: st2b %s1, (, %s0) 436; CHECK-NEXT: fencem 3 437; CHECK-NEXT: b.l.t (, %s10) 438 %3 = getelementptr inbounds %"struct.std::__1::atomic.15", %"struct.std::__1::atomic.15"* %0, i64 0, i32 0, i32 0, i32 0, i32 0, i32 0 439 store atomic i16 %1, i16* %3 seq_cst, align 2 440 ret void 441} 442 443; Function Attrs: nofree norecurse nounwind 444define void @_Z24atomic_store_seq_cst_i32RNSt3__16atomicIiEEi(%"struct.std::__1::atomic.20"* nocapture nonnull align 4 dereferenceable(4) %0, i32 signext %1) { 445; CHECK-LABEL: _Z24atomic_store_seq_cst_i32RNSt3__16atomicIiEEi: 446; CHECK: # %bb.0: 447; CHECK-NEXT: fencem 3 448; CHECK-NEXT: stl %s1, (, %s0) 449; CHECK-NEXT: fencem 3 450; CHECK-NEXT: b.l.t (, %s10) 451 %3 = getelementptr inbounds %"struct.std::__1::atomic.20", %"struct.std::__1::atomic.20"* %0, i64 0, i32 0, i32 0, i32 0, i32 0, i32 0 452 store atomic i32 %1, i32* %3 seq_cst, align 4 453 ret void 454} 455 456; Function Attrs: nofree norecurse nounwind 457define void @_Z24atomic_store_seq_cst_u32RNSt3__16atomicIjEEj(%"struct.std::__1::atomic.25"* nocapture nonnull align 4 dereferenceable(4) %0, i32 zeroext %1) { 458; CHECK-LABEL: _Z24atomic_store_seq_cst_u32RNSt3__16atomicIjEEj: 459; CHECK: # %bb.0: 460; CHECK-NEXT: fencem 3 461; CHECK-NEXT: stl %s1, (, %s0) 462; CHECK-NEXT: fencem 3 463; CHECK-NEXT: b.l.t (, %s10) 464 %3 = getelementptr inbounds %"struct.std::__1::atomic.25", %"struct.std::__1::atomic.25"* %0, i64 0, i32 0, i32 0, i32 0, i32 0, i32 0 465 store atomic i32 %1, i32* %3 seq_cst, align 4 466 ret void 467} 468 469; Function Attrs: nofree norecurse nounwind 470define void @_Z24atomic_store_seq_cst_i64RNSt3__16atomicIlEEl(%"struct.std::__1::atomic.30"* nocapture nonnull align 8 dereferenceable(8) %0, i64 %1) { 471; CHECK-LABEL: _Z24atomic_store_seq_cst_i64RNSt3__16atomicIlEEl: 472; CHECK: # %bb.0: 473; CHECK-NEXT: fencem 3 474; CHECK-NEXT: st %s1, (, %s0) 475; CHECK-NEXT: fencem 3 476; CHECK-NEXT: b.l.t (, %s10) 477 %3 = getelementptr inbounds %"struct.std::__1::atomic.30", %"struct.std::__1::atomic.30"* %0, i64 0, i32 0, i32 0, i32 0, i32 0, i32 0 478 store atomic i64 %1, i64* %3 seq_cst, align 8 479 ret void 480} 481 482; Function Attrs: nofree norecurse nounwind 483define void @_Z24atomic_store_seq_cst_u64RNSt3__16atomicImEEm(%"struct.std::__1::atomic.35"* nocapture nonnull align 8 dereferenceable(8) %0, i64 %1) { 484; CHECK-LABEL: _Z24atomic_store_seq_cst_u64RNSt3__16atomicImEEm: 485; CHECK: # %bb.0: 486; CHECK-NEXT: fencem 3 487; CHECK-NEXT: st %s1, (, %s0) 488; CHECK-NEXT: fencem 3 489; CHECK-NEXT: b.l.t (, %s10) 490 %3 = getelementptr inbounds %"struct.std::__1::atomic.35", %"struct.std::__1::atomic.35"* %0, i64 0, i32 0, i32 0, i32 0, i32 0, i32 0 491 store atomic i64 %1, i64* %3 seq_cst, align 8 492 ret void 493} 494 495; Function Attrs: nounwind 496define void @_Z25atomic_store_seq_cst_i128RNSt3__16atomicInEEn(%"struct.std::__1::atomic.40"* nonnull align 16 dereferenceable(16) %0, i128 %1) { 497; CHECK-LABEL: _Z25atomic_store_seq_cst_i128RNSt3__16atomicInEEn: 498; CHECK: .LBB{{[0-9]+}}_2: 499; CHECK-NEXT: or %s4, 0, %s0 500; CHECK-NEXT: st %s2, 248(, %s11) 501; CHECK-NEXT: st %s1, 240(, %s11) 502; CHECK-NEXT: lea %s0, __atomic_store@lo 503; CHECK-NEXT: and %s0, %s0, (32)0 504; CHECK-NEXT: lea.sl %s12, __atomic_store@hi(, %s0) 505; CHECK-NEXT: lea %s2, 240(, %s11) 506; CHECK-NEXT: or %s0, 16, (0)1 507; CHECK-NEXT: or %s3, 5, (0)1 508; CHECK-NEXT: or %s1, 0, %s4 509; CHECK-NEXT: bsic %s10, (, %s12) 510; CHECK-NEXT: or %s11, 0, %s9 511 %3 = alloca i128, align 16 512 %4 = bitcast i128* %3 to i8* 513 call void @llvm.lifetime.start.p0i8(i64 16, i8* nonnull %4) 514 store i128 %1, i128* %3, align 16, !tbaa !2 515 %5 = bitcast %"struct.std::__1::atomic.40"* %0 to i8* 516 call void @__atomic_store(i64 16, i8* nonnull %5, i8* nonnull %4, i32 signext 5) 517 call void @llvm.lifetime.end.p0i8(i64 16, i8* nonnull %4) 518 ret void 519} 520 521; Function Attrs: nounwind 522define void @_Z25atomic_store_seq_cst_u128RNSt3__16atomicIoEEo(%"struct.std::__1::atomic.45"* nonnull align 16 dereferenceable(16) %0, i128 %1) { 523; CHECK-LABEL: _Z25atomic_store_seq_cst_u128RNSt3__16atomicIoEEo: 524; CHECK: .LBB{{[0-9]+}}_2: 525; CHECK-NEXT: or %s4, 0, %s0 526; CHECK-NEXT: st %s2, 248(, %s11) 527; CHECK-NEXT: st %s1, 240(, %s11) 528; CHECK-NEXT: lea %s0, __atomic_store@lo 529; CHECK-NEXT: and %s0, %s0, (32)0 530; CHECK-NEXT: lea.sl %s12, __atomic_store@hi(, %s0) 531; CHECK-NEXT: lea %s2, 240(, %s11) 532; CHECK-NEXT: or %s0, 16, (0)1 533; CHECK-NEXT: or %s3, 5, (0)1 534; CHECK-NEXT: or %s1, 0, %s4 535; CHECK-NEXT: bsic %s10, (, %s12) 536; CHECK-NEXT: or %s11, 0, %s9 537 %3 = alloca i128, align 16 538 %4 = bitcast i128* %3 to i8* 539 call void @llvm.lifetime.start.p0i8(i64 16, i8* nonnull %4) 540 store i128 %1, i128* %3, align 16, !tbaa !2 541 %5 = bitcast %"struct.std::__1::atomic.45"* %0 to i8* 542 call void @__atomic_store(i64 16, i8* nonnull %5, i8* nonnull %4, i32 signext 5) 543 call void @llvm.lifetime.end.p0i8(i64 16, i8* nonnull %4) 544 ret void 545} 546 547; Function Attrs: nofree nounwind willreturn 548declare void @__atomic_store(i64, i8*, i8*, i32) 549 550; Function Attrs: argmemonly nounwind willreturn 551declare void @llvm.lifetime.start.p0i8(i64 immarg, i8* nocapture) 552 553; Function Attrs: argmemonly nounwind willreturn 554declare void @llvm.lifetime.end.p0i8(i64 immarg, i8* nocapture) 555 556!2 = !{!3, !3, i64 0} 557!3 = !{!"__int128", !4, i64 0} 558!4 = !{!"omnipotent char", !5, i64 0} 559!5 = !{!"Simple C++ TBAA"} 560