diff options
author | Stephen Hines <srhines@google.com> | 2014-05-29 02:49:00 -0700 |
---|---|---|
committer | Stephen Hines <srhines@google.com> | 2014-05-29 02:49:00 -0700 |
commit | dce4a407a24b04eebc6a376f8e62b41aaa7b071f (patch) | |
tree | dcebc53f2b182f145a2e659393bf9a0472cedf23 /test/Instrumentation/MemorySanitizer/instrumentation-with-call-threshold.ll | |
parent | 220b921aed042f9e520c26cffd8282a94c66c3d5 (diff) | |
download | external_llvm-dce4a407a24b04eebc6a376f8e62b41aaa7b071f.zip external_llvm-dce4a407a24b04eebc6a376f8e62b41aaa7b071f.tar.gz external_llvm-dce4a407a24b04eebc6a376f8e62b41aaa7b071f.tar.bz2 |
Update LLVM for 3.5 rebase (r209712).
Change-Id: I149556c940fb7dc92d075273c87ff584f400941f
Diffstat (limited to 'test/Instrumentation/MemorySanitizer/instrumentation-with-call-threshold.ll')
-rw-r--r-- | test/Instrumentation/MemorySanitizer/instrumentation-with-call-threshold.ll | 47 |
1 files changed, 47 insertions, 0 deletions
diff --git a/test/Instrumentation/MemorySanitizer/instrumentation-with-call-threshold.ll b/test/Instrumentation/MemorySanitizer/instrumentation-with-call-threshold.ll new file mode 100644 index 0000000..34988ef --- /dev/null +++ b/test/Instrumentation/MemorySanitizer/instrumentation-with-call-threshold.ll @@ -0,0 +1,47 @@ +; Test -msan-instrumentation-with-call-threshold + +; RUN: opt < %s -msan -msan-check-access-address=0 -msan-instrumentation-with-call-threshold=0 -S | FileCheck %s +; 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 + +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" +target triple = "x86_64-unknown-linux-gnu" + +define void @LoadAndCmp(i32* nocapture %a) nounwind uwtable sanitize_memory { +entry: + %0 = load i32* %a, align 4 + %tobool = icmp eq i32 %0, 0 + br i1 %tobool, label %if.end, label %if.then + +if.then: ; preds = %entry + tail call void (...)* @foo() nounwind + br label %if.end + +if.end: ; preds = %entry, %if.then + ret void +} + +declare void @foo(...) + +; CHECK-LABEL: @LoadAndCmp +; CHECK: = load +; CHECK: = load +; CHECK: = zext i1 {{.*}} to i8 +; CHECK: call void @__msan_maybe_warning_1( +; CHECK-NOT: unreachable +; CHECK: ret void + + +define void @Store(i64* nocapture %p, i64 %x) nounwind uwtable sanitize_memory { +entry: + store i64 %x, i64* %p, align 4 + ret void +} + +; CHECK-LABEL: @Store +; CHECK: load {{.*}} @__msan_param_tls +; CHECK-ORIGINS: load {{.*}} @__msan_param_origin_tls +; CHECK: store +; CHECK-ORIGINS: bitcast i64* {{.*}} to i8* +; CHECK-ORIGINS: call void @__msan_maybe_store_origin_8( +; CHECK: store i64 +; CHECK: ret void |