1; RUN: opt < %s -passes='module(sanmd-module)' -sanitizer-metadata-atomics -S | FileCheck %s 2 3; Check that atomic memory operations receive PC sections metadata. 4 5; CHECK: @__start_sanmd_atomics2 = extern_weak hidden global ptr 6; CHECK: @__stop_sanmd_atomics2 = extern_weak hidden global ptr 7; CHECK: @__start_sanmd_covered2 = extern_weak hidden global ptr 8; CHECK: @__stop_sanmd_covered2 = extern_weak hidden global ptr 9 10target datalayout = "e-p:64:64:64-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:64:64-f32:32:32-f64:64:64-v64:64:64-v128:128:128-a0:0:64-s0:64:64-f80:128:128-n8:16:32:64-S128" 11 12define i8 @atomic8_load_unordered(ptr %a) nounwind uwtable { 13entry: 14 %0 = load atomic i8, ptr %a unordered, align 1 15 ret i8 %0 16} 17; CHECK-LABEL: atomic8_load_unordered{{.*}}!pcsections !0 18; CHECK: !pcsections !2 19 20define i8 @atomic8_load_monotonic(ptr %a) nounwind uwtable { 21entry: 22 %0 = load atomic i8, ptr %a monotonic, align 1 23 ret i8 %0 24} 25; CHECK-LABEL: atomic8_load_monotonic{{.*}}!pcsections !0 26; CHECK: !pcsections !2 27 28define i8 @atomic8_load_acquire(ptr %a) nounwind uwtable { 29entry: 30 %0 = load atomic i8, ptr %a acquire, align 1 31 ret i8 %0 32} 33; CHECK-LABEL: atomic8_load_acquire{{.*}}!pcsections !0 34; CHECK: !pcsections !2 35 36define i8 @atomic8_load_seq_cst(ptr %a) nounwind uwtable { 37entry: 38 %0 = load atomic i8, ptr %a seq_cst, align 1 39 ret i8 %0 40} 41; CHECK-LABEL: atomic8_load_seq_cst{{.*}}!pcsections !0 42; CHECK: !pcsections !2 43 44define void @atomic8_store_unordered(ptr %a) nounwind uwtable { 45entry: 46 store atomic i8 0, ptr %a unordered, align 1 47 ret void 48} 49; CHECK-LABEL: atomic8_store_unordered{{.*}}!pcsections !0 50; CHECK: !pcsections !2 51 52define void @atomic8_store_monotonic(ptr %a) nounwind uwtable { 53entry: 54 store atomic i8 0, ptr %a monotonic, align 1 55 ret void 56} 57; CHECK-LABEL: atomic8_store_monotonic{{.*}}!pcsections !0 58; CHECK: !pcsections !2 59 60define void @atomic8_store_release(ptr %a) nounwind uwtable { 61entry: 62 store atomic i8 0, ptr %a release, align 1 63 ret void 64} 65; CHECK-LABEL: atomic8_store_release{{.*}}!pcsections !0 66; CHECK: !pcsections !2 67 68define void @atomic8_store_seq_cst(ptr %a) nounwind uwtable { 69entry: 70 store atomic i8 0, ptr %a seq_cst, align 1 71 ret void 72} 73; CHECK-LABEL: atomic8_store_seq_cst{{.*}}!pcsections !0 74; CHECK: !pcsections !2 75 76define void @atomic8_xchg_monotonic(ptr %a) nounwind uwtable { 77entry: 78 atomicrmw xchg ptr %a, i8 0 monotonic 79 ret void 80} 81; CHECK-LABEL: atomic8_xchg_monotonic{{.*}}!pcsections !0 82; CHECK: !pcsections !2 83 84define void @atomic8_add_monotonic(ptr %a) nounwind uwtable { 85entry: 86 atomicrmw add ptr %a, i8 0 monotonic 87 ret void 88} 89; CHECK-LABEL: atomic8_add_monotonic{{.*}}!pcsections !0 90; CHECK: !pcsections !2 91 92define void @atomic8_sub_monotonic(ptr %a) nounwind uwtable { 93entry: 94 atomicrmw sub ptr %a, i8 0 monotonic 95 ret void 96} 97; CHECK-LABEL: atomic8_sub_monotonic{{.*}}!pcsections !0 98; CHECK: !pcsections !2 99 100define void @atomic8_and_monotonic(ptr %a) nounwind uwtable { 101entry: 102 atomicrmw and ptr %a, i8 0 monotonic 103 ret void 104} 105; CHECK-LABEL: atomic8_and_monotonic{{.*}}!pcsections !0 106; CHECK: !pcsections !2 107 108define void @atomic8_or_monotonic(ptr %a) nounwind uwtable { 109entry: 110 atomicrmw or ptr %a, i8 0 monotonic 111 ret void 112} 113; CHECK-LABEL: atomic8_or_monotonic{{.*}}!pcsections !0 114; CHECK: !pcsections !2 115 116define void @atomic8_xor_monotonic(ptr %a) nounwind uwtable { 117entry: 118 atomicrmw xor ptr %a, i8 0 monotonic 119 ret void 120} 121; CHECK-LABEL: atomic8_xor_monotonic{{.*}}!pcsections !0 122; CHECK: !pcsections !2 123 124define void @atomic8_nand_monotonic(ptr %a) nounwind uwtable { 125entry: 126 atomicrmw nand ptr %a, i8 0 monotonic 127 ret void 128} 129; CHECK-LABEL: atomic8_nand_monotonic{{.*}}!pcsections !0 130; CHECK: !pcsections !2 131 132define void @atomic8_xchg_acquire(ptr %a) nounwind uwtable { 133entry: 134 atomicrmw xchg ptr %a, i8 0 acquire 135 ret void 136} 137; CHECK-LABEL: atomic8_xchg_acquire{{.*}}!pcsections !0 138; CHECK: !pcsections !2 139 140define void @atomic8_add_acquire(ptr %a) nounwind uwtable { 141entry: 142 atomicrmw add ptr %a, i8 0 acquire 143 ret void 144} 145; CHECK-LABEL: atomic8_add_acquire{{.*}}!pcsections !0 146; CHECK: !pcsections !2 147 148define void @atomic8_sub_acquire(ptr %a) nounwind uwtable { 149entry: 150 atomicrmw sub ptr %a, i8 0 acquire 151 ret void 152} 153; CHECK-LABEL: atomic8_sub_acquire{{.*}}!pcsections !0 154; CHECK: !pcsections !2 155 156define void @atomic8_and_acquire(ptr %a) nounwind uwtable { 157entry: 158 atomicrmw and ptr %a, i8 0 acquire 159 ret void 160} 161; CHECK-LABEL: atomic8_and_acquire{{.*}}!pcsections !0 162; CHECK: !pcsections !2 163 164define void @atomic8_or_acquire(ptr %a) nounwind uwtable { 165entry: 166 atomicrmw or ptr %a, i8 0 acquire 167 ret void 168} 169; CHECK-LABEL: atomic8_or_acquire{{.*}}!pcsections !0 170; CHECK: !pcsections !2 171 172define void @atomic8_xor_acquire(ptr %a) nounwind uwtable { 173entry: 174 atomicrmw xor ptr %a, i8 0 acquire 175 ret void 176} 177; CHECK-LABEL: atomic8_xor_acquire{{.*}}!pcsections !0 178; CHECK: !pcsections !2 179 180define void @atomic8_nand_acquire(ptr %a) nounwind uwtable { 181entry: 182 atomicrmw nand ptr %a, i8 0 acquire 183 ret void 184} 185; CHECK-LABEL: atomic8_nand_acquire{{.*}}!pcsections !0 186; CHECK: !pcsections !2 187 188define void @atomic8_xchg_release(ptr %a) nounwind uwtable { 189entry: 190 atomicrmw xchg ptr %a, i8 0 release 191 ret void 192} 193; CHECK-LABEL: atomic8_xchg_release{{.*}}!pcsections !0 194; CHECK: !pcsections !2 195 196define void @atomic8_add_release(ptr %a) nounwind uwtable { 197entry: 198 atomicrmw add ptr %a, i8 0 release 199 ret void 200} 201; CHECK-LABEL: atomic8_add_release{{.*}}!pcsections !0 202; CHECK: !pcsections !2 203 204define void @atomic8_sub_release(ptr %a) nounwind uwtable { 205entry: 206 atomicrmw sub ptr %a, i8 0 release 207 ret void 208} 209; CHECK-LABEL: atomic8_sub_release{{.*}}!pcsections !0 210; CHECK: !pcsections !2 211 212define void @atomic8_and_release(ptr %a) nounwind uwtable { 213entry: 214 atomicrmw and ptr %a, i8 0 release 215 ret void 216} 217; CHECK-LABEL: atomic8_and_release{{.*}}!pcsections !0 218; CHECK: !pcsections !2 219 220define void @atomic8_or_release(ptr %a) nounwind uwtable { 221entry: 222 atomicrmw or ptr %a, i8 0 release 223 ret void 224} 225; CHECK-LABEL: atomic8_or_release{{.*}}!pcsections !0 226; CHECK: !pcsections !2 227 228define void @atomic8_xor_release(ptr %a) nounwind uwtable { 229entry: 230 atomicrmw xor ptr %a, i8 0 release 231 ret void 232} 233; CHECK-LABEL: atomic8_xor_release{{.*}}!pcsections !0 234; CHECK: !pcsections !2 235 236define void @atomic8_nand_release(ptr %a) nounwind uwtable { 237entry: 238 atomicrmw nand ptr %a, i8 0 release 239 ret void 240} 241; CHECK-LABEL: atomic8_nand_release{{.*}}!pcsections !0 242; CHECK: !pcsections !2 243 244define void @atomic8_xchg_acq_rel(ptr %a) nounwind uwtable { 245entry: 246 atomicrmw xchg ptr %a, i8 0 acq_rel 247 ret void 248} 249; CHECK-LABEL: atomic8_xchg_acq_rel{{.*}}!pcsections !0 250; CHECK: !pcsections !2 251 252define void @atomic8_add_acq_rel(ptr %a) nounwind uwtable { 253entry: 254 atomicrmw add ptr %a, i8 0 acq_rel 255 ret void 256} 257; CHECK-LABEL: atomic8_add_acq_rel{{.*}}!pcsections !0 258; CHECK: !pcsections !2 259 260define void @atomic8_sub_acq_rel(ptr %a) nounwind uwtable { 261entry: 262 atomicrmw sub ptr %a, i8 0 acq_rel 263 ret void 264} 265; CHECK-LABEL: atomic8_sub_acq_rel{{.*}}!pcsections !0 266; CHECK: !pcsections !2 267 268define void @atomic8_and_acq_rel(ptr %a) nounwind uwtable { 269entry: 270 atomicrmw and ptr %a, i8 0 acq_rel 271 ret void 272} 273; CHECK-LABEL: atomic8_and_acq_rel{{.*}}!pcsections !0 274; CHECK: !pcsections !2 275 276define void @atomic8_or_acq_rel(ptr %a) nounwind uwtable { 277entry: 278 atomicrmw or ptr %a, i8 0 acq_rel 279 ret void 280} 281; CHECK-LABEL: atomic8_or_acq_rel{{.*}}!pcsections !0 282; CHECK: !pcsections !2 283 284define void @atomic8_xor_acq_rel(ptr %a) nounwind uwtable { 285entry: 286 atomicrmw xor ptr %a, i8 0 acq_rel 287 ret void 288} 289; CHECK-LABEL: atomic8_xor_acq_rel{{.*}}!pcsections !0 290; CHECK: !pcsections !2 291 292define void @atomic8_nand_acq_rel(ptr %a) nounwind uwtable { 293entry: 294 atomicrmw nand ptr %a, i8 0 acq_rel 295 ret void 296} 297; CHECK-LABEL: atomic8_nand_acq_rel{{.*}}!pcsections !0 298; CHECK: !pcsections !2 299 300define void @atomic8_xchg_seq_cst(ptr %a) nounwind uwtable { 301entry: 302 atomicrmw xchg ptr %a, i8 0 seq_cst 303 ret void 304} 305; CHECK-LABEL: atomic8_xchg_seq_cst{{.*}}!pcsections !0 306; CHECK: !pcsections !2 307 308define void @atomic8_add_seq_cst(ptr %a) nounwind uwtable { 309entry: 310 atomicrmw add ptr %a, i8 0 seq_cst 311 ret void 312} 313; CHECK-LABEL: atomic8_add_seq_cst{{.*}}!pcsections !0 314; CHECK: !pcsections !2 315 316define void @atomic8_sub_seq_cst(ptr %a) nounwind uwtable { 317entry: 318 atomicrmw sub ptr %a, i8 0 seq_cst 319 ret void 320} 321; CHECK-LABEL: atomic8_sub_seq_cst{{.*}}!pcsections !0 322; CHECK: !pcsections !2 323 324define void @atomic8_and_seq_cst(ptr %a) nounwind uwtable { 325entry: 326 atomicrmw and ptr %a, i8 0 seq_cst 327 ret void 328} 329; CHECK-LABEL: atomic8_and_seq_cst{{.*}}!pcsections !0 330; CHECK: !pcsections !2 331 332define void @atomic8_or_seq_cst(ptr %a) nounwind uwtable { 333entry: 334 atomicrmw or ptr %a, i8 0 seq_cst 335 ret void 336} 337; CHECK-LABEL: atomic8_or_seq_cst{{.*}}!pcsections !0 338; CHECK: !pcsections !2 339 340define void @atomic8_xor_seq_cst(ptr %a) nounwind uwtable { 341entry: 342 atomicrmw xor ptr %a, i8 0 seq_cst 343 ret void 344} 345; CHECK-LABEL: atomic8_xor_seq_cst{{.*}}!pcsections !0 346; CHECK: !pcsections !2 347 348define void @atomic8_nand_seq_cst(ptr %a) nounwind uwtable { 349entry: 350 atomicrmw nand ptr %a, i8 0 seq_cst 351 ret void 352} 353; CHECK-LABEL: atomic8_nand_seq_cst{{.*}}!pcsections !0 354; CHECK: !pcsections !2 355 356define void @atomic8_cas_monotonic(ptr %a) nounwind uwtable { 357entry: 358 cmpxchg ptr %a, i8 0, i8 1 monotonic monotonic 359 cmpxchg ptr %a, i8 0, i8 1 monotonic acquire 360 cmpxchg ptr %a, i8 0, i8 1 monotonic seq_cst 361 ret void 362} 363; CHECK-LABEL: atomic8_cas_monotonic{{.*}}!pcsections !0 364; CHECK: cmpxchg ptr %a, i8 0, i8 1 monotonic monotonic, align 1, !pcsections !2 365; CHECK: cmpxchg ptr %a, i8 0, i8 1 monotonic acquire, align 1, !pcsections !2 366; CHECK: cmpxchg ptr %a, i8 0, i8 1 monotonic seq_cst, align 1, !pcsections !2 367 368define void @atomic8_cas_acquire(ptr %a) nounwind uwtable { 369entry: 370 cmpxchg ptr %a, i8 0, i8 1 acquire monotonic 371 cmpxchg ptr %a, i8 0, i8 1 acquire acquire 372 cmpxchg ptr %a, i8 0, i8 1 acquire seq_cst 373 ret void 374} 375; CHECK-LABEL: atomic8_cas_acquire{{.*}}!pcsections !0 376; CHECK: cmpxchg ptr %a, i8 0, i8 1 acquire monotonic, align 1, !pcsections !2 377; CHECK: cmpxchg ptr %a, i8 0, i8 1 acquire acquire, align 1, !pcsections !2 378; CHECK: cmpxchg ptr %a, i8 0, i8 1 acquire seq_cst, align 1, !pcsections !2 379 380define void @atomic8_cas_release(ptr %a) nounwind uwtable { 381entry: 382 cmpxchg ptr %a, i8 0, i8 1 release monotonic 383 cmpxchg ptr %a, i8 0, i8 1 release acquire 384 cmpxchg ptr %a, i8 0, i8 1 release seq_cst 385 ret void 386} 387; CHECK-LABEL: atomic8_cas_release{{.*}}!pcsections !0 388; CHECK: cmpxchg ptr %a, i8 0, i8 1 release monotonic, align 1, !pcsections !2 389; CHECK: cmpxchg ptr %a, i8 0, i8 1 release acquire, align 1, !pcsections !2 390; CHECK: cmpxchg ptr %a, i8 0, i8 1 release seq_cst, align 1, !pcsections !2 391 392define void @atomic8_cas_acq_rel(ptr %a) nounwind uwtable { 393entry: 394 cmpxchg ptr %a, i8 0, i8 1 acq_rel monotonic 395 cmpxchg ptr %a, i8 0, i8 1 acq_rel acquire 396 cmpxchg ptr %a, i8 0, i8 1 acq_rel seq_cst 397 ret void 398} 399; CHECK-LABEL: atomic8_cas_acq_rel{{.*}}!pcsections !0 400; CHECK: cmpxchg ptr %a, i8 0, i8 1 acq_rel monotonic, align 1, !pcsections !2 401; CHECK: cmpxchg ptr %a, i8 0, i8 1 acq_rel acquire, align 1, !pcsections !2 402; CHECK: cmpxchg ptr %a, i8 0, i8 1 acq_rel seq_cst, align 1, !pcsections !2 403 404define void @atomic8_cas_seq_cst(ptr %a) nounwind uwtable { 405entry: 406 cmpxchg ptr %a, i8 0, i8 1 seq_cst monotonic 407 cmpxchg ptr %a, i8 0, i8 1 seq_cst acquire 408 cmpxchg ptr %a, i8 0, i8 1 seq_cst seq_cst 409 ret void 410} 411; CHECK-LABEL: atomic8_cas_seq_cst{{.*}}!pcsections !0 412; CHECK: cmpxchg ptr %a, i8 0, i8 1 seq_cst monotonic, align 1, !pcsections !2 413; CHECK: cmpxchg ptr %a, i8 0, i8 1 seq_cst acquire, align 1, !pcsections !2 414; CHECK: cmpxchg ptr %a, i8 0, i8 1 seq_cst seq_cst, align 1, !pcsections !2 415 416define i16 @atomic16_load_unordered(ptr %a) nounwind uwtable { 417entry: 418 %0 = load atomic i16, ptr %a unordered, align 2 419 ret i16 %0 420} 421; CHECK-LABEL: atomic16_load_unordered{{.*}}!pcsections !0 422; CHECK: !pcsections !2 423 424define i16 @atomic16_load_monotonic(ptr %a) nounwind uwtable { 425entry: 426 %0 = load atomic i16, ptr %a monotonic, align 2 427 ret i16 %0 428} 429; CHECK-LABEL: atomic16_load_monotonic{{.*}}!pcsections !0 430; CHECK: !pcsections !2 431 432define i16 @atomic16_load_acquire(ptr %a) nounwind uwtable { 433entry: 434 %0 = load atomic i16, ptr %a acquire, align 2 435 ret i16 %0 436} 437; CHECK-LABEL: atomic16_load_acquire{{.*}}!pcsections !0 438; CHECK: !pcsections !2 439 440define i16 @atomic16_load_seq_cst(ptr %a) nounwind uwtable { 441entry: 442 %0 = load atomic i16, ptr %a seq_cst, align 2 443 ret i16 %0 444} 445; CHECK-LABEL: atomic16_load_seq_cst{{.*}}!pcsections !0 446; CHECK: !pcsections !2 447 448define void @atomic16_store_unordered(ptr %a) nounwind uwtable { 449entry: 450 store atomic i16 0, ptr %a unordered, align 2 451 ret void 452} 453; CHECK-LABEL: atomic16_store_unordered{{.*}}!pcsections !0 454; CHECK: !pcsections !2 455 456define void @atomic16_store_monotonic(ptr %a) nounwind uwtable { 457entry: 458 store atomic i16 0, ptr %a monotonic, align 2 459 ret void 460} 461; CHECK-LABEL: atomic16_store_monotonic{{.*}}!pcsections !0 462; CHECK: !pcsections !2 463 464define void @atomic16_store_release(ptr %a) nounwind uwtable { 465entry: 466 store atomic i16 0, ptr %a release, align 2 467 ret void 468} 469; CHECK-LABEL: atomic16_store_release{{.*}}!pcsections !0 470; CHECK: !pcsections !2 471 472define void @atomic16_store_seq_cst(ptr %a) nounwind uwtable { 473entry: 474 store atomic i16 0, ptr %a seq_cst, align 2 475 ret void 476} 477; CHECK-LABEL: atomic16_store_seq_cst{{.*}}!pcsections !0 478; CHECK: !pcsections !2 479 480define void @atomic16_xchg_monotonic(ptr %a) nounwind uwtable { 481entry: 482 atomicrmw xchg ptr %a, i16 0 monotonic 483 ret void 484} 485; CHECK-LABEL: atomic16_xchg_monotonic{{.*}}!pcsections !0 486; CHECK: !pcsections !2 487 488define void @atomic16_add_monotonic(ptr %a) nounwind uwtable { 489entry: 490 atomicrmw add ptr %a, i16 0 monotonic 491 ret void 492} 493; CHECK-LABEL: atomic16_add_monotonic{{.*}}!pcsections !0 494; CHECK: !pcsections !2 495 496define void @atomic16_sub_monotonic(ptr %a) nounwind uwtable { 497entry: 498 atomicrmw sub ptr %a, i16 0 monotonic 499 ret void 500} 501; CHECK-LABEL: atomic16_sub_monotonic{{.*}}!pcsections !0 502; CHECK: !pcsections !2 503 504define void @atomic16_and_monotonic(ptr %a) nounwind uwtable { 505entry: 506 atomicrmw and ptr %a, i16 0 monotonic 507 ret void 508} 509; CHECK-LABEL: atomic16_and_monotonic{{.*}}!pcsections !0 510; CHECK: !pcsections !2 511 512define void @atomic16_or_monotonic(ptr %a) nounwind uwtable { 513entry: 514 atomicrmw or ptr %a, i16 0 monotonic 515 ret void 516} 517; CHECK-LABEL: atomic16_or_monotonic{{.*}}!pcsections !0 518; CHECK: !pcsections !2 519 520define void @atomic16_xor_monotonic(ptr %a) nounwind uwtable { 521entry: 522 atomicrmw xor ptr %a, i16 0 monotonic 523 ret void 524} 525; CHECK-LABEL: atomic16_xor_monotonic{{.*}}!pcsections !0 526; CHECK: !pcsections !2 527 528define void @atomic16_nand_monotonic(ptr %a) nounwind uwtable { 529entry: 530 atomicrmw nand ptr %a, i16 0 monotonic 531 ret void 532} 533; CHECK-LABEL: atomic16_nand_monotonic{{.*}}!pcsections !0 534; CHECK: !pcsections !2 535 536define void @atomic16_xchg_acquire(ptr %a) nounwind uwtable { 537entry: 538 atomicrmw xchg ptr %a, i16 0 acquire 539 ret void 540} 541; CHECK-LABEL: atomic16_xchg_acquire{{.*}}!pcsections !0 542; CHECK: !pcsections !2 543 544define void @atomic16_add_acquire(ptr %a) nounwind uwtable { 545entry: 546 atomicrmw add ptr %a, i16 0 acquire 547 ret void 548} 549; CHECK-LABEL: atomic16_add_acquire{{.*}}!pcsections !0 550; CHECK: !pcsections !2 551 552define void @atomic16_sub_acquire(ptr %a) nounwind uwtable { 553entry: 554 atomicrmw sub ptr %a, i16 0 acquire 555 ret void 556} 557; CHECK-LABEL: atomic16_sub_acquire{{.*}}!pcsections !0 558; CHECK: !pcsections !2 559 560define void @atomic16_and_acquire(ptr %a) nounwind uwtable { 561entry: 562 atomicrmw and ptr %a, i16 0 acquire 563 ret void 564} 565; CHECK-LABEL: atomic16_and_acquire{{.*}}!pcsections !0 566; CHECK: !pcsections !2 567 568define void @atomic16_or_acquire(ptr %a) nounwind uwtable { 569entry: 570 atomicrmw or ptr %a, i16 0 acquire 571 ret void 572} 573; CHECK-LABEL: atomic16_or_acquire{{.*}}!pcsections !0 574; CHECK: !pcsections !2 575 576define void @atomic16_xor_acquire(ptr %a) nounwind uwtable { 577entry: 578 atomicrmw xor ptr %a, i16 0 acquire 579 ret void 580} 581; CHECK-LABEL: atomic16_xor_acquire{{.*}}!pcsections !0 582; CHECK: !pcsections !2 583 584define void @atomic16_nand_acquire(ptr %a) nounwind uwtable { 585entry: 586 atomicrmw nand ptr %a, i16 0 acquire 587 ret void 588} 589; CHECK-LABEL: atomic16_nand_acquire{{.*}}!pcsections !0 590; CHECK: !pcsections !2 591 592define void @atomic16_xchg_release(ptr %a) nounwind uwtable { 593entry: 594 atomicrmw xchg ptr %a, i16 0 release 595 ret void 596} 597; CHECK-LABEL: atomic16_xchg_release{{.*}}!pcsections !0 598; CHECK: !pcsections !2 599 600define void @atomic16_add_release(ptr %a) nounwind uwtable { 601entry: 602 atomicrmw add ptr %a, i16 0 release 603 ret void 604} 605; CHECK-LABEL: atomic16_add_release{{.*}}!pcsections !0 606; CHECK: !pcsections !2 607 608define void @atomic16_sub_release(ptr %a) nounwind uwtable { 609entry: 610 atomicrmw sub ptr %a, i16 0 release 611 ret void 612} 613; CHECK-LABEL: atomic16_sub_release{{.*}}!pcsections !0 614; CHECK: !pcsections !2 615 616define void @atomic16_and_release(ptr %a) nounwind uwtable { 617entry: 618 atomicrmw and ptr %a, i16 0 release 619 ret void 620} 621; CHECK-LABEL: atomic16_and_release{{.*}}!pcsections !0 622; CHECK: !pcsections !2 623 624define void @atomic16_or_release(ptr %a) nounwind uwtable { 625entry: 626 atomicrmw or ptr %a, i16 0 release 627 ret void 628} 629; CHECK-LABEL: atomic16_or_release{{.*}}!pcsections !0 630; CHECK: !pcsections !2 631 632define void @atomic16_xor_release(ptr %a) nounwind uwtable { 633entry: 634 atomicrmw xor ptr %a, i16 0 release 635 ret void 636} 637; CHECK-LABEL: atomic16_xor_release{{.*}}!pcsections !0 638; CHECK: !pcsections !2 639 640define void @atomic16_nand_release(ptr %a) nounwind uwtable { 641entry: 642 atomicrmw nand ptr %a, i16 0 release 643 ret void 644} 645; CHECK-LABEL: atomic16_nand_release{{.*}}!pcsections !0 646; CHECK: !pcsections !2 647 648define void @atomic16_xchg_acq_rel(ptr %a) nounwind uwtable { 649entry: 650 atomicrmw xchg ptr %a, i16 0 acq_rel 651 ret void 652} 653; CHECK-LABEL: atomic16_xchg_acq_rel{{.*}}!pcsections !0 654; CHECK: !pcsections !2 655 656define void @atomic16_add_acq_rel(ptr %a) nounwind uwtable { 657entry: 658 atomicrmw add ptr %a, i16 0 acq_rel 659 ret void 660} 661; CHECK-LABEL: atomic16_add_acq_rel{{.*}}!pcsections !0 662; CHECK: !pcsections !2 663 664define void @atomic16_sub_acq_rel(ptr %a) nounwind uwtable { 665entry: 666 atomicrmw sub ptr %a, i16 0 acq_rel 667 ret void 668} 669; CHECK-LABEL: atomic16_sub_acq_rel{{.*}}!pcsections !0 670; CHECK: !pcsections !2 671 672define void @atomic16_and_acq_rel(ptr %a) nounwind uwtable { 673entry: 674 atomicrmw and ptr %a, i16 0 acq_rel 675 ret void 676} 677; CHECK-LABEL: atomic16_and_acq_rel{{.*}}!pcsections !0 678; CHECK: !pcsections !2 679 680define void @atomic16_or_acq_rel(ptr %a) nounwind uwtable { 681entry: 682 atomicrmw or ptr %a, i16 0 acq_rel 683 ret void 684} 685; CHECK-LABEL: atomic16_or_acq_rel{{.*}}!pcsections !0 686; CHECK: !pcsections !2 687 688define void @atomic16_xor_acq_rel(ptr %a) nounwind uwtable { 689entry: 690 atomicrmw xor ptr %a, i16 0 acq_rel 691 ret void 692} 693; CHECK-LABEL: atomic16_xor_acq_rel{{.*}}!pcsections !0 694; CHECK: !pcsections !2 695 696define void @atomic16_nand_acq_rel(ptr %a) nounwind uwtable { 697entry: 698 atomicrmw nand ptr %a, i16 0 acq_rel 699 ret void 700} 701; CHECK-LABEL: atomic16_nand_acq_rel{{.*}}!pcsections !0 702; CHECK: !pcsections !2 703 704define void @atomic16_xchg_seq_cst(ptr %a) nounwind uwtable { 705entry: 706 atomicrmw xchg ptr %a, i16 0 seq_cst 707 ret void 708} 709; CHECK-LABEL: atomic16_xchg_seq_cst{{.*}}!pcsections !0 710; CHECK: !pcsections !2 711 712define void @atomic16_add_seq_cst(ptr %a) nounwind uwtable { 713entry: 714 atomicrmw add ptr %a, i16 0 seq_cst 715 ret void 716} 717; CHECK-LABEL: atomic16_add_seq_cst{{.*}}!pcsections !0 718; CHECK: !pcsections !2 719 720define void @atomic16_sub_seq_cst(ptr %a) nounwind uwtable { 721entry: 722 atomicrmw sub ptr %a, i16 0 seq_cst 723 ret void 724} 725; CHECK-LABEL: atomic16_sub_seq_cst{{.*}}!pcsections !0 726; CHECK: !pcsections !2 727 728define void @atomic16_and_seq_cst(ptr %a) nounwind uwtable { 729entry: 730 atomicrmw and ptr %a, i16 0 seq_cst 731 ret void 732} 733; CHECK-LABEL: atomic16_and_seq_cst{{.*}}!pcsections !0 734; CHECK: !pcsections !2 735 736define void @atomic16_or_seq_cst(ptr %a) nounwind uwtable { 737entry: 738 atomicrmw or ptr %a, i16 0 seq_cst 739 ret void 740} 741; CHECK-LABEL: atomic16_or_seq_cst{{.*}}!pcsections !0 742; CHECK: !pcsections !2 743 744define void @atomic16_xor_seq_cst(ptr %a) nounwind uwtable { 745entry: 746 atomicrmw xor ptr %a, i16 0 seq_cst 747 ret void 748} 749; CHECK-LABEL: atomic16_xor_seq_cst{{.*}}!pcsections !0 750; CHECK: !pcsections !2 751 752define void @atomic16_nand_seq_cst(ptr %a) nounwind uwtable { 753entry: 754 atomicrmw nand ptr %a, i16 0 seq_cst 755 ret void 756} 757; CHECK-LABEL: atomic16_nand_seq_cst{{.*}}!pcsections !0 758; CHECK: !pcsections !2 759 760define void @atomic16_cas_monotonic(ptr %a) nounwind uwtable { 761entry: 762 cmpxchg ptr %a, i16 0, i16 1 monotonic monotonic 763 cmpxchg ptr %a, i16 0, i16 1 monotonic acquire 764 cmpxchg ptr %a, i16 0, i16 1 monotonic seq_cst 765 ret void 766} 767; CHECK-LABEL: atomic16_cas_monotonic{{.*}}!pcsections !0 768; CHECK: cmpxchg ptr %a, i16 0, i16 1 monotonic monotonic, align 2, !pcsections !2 769; CHECK: cmpxchg ptr %a, i16 0, i16 1 monotonic acquire, align 2, !pcsections !2 770; CHECK: cmpxchg ptr %a, i16 0, i16 1 monotonic seq_cst, align 2, !pcsections !2 771 772define void @atomic16_cas_acquire(ptr %a) nounwind uwtable { 773entry: 774 cmpxchg ptr %a, i16 0, i16 1 acquire monotonic 775 cmpxchg ptr %a, i16 0, i16 1 acquire acquire 776 cmpxchg ptr %a, i16 0, i16 1 acquire seq_cst 777 ret void 778} 779; CHECK-LABEL: atomic16_cas_acquire{{.*}}!pcsections !0 780; CHECK: cmpxchg ptr %a, i16 0, i16 1 acquire monotonic, align 2, !pcsections !2 781; CHECK: cmpxchg ptr %a, i16 0, i16 1 acquire acquire, align 2, !pcsections !2 782; CHECK: cmpxchg ptr %a, i16 0, i16 1 acquire seq_cst, align 2, !pcsections !2 783 784define void @atomic16_cas_release(ptr %a) nounwind uwtable { 785entry: 786 cmpxchg ptr %a, i16 0, i16 1 release monotonic 787 cmpxchg ptr %a, i16 0, i16 1 release acquire 788 cmpxchg ptr %a, i16 0, i16 1 release seq_cst 789 ret void 790} 791; CHECK-LABEL: atomic16_cas_release{{.*}}!pcsections !0 792; CHECK: cmpxchg ptr %a, i16 0, i16 1 release monotonic, align 2, !pcsections !2 793; CHECK: cmpxchg ptr %a, i16 0, i16 1 release acquire, align 2, !pcsections !2 794; CHECK: cmpxchg ptr %a, i16 0, i16 1 release seq_cst, align 2, !pcsections !2 795 796define void @atomic16_cas_acq_rel(ptr %a) nounwind uwtable { 797entry: 798 cmpxchg ptr %a, i16 0, i16 1 acq_rel monotonic 799 cmpxchg ptr %a, i16 0, i16 1 acq_rel acquire 800 cmpxchg ptr %a, i16 0, i16 1 acq_rel seq_cst 801 ret void 802} 803; CHECK-LABEL: atomic16_cas_acq_rel{{.*}}!pcsections !0 804; CHECK: cmpxchg ptr %a, i16 0, i16 1 acq_rel monotonic, align 2, !pcsections !2 805; CHECK: cmpxchg ptr %a, i16 0, i16 1 acq_rel acquire, align 2, !pcsections !2 806; CHECK: cmpxchg ptr %a, i16 0, i16 1 acq_rel seq_cst, align 2, !pcsections !2 807 808define void @atomic16_cas_seq_cst(ptr %a) nounwind uwtable { 809entry: 810 cmpxchg ptr %a, i16 0, i16 1 seq_cst monotonic 811 cmpxchg ptr %a, i16 0, i16 1 seq_cst acquire 812 cmpxchg ptr %a, i16 0, i16 1 seq_cst seq_cst 813 ret void 814} 815; CHECK-LABEL: atomic16_cas_seq_cst{{.*}}!pcsections !0 816; CHECK: cmpxchg ptr %a, i16 0, i16 1 seq_cst monotonic, align 2, !pcsections !2 817; CHECK: cmpxchg ptr %a, i16 0, i16 1 seq_cst acquire, align 2, !pcsections !2 818; CHECK: cmpxchg ptr %a, i16 0, i16 1 seq_cst seq_cst, align 2, !pcsections !2 819 820define i32 @atomic32_load_unordered(ptr %a) nounwind uwtable { 821entry: 822 %0 = load atomic i32, ptr %a unordered, align 4 823 ret i32 %0 824} 825; CHECK-LABEL: atomic32_load_unordered{{.*}}!pcsections !0 826; CHECK: !pcsections !2 827 828define i32 @atomic32_load_monotonic(ptr %a) nounwind uwtable { 829entry: 830 %0 = load atomic i32, ptr %a monotonic, align 4 831 ret i32 %0 832} 833; CHECK-LABEL: atomic32_load_monotonic{{.*}}!pcsections !0 834; CHECK: !pcsections !2 835 836define i32 @atomic32_load_acquire(ptr %a) nounwind uwtable { 837entry: 838 %0 = load atomic i32, ptr %a acquire, align 4 839 ret i32 %0 840} 841; CHECK-LABEL: atomic32_load_acquire{{.*}}!pcsections !0 842; CHECK: !pcsections !2 843 844define i32 @atomic32_load_seq_cst(ptr %a) nounwind uwtable { 845entry: 846 %0 = load atomic i32, ptr %a seq_cst, align 4 847 ret i32 %0 848} 849; CHECK-LABEL: atomic32_load_seq_cst{{.*}}!pcsections !0 850; CHECK: !pcsections !2 851 852define void @atomic32_store_unordered(ptr %a) nounwind uwtable { 853entry: 854 store atomic i32 0, ptr %a unordered, align 4 855 ret void 856} 857; CHECK-LABEL: atomic32_store_unordered{{.*}}!pcsections !0 858; CHECK: !pcsections !2 859 860define void @atomic32_store_monotonic(ptr %a) nounwind uwtable { 861entry: 862 store atomic i32 0, ptr %a monotonic, align 4 863 ret void 864} 865; CHECK-LABEL: atomic32_store_monotonic{{.*}}!pcsections !0 866; CHECK: !pcsections !2 867 868define void @atomic32_store_release(ptr %a) nounwind uwtable { 869entry: 870 store atomic i32 0, ptr %a release, align 4 871 ret void 872} 873; CHECK-LABEL: atomic32_store_release{{.*}}!pcsections !0 874; CHECK: !pcsections !2 875 876define void @atomic32_store_seq_cst(ptr %a) nounwind uwtable { 877entry: 878 store atomic i32 0, ptr %a seq_cst, align 4 879 ret void 880} 881; CHECK-LABEL: atomic32_store_seq_cst{{.*}}!pcsections !0 882; CHECK: !pcsections !2 883 884define void @atomic32_xchg_monotonic(ptr %a) nounwind uwtable { 885entry: 886 atomicrmw xchg ptr %a, i32 0 monotonic 887 ret void 888} 889; CHECK-LABEL: atomic32_xchg_monotonic{{.*}}!pcsections !0 890; CHECK: !pcsections !2 891 892define void @atomic32_add_monotonic(ptr %a) nounwind uwtable { 893entry: 894 atomicrmw add ptr %a, i32 0 monotonic 895 ret void 896} 897; CHECK-LABEL: atomic32_add_monotonic{{.*}}!pcsections !0 898; CHECK: !pcsections !2 899 900define void @atomic32_sub_monotonic(ptr %a) nounwind uwtable { 901entry: 902 atomicrmw sub ptr %a, i32 0 monotonic 903 ret void 904} 905; CHECK-LABEL: atomic32_sub_monotonic{{.*}}!pcsections !0 906; CHECK: !pcsections !2 907 908define void @atomic32_and_monotonic(ptr %a) nounwind uwtable { 909entry: 910 atomicrmw and ptr %a, i32 0 monotonic 911 ret void 912} 913; CHECK-LABEL: atomic32_and_monotonic{{.*}}!pcsections !0 914; CHECK: !pcsections !2 915 916define void @atomic32_or_monotonic(ptr %a) nounwind uwtable { 917entry: 918 atomicrmw or ptr %a, i32 0 monotonic 919 ret void 920} 921; CHECK-LABEL: atomic32_or_monotonic{{.*}}!pcsections !0 922; CHECK: !pcsections !2 923 924define void @atomic32_xor_monotonic(ptr %a) nounwind uwtable { 925entry: 926 atomicrmw xor ptr %a, i32 0 monotonic 927 ret void 928} 929; CHECK-LABEL: atomic32_xor_monotonic{{.*}}!pcsections !0 930; CHECK: !pcsections !2 931 932define void @atomic32_nand_monotonic(ptr %a) nounwind uwtable { 933entry: 934 atomicrmw nand ptr %a, i32 0 monotonic 935 ret void 936} 937; CHECK-LABEL: atomic32_nand_monotonic{{.*}}!pcsections !0 938; CHECK: !pcsections !2 939 940define void @atomic32_xchg_acquire(ptr %a) nounwind uwtable { 941entry: 942 atomicrmw xchg ptr %a, i32 0 acquire 943 ret void 944} 945; CHECK-LABEL: atomic32_xchg_acquire{{.*}}!pcsections !0 946; CHECK: !pcsections !2 947 948define void @atomic32_add_acquire(ptr %a) nounwind uwtable { 949entry: 950 atomicrmw add ptr %a, i32 0 acquire 951 ret void 952} 953; CHECK-LABEL: atomic32_add_acquire{{.*}}!pcsections !0 954; CHECK: !pcsections !2 955 956define void @atomic32_sub_acquire(ptr %a) nounwind uwtable { 957entry: 958 atomicrmw sub ptr %a, i32 0 acquire 959 ret void 960} 961; CHECK-LABEL: atomic32_sub_acquire{{.*}}!pcsections !0 962; CHECK: !pcsections !2 963 964define void @atomic32_and_acquire(ptr %a) nounwind uwtable { 965entry: 966 atomicrmw and ptr %a, i32 0 acquire 967 ret void 968} 969; CHECK-LABEL: atomic32_and_acquire{{.*}}!pcsections !0 970; CHECK: !pcsections !2 971 972define void @atomic32_or_acquire(ptr %a) nounwind uwtable { 973entry: 974 atomicrmw or ptr %a, i32 0 acquire 975 ret void 976} 977; CHECK-LABEL: atomic32_or_acquire{{.*}}!pcsections !0 978; CHECK: !pcsections !2 979 980define void @atomic32_xor_acquire(ptr %a) nounwind uwtable { 981entry: 982 atomicrmw xor ptr %a, i32 0 acquire 983 ret void 984} 985; CHECK-LABEL: atomic32_xor_acquire{{.*}}!pcsections !0 986; CHECK: !pcsections !2 987 988define void @atomic32_nand_acquire(ptr %a) nounwind uwtable { 989entry: 990 atomicrmw nand ptr %a, i32 0 acquire 991 ret void 992} 993; CHECK-LABEL: atomic32_nand_acquire{{.*}}!pcsections !0 994; CHECK: !pcsections !2 995 996define void @atomic32_xchg_release(ptr %a) nounwind uwtable { 997entry: 998 atomicrmw xchg ptr %a, i32 0 release 999 ret void 1000} 1001; CHECK-LABEL: atomic32_xchg_release{{.*}}!pcsections !0 1002; CHECK: !pcsections !2 1003 1004define void @atomic32_add_release(ptr %a) nounwind uwtable { 1005entry: 1006 atomicrmw add ptr %a, i32 0 release 1007 ret void 1008} 1009; CHECK-LABEL: atomic32_add_release{{.*}}!pcsections !0 1010; CHECK: !pcsections !2 1011 1012define void @atomic32_sub_release(ptr %a) nounwind uwtable { 1013entry: 1014 atomicrmw sub ptr %a, i32 0 release 1015 ret void 1016} 1017; CHECK-LABEL: atomic32_sub_release{{.*}}!pcsections !0 1018; CHECK: !pcsections !2 1019 1020define void @atomic32_and_release(ptr %a) nounwind uwtable { 1021entry: 1022 atomicrmw and ptr %a, i32 0 release 1023 ret void 1024} 1025; CHECK-LABEL: atomic32_and_release{{.*}}!pcsections !0 1026; CHECK: !pcsections !2 1027 1028define void @atomic32_or_release(ptr %a) nounwind uwtable { 1029entry: 1030 atomicrmw or ptr %a, i32 0 release 1031 ret void 1032} 1033; CHECK-LABEL: atomic32_or_release{{.*}}!pcsections !0 1034; CHECK: !pcsections !2 1035 1036define void @atomic32_xor_release(ptr %a) nounwind uwtable { 1037entry: 1038 atomicrmw xor ptr %a, i32 0 release 1039 ret void 1040} 1041; CHECK-LABEL: atomic32_xor_release{{.*}}!pcsections !0 1042; CHECK: !pcsections !2 1043 1044define void @atomic32_nand_release(ptr %a) nounwind uwtable { 1045entry: 1046 atomicrmw nand ptr %a, i32 0 release 1047 ret void 1048} 1049; CHECK-LABEL: atomic32_nand_release{{.*}}!pcsections !0 1050; CHECK: !pcsections !2 1051 1052define void @atomic32_xchg_acq_rel(ptr %a) nounwind uwtable { 1053entry: 1054 atomicrmw xchg ptr %a, i32 0 acq_rel 1055 ret void 1056} 1057; CHECK-LABEL: atomic32_xchg_acq_rel{{.*}}!pcsections !0 1058; CHECK: !pcsections !2 1059 1060define void @atomic32_add_acq_rel(ptr %a) nounwind uwtable { 1061entry: 1062 atomicrmw add ptr %a, i32 0 acq_rel 1063 ret void 1064} 1065; CHECK-LABEL: atomic32_add_acq_rel{{.*}}!pcsections !0 1066; CHECK: !pcsections !2 1067 1068define void @atomic32_sub_acq_rel(ptr %a) nounwind uwtable { 1069entry: 1070 atomicrmw sub ptr %a, i32 0 acq_rel 1071 ret void 1072} 1073; CHECK-LABEL: atomic32_sub_acq_rel{{.*}}!pcsections !0 1074; CHECK: !pcsections !2 1075 1076define void @atomic32_and_acq_rel(ptr %a) nounwind uwtable { 1077entry: 1078 atomicrmw and ptr %a, i32 0 acq_rel 1079 ret void 1080} 1081; CHECK-LABEL: atomic32_and_acq_rel{{.*}}!pcsections !0 1082; CHECK: !pcsections !2 1083 1084define void @atomic32_or_acq_rel(ptr %a) nounwind uwtable { 1085entry: 1086 atomicrmw or ptr %a, i32 0 acq_rel 1087 ret void 1088} 1089; CHECK-LABEL: atomic32_or_acq_rel{{.*}}!pcsections !0 1090; CHECK: !pcsections !2 1091 1092define void @atomic32_xor_acq_rel(ptr %a) nounwind uwtable { 1093entry: 1094 atomicrmw xor ptr %a, i32 0 acq_rel 1095 ret void 1096} 1097; CHECK-LABEL: atomic32_xor_acq_rel{{.*}}!pcsections !0 1098; CHECK: !pcsections !2 1099 1100define void @atomic32_nand_acq_rel(ptr %a) nounwind uwtable { 1101entry: 1102 atomicrmw nand ptr %a, i32 0 acq_rel 1103 ret void 1104} 1105; CHECK-LABEL: atomic32_nand_acq_rel{{.*}}!pcsections !0 1106; CHECK: !pcsections !2 1107 1108define void @atomic32_xchg_seq_cst(ptr %a) nounwind uwtable { 1109entry: 1110 atomicrmw xchg ptr %a, i32 0 seq_cst 1111 ret void 1112} 1113; CHECK-LABEL: atomic32_xchg_seq_cst{{.*}}!pcsections !0 1114; CHECK: !pcsections !2 1115 1116define void @atomic32_add_seq_cst(ptr %a) nounwind uwtable { 1117entry: 1118 atomicrmw add ptr %a, i32 0 seq_cst 1119 ret void 1120} 1121; CHECK-LABEL: atomic32_add_seq_cst{{.*}}!pcsections !0 1122; CHECK: !pcsections !2 1123 1124define void @atomic32_sub_seq_cst(ptr %a) nounwind uwtable { 1125entry: 1126 atomicrmw sub ptr %a, i32 0 seq_cst 1127 ret void 1128} 1129; CHECK-LABEL: atomic32_sub_seq_cst{{.*}}!pcsections !0 1130; CHECK: !pcsections !2 1131 1132define void @atomic32_and_seq_cst(ptr %a) nounwind uwtable { 1133entry: 1134 atomicrmw and ptr %a, i32 0 seq_cst 1135 ret void 1136} 1137; CHECK-LABEL: atomic32_and_seq_cst{{.*}}!pcsections !0 1138; CHECK: !pcsections !2 1139 1140define void @atomic32_or_seq_cst(ptr %a) nounwind uwtable { 1141entry: 1142 atomicrmw or ptr %a, i32 0 seq_cst 1143 ret void 1144} 1145; CHECK-LABEL: atomic32_or_seq_cst{{.*}}!pcsections !0 1146; CHECK: !pcsections !2 1147 1148define void @atomic32_xor_seq_cst(ptr %a) nounwind uwtable { 1149entry: 1150 atomicrmw xor ptr %a, i32 0 seq_cst 1151 ret void 1152} 1153; CHECK-LABEL: atomic32_xor_seq_cst{{.*}}!pcsections !0 1154; CHECK: !pcsections !2 1155 1156define void @atomic32_nand_seq_cst(ptr %a) nounwind uwtable { 1157entry: 1158 atomicrmw nand ptr %a, i32 0 seq_cst 1159 ret void 1160} 1161; CHECK-LABEL: atomic32_nand_seq_cst{{.*}}!pcsections !0 1162; CHECK: !pcsections !2 1163 1164define void @atomic32_cas_monotonic(ptr %a) nounwind uwtable { 1165entry: 1166 cmpxchg ptr %a, i32 0, i32 1 monotonic monotonic 1167 cmpxchg ptr %a, i32 0, i32 1 monotonic acquire 1168 cmpxchg ptr %a, i32 0, i32 1 monotonic seq_cst 1169 ret void 1170} 1171; CHECK-LABEL: atomic32_cas_monotonic{{.*}}!pcsections !0 1172; CHECK: cmpxchg ptr %a, i32 0, i32 1 monotonic monotonic, align 4, !pcsections !2 1173; CHECK: cmpxchg ptr %a, i32 0, i32 1 monotonic acquire, align 4, !pcsections !2 1174; CHECK: cmpxchg ptr %a, i32 0, i32 1 monotonic seq_cst, align 4, !pcsections !2 1175 1176define void @atomic32_cas_acquire(ptr %a) nounwind uwtable { 1177entry: 1178 cmpxchg ptr %a, i32 0, i32 1 acquire monotonic 1179 cmpxchg ptr %a, i32 0, i32 1 acquire acquire 1180 cmpxchg ptr %a, i32 0, i32 1 acquire seq_cst 1181 ret void 1182} 1183; CHECK-LABEL: atomic32_cas_acquire{{.*}}!pcsections !0 1184; CHECK: cmpxchg ptr %a, i32 0, i32 1 acquire monotonic, align 4, !pcsections !2 1185; CHECK: cmpxchg ptr %a, i32 0, i32 1 acquire acquire, align 4, !pcsections !2 1186; CHECK: cmpxchg ptr %a, i32 0, i32 1 acquire seq_cst, align 4, !pcsections !2 1187 1188define void @atomic32_cas_release(ptr %a) nounwind uwtable { 1189entry: 1190 cmpxchg ptr %a, i32 0, i32 1 release monotonic 1191 cmpxchg ptr %a, i32 0, i32 1 release acquire 1192 cmpxchg ptr %a, i32 0, i32 1 release seq_cst 1193 ret void 1194} 1195; CHECK-LABEL: atomic32_cas_release{{.*}}!pcsections !0 1196; CHECK: cmpxchg ptr %a, i32 0, i32 1 release monotonic, align 4, !pcsections !2 1197; CHECK: cmpxchg ptr %a, i32 0, i32 1 release acquire, align 4, !pcsections !2 1198; CHECK: cmpxchg ptr %a, i32 0, i32 1 release seq_cst, align 4, !pcsections !2 1199 1200define void @atomic32_cas_acq_rel(ptr %a) nounwind uwtable { 1201entry: 1202 cmpxchg ptr %a, i32 0, i32 1 acq_rel monotonic 1203 cmpxchg ptr %a, i32 0, i32 1 acq_rel acquire 1204 cmpxchg ptr %a, i32 0, i32 1 acq_rel seq_cst 1205 ret void 1206} 1207; CHECK-LABEL: atomic32_cas_acq_rel{{.*}}!pcsections !0 1208; CHECK: cmpxchg ptr %a, i32 0, i32 1 acq_rel monotonic, align 4, !pcsections !2 1209; CHECK: cmpxchg ptr %a, i32 0, i32 1 acq_rel acquire, align 4, !pcsections !2 1210; CHECK: cmpxchg ptr %a, i32 0, i32 1 acq_rel seq_cst, align 4, !pcsections !2 1211 1212define void @atomic32_cas_seq_cst(ptr %a) nounwind uwtable { 1213entry: 1214 cmpxchg ptr %a, i32 0, i32 1 seq_cst monotonic 1215 cmpxchg ptr %a, i32 0, i32 1 seq_cst acquire 1216 cmpxchg ptr %a, i32 0, i32 1 seq_cst seq_cst 1217 ret void 1218} 1219; CHECK-LABEL: atomic32_cas_seq_cst{{.*}}!pcsections !0 1220; CHECK: cmpxchg ptr %a, i32 0, i32 1 seq_cst monotonic, align 4, !pcsections !2 1221; CHECK: cmpxchg ptr %a, i32 0, i32 1 seq_cst acquire, align 4, !pcsections !2 1222; CHECK: cmpxchg ptr %a, i32 0, i32 1 seq_cst seq_cst, align 4, !pcsections !2 1223 1224define i64 @atomic64_load_unordered(ptr %a) nounwind uwtable { 1225entry: 1226 %0 = load atomic i64, ptr %a unordered, align 8 1227 ret i64 %0 1228} 1229; CHECK-LABEL: atomic64_load_unordered{{.*}}!pcsections !0 1230; CHECK: !pcsections !2 1231 1232define i64 @atomic64_load_monotonic(ptr %a) nounwind uwtable { 1233entry: 1234 %0 = load atomic i64, ptr %a monotonic, align 8 1235 ret i64 %0 1236} 1237; CHECK-LABEL: atomic64_load_monotonic{{.*}}!pcsections !0 1238; CHECK: !pcsections !2 1239 1240define i64 @atomic64_load_acquire(ptr %a) nounwind uwtable { 1241entry: 1242 %0 = load atomic i64, ptr %a acquire, align 8 1243 ret i64 %0 1244} 1245; CHECK-LABEL: atomic64_load_acquire{{.*}}!pcsections !0 1246; CHECK: !pcsections !2 1247 1248define i64 @atomic64_load_seq_cst(ptr %a) nounwind uwtable { 1249entry: 1250 %0 = load atomic i64, ptr %a seq_cst, align 8 1251 ret i64 %0 1252} 1253; CHECK-LABEL: atomic64_load_seq_cst{{.*}}!pcsections !0 1254; CHECK: !pcsections !2 1255 1256define ptr @atomic64_load_seq_cst_ptr_ty(ptr %a) nounwind uwtable { 1257entry: 1258 %0 = load atomic ptr, ptr %a seq_cst, align 8 1259 ret ptr %0 1260} 1261; CHECK-LABEL: atomic64_load_seq_cst{{.*}}!pcsections !0 1262; CHECK: !pcsections !2 1263 1264define void @atomic64_store_unordered(ptr %a) nounwind uwtable { 1265entry: 1266 store atomic i64 0, ptr %a unordered, align 8 1267 ret void 1268} 1269; CHECK-LABEL: atomic64_store_unordered{{.*}}!pcsections !0 1270; CHECK: !pcsections !2 1271 1272define void @atomic64_store_monotonic(ptr %a) nounwind uwtable { 1273entry: 1274 store atomic i64 0, ptr %a monotonic, align 8 1275 ret void 1276} 1277; CHECK-LABEL: atomic64_store_monotonic{{.*}}!pcsections !0 1278; CHECK: !pcsections !2 1279 1280define void @atomic64_store_release(ptr %a) nounwind uwtable { 1281entry: 1282 store atomic i64 0, ptr %a release, align 8 1283 ret void 1284} 1285; CHECK-LABEL: atomic64_store_release{{.*}}!pcsections !0 1286; CHECK: !pcsections !2 1287 1288define void @atomic64_store_seq_cst(ptr %a) nounwind uwtable { 1289entry: 1290 store atomic i64 0, ptr %a seq_cst, align 8 1291 ret void 1292} 1293; CHECK-LABEL: atomic64_store_seq_cst{{.*}}!pcsections !0 1294; CHECK: !pcsections !2 1295 1296define void @atomic64_store_seq_cst_ptr_ty(ptr %a, ptr %v) nounwind uwtable { 1297entry: 1298 store atomic ptr %v, ptr %a seq_cst, align 8 1299 ret void 1300} 1301; CHECK-LABEL: atomic64_store_seq_cst{{.*}}!pcsections !0 1302; CHECK: !pcsections !2 1303 1304define void @atomic64_xchg_monotonic(ptr %a) nounwind uwtable { 1305entry: 1306 atomicrmw xchg ptr %a, i64 0 monotonic 1307 ret void 1308} 1309; CHECK-LABEL: atomic64_xchg_monotonic{{.*}}!pcsections !0 1310; CHECK: !pcsections !2 1311 1312define void @atomic64_add_monotonic(ptr %a) nounwind uwtable { 1313entry: 1314 atomicrmw add ptr %a, i64 0 monotonic 1315 ret void 1316} 1317; CHECK-LABEL: atomic64_add_monotonic{{.*}}!pcsections !0 1318; CHECK: !pcsections !2 1319 1320define void @atomic64_sub_monotonic(ptr %a) nounwind uwtable { 1321entry: 1322 atomicrmw sub ptr %a, i64 0 monotonic 1323 ret void 1324} 1325; CHECK-LABEL: atomic64_sub_monotonic{{.*}}!pcsections !0 1326; CHECK: !pcsections !2 1327 1328define void @atomic64_and_monotonic(ptr %a) nounwind uwtable { 1329entry: 1330 atomicrmw and ptr %a, i64 0 monotonic 1331 ret void 1332} 1333; CHECK-LABEL: atomic64_and_monotonic{{.*}}!pcsections !0 1334; CHECK: !pcsections !2 1335 1336define void @atomic64_or_monotonic(ptr %a) nounwind uwtable { 1337entry: 1338 atomicrmw or ptr %a, i64 0 monotonic 1339 ret void 1340} 1341; CHECK-LABEL: atomic64_or_monotonic{{.*}}!pcsections !0 1342; CHECK: !pcsections !2 1343 1344define void @atomic64_xor_monotonic(ptr %a) nounwind uwtable { 1345entry: 1346 atomicrmw xor ptr %a, i64 0 monotonic 1347 ret void 1348} 1349; CHECK-LABEL: atomic64_xor_monotonic{{.*}}!pcsections !0 1350; CHECK: !pcsections !2 1351 1352define void @atomic64_nand_monotonic(ptr %a) nounwind uwtable { 1353entry: 1354 atomicrmw nand ptr %a, i64 0 monotonic 1355 ret void 1356} 1357; CHECK-LABEL: atomic64_nand_monotonic{{.*}}!pcsections !0 1358; CHECK: !pcsections !2 1359 1360define void @atomic64_xchg_acquire(ptr %a) nounwind uwtable { 1361entry: 1362 atomicrmw xchg ptr %a, i64 0 acquire 1363 ret void 1364} 1365; CHECK-LABEL: atomic64_xchg_acquire{{.*}}!pcsections !0 1366; CHECK: !pcsections !2 1367 1368define void @atomic64_add_acquire(ptr %a) nounwind uwtable { 1369entry: 1370 atomicrmw add ptr %a, i64 0 acquire 1371 ret void 1372} 1373; CHECK-LABEL: atomic64_add_acquire{{.*}}!pcsections !0 1374; CHECK: !pcsections !2 1375 1376define void @atomic64_sub_acquire(ptr %a) nounwind uwtable { 1377entry: 1378 atomicrmw sub ptr %a, i64 0 acquire 1379 ret void 1380} 1381; CHECK-LABEL: atomic64_sub_acquire{{.*}}!pcsections !0 1382; CHECK: !pcsections !2 1383 1384define void @atomic64_and_acquire(ptr %a) nounwind uwtable { 1385entry: 1386 atomicrmw and ptr %a, i64 0 acquire 1387 ret void 1388} 1389; CHECK-LABEL: atomic64_and_acquire{{.*}}!pcsections !0 1390; CHECK: !pcsections !2 1391 1392define void @atomic64_or_acquire(ptr %a) nounwind uwtable { 1393entry: 1394 atomicrmw or ptr %a, i64 0 acquire 1395 ret void 1396} 1397; CHECK-LABEL: atomic64_or_acquire{{.*}}!pcsections !0 1398; CHECK: !pcsections !2 1399 1400define void @atomic64_xor_acquire(ptr %a) nounwind uwtable { 1401entry: 1402 atomicrmw xor ptr %a, i64 0 acquire 1403 ret void 1404} 1405; CHECK-LABEL: atomic64_xor_acquire{{.*}}!pcsections !0 1406; CHECK: !pcsections !2 1407 1408define void @atomic64_nand_acquire(ptr %a) nounwind uwtable { 1409entry: 1410 atomicrmw nand ptr %a, i64 0 acquire 1411 ret void 1412} 1413; CHECK-LABEL: atomic64_nand_acquire{{.*}}!pcsections !0 1414; CHECK: !pcsections !2 1415 1416define void @atomic64_xchg_release(ptr %a) nounwind uwtable { 1417entry: 1418 atomicrmw xchg ptr %a, i64 0 release 1419 ret void 1420} 1421; CHECK-LABEL: atomic64_xchg_release{{.*}}!pcsections !0 1422; CHECK: !pcsections !2 1423 1424define void @atomic64_add_release(ptr %a) nounwind uwtable { 1425entry: 1426 atomicrmw add ptr %a, i64 0 release 1427 ret void 1428} 1429; CHECK-LABEL: atomic64_add_release{{.*}}!pcsections !0 1430; CHECK: !pcsections !2 1431 1432define void @atomic64_sub_release(ptr %a) nounwind uwtable { 1433entry: 1434 atomicrmw sub ptr %a, i64 0 release 1435 ret void 1436} 1437; CHECK-LABEL: atomic64_sub_release{{.*}}!pcsections !0 1438; CHECK: !pcsections !2 1439 1440define void @atomic64_and_release(ptr %a) nounwind uwtable { 1441entry: 1442 atomicrmw and ptr %a, i64 0 release 1443 ret void 1444} 1445; CHECK-LABEL: atomic64_and_release{{.*}}!pcsections !0 1446; CHECK: !pcsections !2 1447 1448define void @atomic64_or_release(ptr %a) nounwind uwtable { 1449entry: 1450 atomicrmw or ptr %a, i64 0 release 1451 ret void 1452} 1453; CHECK-LABEL: atomic64_or_release{{.*}}!pcsections !0 1454; CHECK: !pcsections !2 1455 1456define void @atomic64_xor_release(ptr %a) nounwind uwtable { 1457entry: 1458 atomicrmw xor ptr %a, i64 0 release 1459 ret void 1460} 1461; CHECK-LABEL: atomic64_xor_release{{.*}}!pcsections !0 1462; CHECK: !pcsections !2 1463 1464define void @atomic64_nand_release(ptr %a) nounwind uwtable { 1465entry: 1466 atomicrmw nand ptr %a, i64 0 release 1467 ret void 1468} 1469; CHECK-LABEL: atomic64_nand_release{{.*}}!pcsections !0 1470; CHECK: !pcsections !2 1471 1472define void @atomic64_xchg_acq_rel(ptr %a) nounwind uwtable { 1473entry: 1474 atomicrmw xchg ptr %a, i64 0 acq_rel 1475 ret void 1476} 1477; CHECK-LABEL: atomic64_xchg_acq_rel{{.*}}!pcsections !0 1478; CHECK: !pcsections !2 1479 1480define void @atomic64_add_acq_rel(ptr %a) nounwind uwtable { 1481entry: 1482 atomicrmw add ptr %a, i64 0 acq_rel 1483 ret void 1484} 1485; CHECK-LABEL: atomic64_add_acq_rel{{.*}}!pcsections !0 1486; CHECK: !pcsections !2 1487 1488define void @atomic64_sub_acq_rel(ptr %a) nounwind uwtable { 1489entry: 1490 atomicrmw sub ptr %a, i64 0 acq_rel 1491 ret void 1492} 1493; CHECK-LABEL: atomic64_sub_acq_rel{{.*}}!pcsections !0 1494; CHECK: !pcsections !2 1495 1496define void @atomic64_and_acq_rel(ptr %a) nounwind uwtable { 1497entry: 1498 atomicrmw and ptr %a, i64 0 acq_rel 1499 ret void 1500} 1501; CHECK-LABEL: atomic64_and_acq_rel{{.*}}!pcsections !0 1502; CHECK: !pcsections !2 1503 1504define void @atomic64_or_acq_rel(ptr %a) nounwind uwtable { 1505entry: 1506 atomicrmw or ptr %a, i64 0 acq_rel 1507 ret void 1508} 1509; CHECK-LABEL: atomic64_or_acq_rel{{.*}}!pcsections !0 1510; CHECK: !pcsections !2 1511 1512define void @atomic64_xor_acq_rel(ptr %a) nounwind uwtable { 1513entry: 1514 atomicrmw xor ptr %a, i64 0 acq_rel 1515 ret void 1516} 1517; CHECK-LABEL: atomic64_xor_acq_rel{{.*}}!pcsections !0 1518; CHECK: !pcsections !2 1519 1520define void @atomic64_nand_acq_rel(ptr %a) nounwind uwtable { 1521entry: 1522 atomicrmw nand ptr %a, i64 0 acq_rel 1523 ret void 1524} 1525; CHECK-LABEL: atomic64_nand_acq_rel{{.*}}!pcsections !0 1526; CHECK: !pcsections !2 1527 1528define void @atomic64_xchg_seq_cst(ptr %a) nounwind uwtable { 1529entry: 1530 atomicrmw xchg ptr %a, i64 0 seq_cst 1531 ret void 1532} 1533; CHECK-LABEL: atomic64_xchg_seq_cst{{.*}}!pcsections !0 1534; CHECK: !pcsections !2 1535 1536define void @atomic64_add_seq_cst(ptr %a) nounwind uwtable { 1537entry: 1538 atomicrmw add ptr %a, i64 0 seq_cst 1539 ret void 1540} 1541; CHECK-LABEL: atomic64_add_seq_cst{{.*}}!pcsections !0 1542; CHECK: !pcsections !2 1543 1544define void @atomic64_sub_seq_cst(ptr %a) nounwind uwtable { 1545entry: 1546 atomicrmw sub ptr %a, i64 0 seq_cst 1547 ret void 1548} 1549; CHECK-LABEL: atomic64_sub_seq_cst{{.*}}!pcsections !0 1550; CHECK: !pcsections !2 1551 1552define void @atomic64_and_seq_cst(ptr %a) nounwind uwtable { 1553entry: 1554 atomicrmw and ptr %a, i64 0 seq_cst 1555 ret void 1556} 1557; CHECK-LABEL: atomic64_and_seq_cst{{.*}}!pcsections !0 1558; CHECK: !pcsections !2 1559 1560define void @atomic64_or_seq_cst(ptr %a) nounwind uwtable { 1561entry: 1562 atomicrmw or ptr %a, i64 0 seq_cst 1563 ret void 1564} 1565; CHECK-LABEL: atomic64_or_seq_cst{{.*}}!pcsections !0 1566; CHECK: !pcsections !2 1567 1568define void @atomic64_xor_seq_cst(ptr %a) nounwind uwtable { 1569entry: 1570 atomicrmw xor ptr %a, i64 0 seq_cst 1571 ret void 1572} 1573; CHECK-LABEL: atomic64_xor_seq_cst{{.*}}!pcsections !0 1574; CHECK: !pcsections !2 1575 1576define void @atomic64_nand_seq_cst(ptr %a) nounwind uwtable { 1577entry: 1578 atomicrmw nand ptr %a, i64 0 seq_cst 1579 ret void 1580} 1581; CHECK-LABEL: atomic64_nand_seq_cst{{.*}}!pcsections !0 1582; CHECK: !pcsections !2 1583 1584define void @atomic64_cas_monotonic(ptr %a) nounwind uwtable { 1585entry: 1586 cmpxchg ptr %a, i64 0, i64 1 monotonic monotonic 1587 cmpxchg ptr %a, i64 0, i64 1 monotonic acquire 1588 cmpxchg ptr %a, i64 0, i64 1 monotonic seq_cst 1589 ret void 1590} 1591; CHECK-LABEL: atomic64_cas_monotonic{{.*}}!pcsections !0 1592; CHECK: cmpxchg ptr %a, i64 0, i64 1 monotonic monotonic, align 8, !pcsections !2 1593; CHECK: cmpxchg ptr %a, i64 0, i64 1 monotonic acquire, align 8, !pcsections !2 1594; CHECK: cmpxchg ptr %a, i64 0, i64 1 monotonic seq_cst, align 8, !pcsections !2 1595 1596define void @atomic64_cas_acquire(ptr %a) nounwind uwtable { 1597entry: 1598 cmpxchg ptr %a, i64 0, i64 1 acquire monotonic 1599 cmpxchg ptr %a, i64 0, i64 1 acquire acquire 1600 cmpxchg ptr %a, i64 0, i64 1 acquire seq_cst 1601 ret void 1602} 1603; CHECK-LABEL: atomic64_cas_acquire{{.*}}!pcsections !0 1604; CHECK: cmpxchg ptr %a, i64 0, i64 1 acquire monotonic, align 8, !pcsections !2 1605; CHECK: cmpxchg ptr %a, i64 0, i64 1 acquire acquire, align 8, !pcsections !2 1606; CHECK: cmpxchg ptr %a, i64 0, i64 1 acquire seq_cst, align 8, !pcsections !2 1607 1608define void @atomic64_cas_release(ptr %a) nounwind uwtable { 1609entry: 1610 cmpxchg ptr %a, i64 0, i64 1 release monotonic 1611 cmpxchg ptr %a, i64 0, i64 1 release acquire 1612 cmpxchg ptr %a, i64 0, i64 1 release seq_cst 1613 ret void 1614} 1615; CHECK-LABEL: atomic64_cas_release{{.*}}!pcsections !0 1616; CHECK: cmpxchg ptr %a, i64 0, i64 1 release monotonic, align 8, !pcsections !2 1617; CHECK: cmpxchg ptr %a, i64 0, i64 1 release acquire, align 8, !pcsections !2 1618; CHECK: cmpxchg ptr %a, i64 0, i64 1 release seq_cst, align 8, !pcsections !2 1619 1620define void @atomic64_cas_acq_rel(ptr %a) nounwind uwtable { 1621entry: 1622 cmpxchg ptr %a, i64 0, i64 1 acq_rel monotonic 1623 cmpxchg ptr %a, i64 0, i64 1 acq_rel acquire 1624 cmpxchg ptr %a, i64 0, i64 1 acq_rel seq_cst 1625 ret void 1626} 1627; CHECK-LABEL: atomic64_cas_acq_rel{{.*}}!pcsections !0 1628; CHECK: cmpxchg ptr %a, i64 0, i64 1 acq_rel monotonic, align 8, !pcsections !2 1629; CHECK: cmpxchg ptr %a, i64 0, i64 1 acq_rel acquire, align 8, !pcsections !2 1630; CHECK: cmpxchg ptr %a, i64 0, i64 1 acq_rel seq_cst, align 8, !pcsections !2 1631 1632define void @atomic64_cas_seq_cst(ptr %a) nounwind uwtable { 1633entry: 1634 cmpxchg ptr %a, i64 0, i64 1 seq_cst monotonic 1635 cmpxchg ptr %a, i64 0, i64 1 seq_cst acquire 1636 cmpxchg ptr %a, i64 0, i64 1 seq_cst seq_cst 1637 ret void 1638} 1639; CHECK-LABEL: atomic64_cas_seq_cst{{.*}}!pcsections !0 1640; CHECK: cmpxchg ptr %a, i64 0, i64 1 seq_cst monotonic, align 8, !pcsections !2 1641; CHECK: cmpxchg ptr %a, i64 0, i64 1 seq_cst acquire, align 8, !pcsections !2 1642; CHECK: cmpxchg ptr %a, i64 0, i64 1 seq_cst seq_cst, align 8, !pcsections !2 1643 1644define void @atomic64_cas_seq_cst_ptr_ty(ptr %a, ptr %v1, ptr %v2) nounwind uwtable { 1645entry: 1646 cmpxchg ptr %a, ptr %v1, ptr %v2 seq_cst seq_cst 1647 ret void 1648} 1649; CHECK-LABEL: atomic64_cas_seq_cst{{.*}}!pcsections !0 1650; CHECK: !pcsections !2 1651 1652define i128 @atomic128_load_unordered(ptr %a) nounwind uwtable { 1653entry: 1654 %0 = load atomic i128, ptr %a unordered, align 16 1655 ret i128 %0 1656} 1657; CHECK-LABEL: atomic128_load_unordered{{.*}}!pcsections !0 1658; CHECK: !pcsections !2 1659 1660define i128 @atomic128_load_monotonic(ptr %a) nounwind uwtable { 1661entry: 1662 %0 = load atomic i128, ptr %a monotonic, align 16 1663 ret i128 %0 1664} 1665; CHECK-LABEL: atomic128_load_monotonic{{.*}}!pcsections !0 1666; CHECK: !pcsections !2 1667 1668define i128 @atomic128_load_acquire(ptr %a) nounwind uwtable { 1669entry: 1670 %0 = load atomic i128, ptr %a acquire, align 16 1671 ret i128 %0 1672} 1673; CHECK-LABEL: atomic128_load_acquire{{.*}}!pcsections !0 1674; CHECK: !pcsections !2 1675 1676define i128 @atomic128_load_seq_cst(ptr %a) nounwind uwtable { 1677entry: 1678 %0 = load atomic i128, ptr %a seq_cst, align 16 1679 ret i128 %0 1680} 1681; CHECK-LABEL: atomic128_load_seq_cst{{.*}}!pcsections !0 1682; CHECK: !pcsections !2 1683 1684define void @atomic128_store_unordered(ptr %a) nounwind uwtable { 1685entry: 1686 store atomic i128 0, ptr %a unordered, align 16 1687 ret void 1688} 1689; CHECK-LABEL: atomic128_store_unordered{{.*}}!pcsections !0 1690; CHECK: !pcsections !2 1691 1692define void @atomic128_store_monotonic(ptr %a) nounwind uwtable { 1693entry: 1694 store atomic i128 0, ptr %a monotonic, align 16 1695 ret void 1696} 1697; CHECK-LABEL: atomic128_store_monotonic{{.*}}!pcsections !0 1698; CHECK: !pcsections !2 1699 1700define void @atomic128_store_release(ptr %a) nounwind uwtable { 1701entry: 1702 store atomic i128 0, ptr %a release, align 16 1703 ret void 1704} 1705; CHECK-LABEL: atomic128_store_release{{.*}}!pcsections !0 1706; CHECK: !pcsections !2 1707 1708define void @atomic128_store_seq_cst(ptr %a) nounwind uwtable { 1709entry: 1710 store atomic i128 0, ptr %a seq_cst, align 16 1711 ret void 1712} 1713; CHECK-LABEL: atomic128_store_seq_cst{{.*}}!pcsections !0 1714; CHECK: !pcsections !2 1715 1716define void @atomic128_xchg_monotonic(ptr %a) nounwind uwtable { 1717entry: 1718 atomicrmw xchg ptr %a, i128 0 monotonic 1719 ret void 1720} 1721; CHECK-LABEL: atomic128_xchg_monotonic{{.*}}!pcsections !0 1722; CHECK: !pcsections !2 1723 1724define void @atomic128_add_monotonic(ptr %a) nounwind uwtable { 1725entry: 1726 atomicrmw add ptr %a, i128 0 monotonic 1727 ret void 1728} 1729; CHECK-LABEL: atomic128_add_monotonic{{.*}}!pcsections !0 1730; CHECK: !pcsections !2 1731 1732define void @atomic128_sub_monotonic(ptr %a) nounwind uwtable { 1733entry: 1734 atomicrmw sub ptr %a, i128 0 monotonic 1735 ret void 1736} 1737; CHECK-LABEL: atomic128_sub_monotonic{{.*}}!pcsections !0 1738; CHECK: !pcsections !2 1739 1740define void @atomic128_and_monotonic(ptr %a) nounwind uwtable { 1741entry: 1742 atomicrmw and ptr %a, i128 0 monotonic 1743 ret void 1744} 1745; CHECK-LABEL: atomic128_and_monotonic{{.*}}!pcsections !0 1746; CHECK: !pcsections !2 1747 1748define void @atomic128_or_monotonic(ptr %a) nounwind uwtable { 1749entry: 1750 atomicrmw or ptr %a, i128 0 monotonic 1751 ret void 1752} 1753; CHECK-LABEL: atomic128_or_monotonic{{.*}}!pcsections !0 1754; CHECK: !pcsections !2 1755 1756define void @atomic128_xor_monotonic(ptr %a) nounwind uwtable { 1757entry: 1758 atomicrmw xor ptr %a, i128 0 monotonic 1759 ret void 1760} 1761; CHECK-LABEL: atomic128_xor_monotonic{{.*}}!pcsections !0 1762; CHECK: !pcsections !2 1763 1764define void @atomic128_nand_monotonic(ptr %a) nounwind uwtable { 1765entry: 1766 atomicrmw nand ptr %a, i128 0 monotonic 1767 ret void 1768} 1769; CHECK-LABEL: atomic128_nand_monotonic{{.*}}!pcsections !0 1770; CHECK: !pcsections !2 1771 1772define void @atomic128_xchg_acquire(ptr %a) nounwind uwtable { 1773entry: 1774 atomicrmw xchg ptr %a, i128 0 acquire 1775 ret void 1776} 1777; CHECK-LABEL: atomic128_xchg_acquire{{.*}}!pcsections !0 1778; CHECK: !pcsections !2 1779 1780define void @atomic128_add_acquire(ptr %a) nounwind uwtable { 1781entry: 1782 atomicrmw add ptr %a, i128 0 acquire 1783 ret void 1784} 1785; CHECK-LABEL: atomic128_add_acquire{{.*}}!pcsections !0 1786; CHECK: !pcsections !2 1787 1788define void @atomic128_sub_acquire(ptr %a) nounwind uwtable { 1789entry: 1790 atomicrmw sub ptr %a, i128 0 acquire 1791 ret void 1792} 1793; CHECK-LABEL: atomic128_sub_acquire{{.*}}!pcsections !0 1794; CHECK: !pcsections !2 1795 1796define void @atomic128_and_acquire(ptr %a) nounwind uwtable { 1797entry: 1798 atomicrmw and ptr %a, i128 0 acquire 1799 ret void 1800} 1801; CHECK-LABEL: atomic128_and_acquire{{.*}}!pcsections !0 1802; CHECK: !pcsections !2 1803 1804define void @atomic128_or_acquire(ptr %a) nounwind uwtable { 1805entry: 1806 atomicrmw or ptr %a, i128 0 acquire 1807 ret void 1808} 1809; CHECK-LABEL: atomic128_or_acquire{{.*}}!pcsections !0 1810; CHECK: !pcsections !2 1811 1812define void @atomic128_xor_acquire(ptr %a) nounwind uwtable { 1813entry: 1814 atomicrmw xor ptr %a, i128 0 acquire 1815 ret void 1816} 1817; CHECK-LABEL: atomic128_xor_acquire{{.*}}!pcsections !0 1818; CHECK: !pcsections !2 1819 1820define void @atomic128_nand_acquire(ptr %a) nounwind uwtable { 1821entry: 1822 atomicrmw nand ptr %a, i128 0 acquire 1823 ret void 1824} 1825; CHECK-LABEL: atomic128_nand_acquire{{.*}}!pcsections !0 1826; CHECK: !pcsections !2 1827 1828define void @atomic128_xchg_release(ptr %a) nounwind uwtable { 1829entry: 1830 atomicrmw xchg ptr %a, i128 0 release 1831 ret void 1832} 1833; CHECK-LABEL: atomic128_xchg_release{{.*}}!pcsections !0 1834; CHECK: !pcsections !2 1835 1836define void @atomic128_add_release(ptr %a) nounwind uwtable { 1837entry: 1838 atomicrmw add ptr %a, i128 0 release 1839 ret void 1840} 1841; CHECK-LABEL: atomic128_add_release{{.*}}!pcsections !0 1842; CHECK: !pcsections !2 1843 1844define void @atomic128_sub_release(ptr %a) nounwind uwtable { 1845entry: 1846 atomicrmw sub ptr %a, i128 0 release 1847 ret void 1848} 1849; CHECK-LABEL: atomic128_sub_release{{.*}}!pcsections !0 1850; CHECK: !pcsections !2 1851 1852define void @atomic128_and_release(ptr %a) nounwind uwtable { 1853entry: 1854 atomicrmw and ptr %a, i128 0 release 1855 ret void 1856} 1857; CHECK-LABEL: atomic128_and_release{{.*}}!pcsections !0 1858; CHECK: !pcsections !2 1859 1860define void @atomic128_or_release(ptr %a) nounwind uwtable { 1861entry: 1862 atomicrmw or ptr %a, i128 0 release 1863 ret void 1864} 1865; CHECK-LABEL: atomic128_or_release{{.*}}!pcsections !0 1866; CHECK: !pcsections !2 1867 1868define void @atomic128_xor_release(ptr %a) nounwind uwtable { 1869entry: 1870 atomicrmw xor ptr %a, i128 0 release 1871 ret void 1872} 1873; CHECK-LABEL: atomic128_xor_release{{.*}}!pcsections !0 1874; CHECK: !pcsections !2 1875 1876define void @atomic128_nand_release(ptr %a) nounwind uwtable { 1877entry: 1878 atomicrmw nand ptr %a, i128 0 release 1879 ret void 1880} 1881; CHECK-LABEL: atomic128_nand_release{{.*}}!pcsections !0 1882; CHECK: !pcsections !2 1883 1884define void @atomic128_xchg_acq_rel(ptr %a) nounwind uwtable { 1885entry: 1886 atomicrmw xchg ptr %a, i128 0 acq_rel 1887 ret void 1888} 1889; CHECK-LABEL: atomic128_xchg_acq_rel{{.*}}!pcsections !0 1890; CHECK: !pcsections !2 1891 1892define void @atomic128_add_acq_rel(ptr %a) nounwind uwtable { 1893entry: 1894 atomicrmw add ptr %a, i128 0 acq_rel 1895 ret void 1896} 1897; CHECK-LABEL: atomic128_add_acq_rel{{.*}}!pcsections !0 1898; CHECK: !pcsections !2 1899 1900define void @atomic128_sub_acq_rel(ptr %a) nounwind uwtable { 1901entry: 1902 atomicrmw sub ptr %a, i128 0 acq_rel 1903 ret void 1904} 1905; CHECK-LABEL: atomic128_sub_acq_rel{{.*}}!pcsections !0 1906; CHECK: !pcsections !2 1907 1908define void @atomic128_and_acq_rel(ptr %a) nounwind uwtable { 1909entry: 1910 atomicrmw and ptr %a, i128 0 acq_rel 1911 ret void 1912} 1913; CHECK-LABEL: atomic128_and_acq_rel{{.*}}!pcsections !0 1914; CHECK: !pcsections !2 1915 1916define void @atomic128_or_acq_rel(ptr %a) nounwind uwtable { 1917entry: 1918 atomicrmw or ptr %a, i128 0 acq_rel 1919 ret void 1920} 1921; CHECK-LABEL: atomic128_or_acq_rel{{.*}}!pcsections !0 1922; CHECK: !pcsections !2 1923 1924define void @atomic128_xor_acq_rel(ptr %a) nounwind uwtable { 1925entry: 1926 atomicrmw xor ptr %a, i128 0 acq_rel 1927 ret void 1928} 1929; CHECK-LABEL: atomic128_xor_acq_rel{{.*}}!pcsections !0 1930; CHECK: !pcsections !2 1931 1932define void @atomic128_nand_acq_rel(ptr %a) nounwind uwtable { 1933entry: 1934 atomicrmw nand ptr %a, i128 0 acq_rel 1935 ret void 1936} 1937; CHECK-LABEL: atomic128_nand_acq_rel{{.*}}!pcsections !0 1938; CHECK: !pcsections !2 1939 1940define void @atomic128_xchg_seq_cst(ptr %a) nounwind uwtable { 1941entry: 1942 atomicrmw xchg ptr %a, i128 0 seq_cst 1943 ret void 1944} 1945; CHECK-LABEL: atomic128_xchg_seq_cst{{.*}}!pcsections !0 1946; CHECK: !pcsections !2 1947 1948define void @atomic128_add_seq_cst(ptr %a) nounwind uwtable { 1949entry: 1950 atomicrmw add ptr %a, i128 0 seq_cst 1951 ret void 1952} 1953; CHECK-LABEL: atomic128_add_seq_cst{{.*}}!pcsections !0 1954; CHECK: !pcsections !2 1955 1956define void @atomic128_sub_seq_cst(ptr %a) nounwind uwtable { 1957entry: 1958 atomicrmw sub ptr %a, i128 0 seq_cst 1959 ret void 1960} 1961; CHECK-LABEL: atomic128_sub_seq_cst{{.*}}!pcsections !0 1962; CHECK: !pcsections !2 1963 1964define void @atomic128_and_seq_cst(ptr %a) nounwind uwtable { 1965entry: 1966 atomicrmw and ptr %a, i128 0 seq_cst 1967 ret void 1968} 1969; CHECK-LABEL: atomic128_and_seq_cst{{.*}}!pcsections !0 1970; CHECK: !pcsections !2 1971 1972define void @atomic128_or_seq_cst(ptr %a) nounwind uwtable { 1973entry: 1974 atomicrmw or ptr %a, i128 0 seq_cst 1975 ret void 1976} 1977; CHECK-LABEL: atomic128_or_seq_cst{{.*}}!pcsections !0 1978; CHECK: !pcsections !2 1979 1980define void @atomic128_xor_seq_cst(ptr %a) nounwind uwtable { 1981entry: 1982 atomicrmw xor ptr %a, i128 0 seq_cst 1983 ret void 1984} 1985; CHECK-LABEL: atomic128_xor_seq_cst{{.*}}!pcsections !0 1986; CHECK: !pcsections !2 1987 1988define void @atomic128_nand_seq_cst(ptr %a) nounwind uwtable { 1989entry: 1990 atomicrmw nand ptr %a, i128 0 seq_cst 1991 ret void 1992} 1993; CHECK-LABEL: atomic128_nand_seq_cst{{.*}}!pcsections !0 1994; CHECK: !pcsections !2 1995 1996define void @atomic128_cas_monotonic(ptr %a) nounwind uwtable { 1997entry: 1998 cmpxchg ptr %a, i128 0, i128 1 monotonic monotonic 1999 ret void 2000} 2001; CHECK-LABEL: atomic128_cas_monotonic{{.*}}!pcsections !0 2002; CHECK: !pcsections !2 2003 2004define void @atomic128_cas_acquire(ptr %a) nounwind uwtable { 2005entry: 2006 cmpxchg ptr %a, i128 0, i128 1 acquire acquire 2007 ret void 2008} 2009; CHECK-LABEL: atomic128_cas_acquire{{.*}}!pcsections !0 2010; CHECK: !pcsections !2 2011 2012define void @atomic128_cas_release(ptr %a) nounwind uwtable { 2013entry: 2014 cmpxchg ptr %a, i128 0, i128 1 release monotonic 2015 ret void 2016} 2017; CHECK-LABEL: atomic128_cas_release{{.*}}!pcsections !0 2018; CHECK: !pcsections !2 2019 2020define void @atomic128_cas_acq_rel(ptr %a) nounwind uwtable { 2021entry: 2022 cmpxchg ptr %a, i128 0, i128 1 acq_rel acquire 2023 ret void 2024} 2025; CHECK-LABEL: atomic128_cas_acq_rel{{.*}}!pcsections !0 2026; CHECK: !pcsections !2 2027 2028define void @atomic128_cas_seq_cst(ptr %a) nounwind uwtable { 2029entry: 2030 cmpxchg ptr %a, i128 0, i128 1 seq_cst seq_cst 2031 ret void 2032} 2033; CHECK-LABEL: atomic128_cas_seq_cst{{.*}}!pcsections !0 2034; CHECK: !pcsections !2 2035 2036; Check that callbacks are emitted. 2037 2038; CHECK-LABEL: __sanitizer_metadata_atomics2.module_ctor 2039; CHECK-DAG: entry: 2040; CHECK-NEXT: [[CMP:%.*]] = icmp ne ptr @__sanitizer_metadata_atomics_add, null 2041; CHECK-NEXT: br i1 [[CMP]], label %callfunc, label %ret 2042; CHECK-DAG: callfunc: 2043; CHECK-NEXT: call void @__sanitizer_metadata_atomics_add(i32 2, ptr @__start_sanmd_atomics2, ptr @__stop_sanmd_atomics2) 2044; CHECK-NEXT: br label %ret 2045; CHECK-DAG: ret: 2046; CHECK-NEXT: ret void 2047 2048; CHECK-LABEL: __sanitizer_metadata_atomics2.module_dtor 2049; CHECK-DAG: entry: 2050; CHECK-NEXT: [[CMP:%.*]] = icmp ne ptr @__sanitizer_metadata_atomics_del, null 2051; CHECK-NEXT: br i1 [[CMP]], label %callfunc, label %ret 2052; CHECK-DAG: callfunc: 2053; CHECK-NEXT: call void @__sanitizer_metadata_atomics_del(i32 2, ptr @__start_sanmd_atomics2, ptr @__stop_sanmd_atomics2) 2054; CHECK-NEXT: br label %ret 2055; CHECK-DAG: ret: 2056; CHECK-NEXT: ret void 2057 2058; CHECK-LABEL: __sanitizer_metadata_covered2.module_ctor 2059; CHECK-DAG: entry: 2060; CHECK-NEXT: [[CMP:%.*]] = icmp ne ptr @__sanitizer_metadata_covered_add, null 2061; CHECK-NEXT: br i1 [[CMP]], label %callfunc, label %ret 2062; CHECK-DAG: callfunc: 2063; CHECK-NEXT: call void @__sanitizer_metadata_covered_add(i32 2, ptr @__start_sanmd_covered2, ptr @__stop_sanmd_covered2) 2064; CHECK-NEXT: br label %ret 2065; CHECK-DAG: ret: 2066; CHECK-NEXT: ret void 2067 2068; CHECK-LABEL: __sanitizer_metadata_covered2.module_dtor 2069; CHECK-DAG: entry: 2070; CHECK-NEXT: [[CMP:%.*]] = icmp ne ptr @__sanitizer_metadata_covered_del, null 2071; CHECK-NEXT: br i1 [[CMP]], label %callfunc, label %ret 2072; CHECK-DAG: callfunc: 2073; CHECK-NEXT: call void @__sanitizer_metadata_covered_del(i32 2, ptr @__start_sanmd_covered2, ptr @__stop_sanmd_covered2) 2074; CHECK-NEXT: br label %ret 2075; CHECK-DAG: ret: 2076; CHECK-NEXT: ret void 2077 2078; CHECK: !0 = !{!"sanmd_covered2!C", !1} 2079; CHECK: !1 = !{i64 1} 2080; CHECK: !2 = !{!"sanmd_atomics2!C"} 2081