1 ; Check that sanitizers invalidate GlobalsAA
3 ; Msan and Dfsan use globals for origin tracking and TLS for parameters.
4 ; RUN: opt < %s -S -passes='require<globals-aa>,module(msan)' -debug-pass-manager 2>&1 | FileCheck %s
5 ; RUN: opt < %s -S -passes='require<globals-aa>,module(dfsan)' -debug-pass-manager 2>&1 | FileCheck %s
7 ; Some types of coverage use globals.
8 ; RUN: opt < %s -S -passes='require<globals-aa>,module(sancov-module)' -sanitizer-coverage-level=2 -debug-pass-manager 2>&1 | FileCheck %s
11 ; RUN: opt < %s -S -passes='require<globals-aa>,module(hwasan)' -debug-pass-manager 2>&1 | FileCheck %s
14 ; RUN: opt < %s -S -passes='require<globals-aa>,module(asan)' -debug-pass-manager 2>&1 | FileCheck %s
16 ; CHECK: Running analysis: GlobalsAA on [module]
17 ; CHECK: Running pass: {{.*}}Sanitizer{{.*}}Pass on [module]
18 ; CHECK: Invalidating analysis: GlobalsAA on [module]
20 target triple = "x86_64-unknown-linux"
22 define i32 @test(ptr readonly %a) local_unnamed_addr sanitize_address sanitize_hwaddress {
24 %0 = load i32, ptr %a, align 4