1 ; Test -msan-instrumentation-with-call-threshold
3 ; RUN: opt < %s -msan -msan-check-access-address=0 -msan-instrumentation-with-call-threshold=0 -S | FileCheck %s
4 ; RUN: opt < %s -msan -msan-check-access-address=0 -msan-instrumentation-with-call-threshold=0 -msan-track-origins=1 -S | FileCheck -check-prefix=CHECK -check-prefix=CHECK-ORIGINS %s
6 target 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"
7 target triple = "x86_64-unknown-linux-gnu"
9 define void @LoadAndCmp(i32* nocapture %a) nounwind uwtable sanitize_memory {
11 %0 = load i32* %a, align 4
12 %tobool = icmp eq i32 %0, 0
13 br i1 %tobool, label %if.end, label %if.then
15 if.then: ; preds = %entry
16 tail call void (...)* @foo() nounwind
19 if.end: ; preds = %entry, %if.then
23 declare void @foo(...)
25 ; CHECK-LABEL: @LoadAndCmp
28 ; CHECK: = zext i1 {{.*}} to i8
29 ; CHECK: call void @__msan_maybe_warning_1(
30 ; CHECK-NOT: unreachable
34 define void @Store(i64* nocapture %p, i64 %x) nounwind uwtable sanitize_memory {
36 store i64 %x, i64* %p, align 4
41 ; CHECK: load {{.*}} @__msan_param_tls
42 ; CHECK-ORIGINS: load {{.*}} @__msan_param_origin_tls
44 ; CHECK-ORIGINS: bitcast i64* {{.*}} to i8*
45 ; CHECK-ORIGINS: call void @__msan_maybe_store_origin_8(