1 ; RUN: opt < %s -passes='module(sanmd-module)' -sanitizer-metadata-atomics -S | FileCheck %s
3 ; CHECK: $__sanitizer_metadata_atomics2.module_ctor = comdat any
4 ; CHECK: $__sanitizer_metadata_atomics2.module_dtor = comdat any
5 ; CHECK: $__sanitizer_metadata_covered2.module_ctor = comdat any
6 ; CHECK: $__sanitizer_metadata_covered2.module_dtor = comdat any
8 ; CHECK: @llvm.used = appending global [4 x ptr] [ptr @__sanitizer_metadata_atomics2.module_ctor, ptr @__sanitizer_metadata_atomics2.module_dtor, ptr @__sanitizer_metadata_covered2.module_ctor, ptr @__sanitizer_metadata_covered2.module_dtor], section "llvm.metadata"
9 ; CHECK: @llvm.global_ctors = appending global [2 x { i32, ptr, ptr }] [{ i32, ptr, ptr } { i32 2, ptr @__sanitizer_metadata_atomics2.module_ctor, ptr @__sanitizer_metadata_atomics2.module_ctor }, { i32, ptr, ptr } { i32 2, ptr @__sanitizer_metadata_covered2.module_ctor, ptr @__sanitizer_metadata_covered2.module_ctor }]
10 ; CHECK: @llvm.global_dtors = appending global [2 x { i32, ptr, ptr }] [{ i32, ptr, ptr } { i32 2, ptr @__sanitizer_metadata_atomics2.module_dtor, ptr @__sanitizer_metadata_atomics2.module_dtor }, { i32, ptr, ptr } { i32 2, ptr @__sanitizer_metadata_covered2.module_dtor, ptr @__sanitizer_metadata_covered2.module_dtor }]
12 ; CHECK: define hidden void @__sanitizer_metadata_covered2.module_ctor() #1 comdat {
13 ; CHECK: define hidden void @__sanitizer_metadata_covered2.module_dtor() #1 comdat {
15 target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
16 target triple = "x86_64-unknown-linux-gnu"
18 define i8 @foo(ptr %a) nounwind uwtable {
20 %0 = load atomic i8, ptr %a unordered, align 1