summaryrefslogtreecommitdiffstats
path: root/llvm/test/Instrumentation/DataFlowSanitizer/call.ll
diff options
context:
space:
mode:
authorPeter Collingbourne <peter@pcc.me.uk>2013-08-07 22:47:18 +0000
committerPeter Collingbourne <peter@pcc.me.uk>2013-08-07 22:47:18 +0000
commite5d5b0c71e8a27bc5582a6f296e65b78d40b14a5 (patch)
tree3530a2adeb1f2a43b07deaaf3d87302b51b538b0 /llvm/test/Instrumentation/DataFlowSanitizer/call.ll
parent714e057406ed7af3f0e877bc8225942ea23ff63b (diff)
downloadbcm5719-llvm-e5d5b0c71e8a27bc5582a6f296e65b78d40b14a5.tar.gz
bcm5719-llvm-e5d5b0c71e8a27bc5582a6f296e65b78d40b14a5.zip
DataFlowSanitizer; LLVM changes.
DataFlowSanitizer is a generalised dynamic data flow analysis. Unlike other Sanitizer tools, this tool is not designed to detect a specific class of bugs on its own. Instead, it provides a generic dynamic data flow analysis framework to be used by clients to help detect application-specific issues within their own code. Differential Revision: http://llvm-reviews.chandlerc.com/D965 llvm-svn: 187923
Diffstat (limited to 'llvm/test/Instrumentation/DataFlowSanitizer/call.ll')
-rw-r--r--llvm/test/Instrumentation/DataFlowSanitizer/call.ll23
1 files changed, 23 insertions, 0 deletions
diff --git a/llvm/test/Instrumentation/DataFlowSanitizer/call.ll b/llvm/test/Instrumentation/DataFlowSanitizer/call.ll
new file mode 100644
index 00000000000..c374246d4c6
--- /dev/null
+++ b/llvm/test/Instrumentation/DataFlowSanitizer/call.ll
@@ -0,0 +1,23 @@
+; RUN: opt < %s -dfsan -S | FileCheck %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"
+
+; CHECK: @__dfsan_arg_tls = external thread_local(initialexec) global [64 x i16]
+; CHECK: @__dfsan_retval_tls = external thread_local(initialexec) global i16
+
+declare i32 @f(i32)
+declare float @llvm.sqrt.f32(float)
+
+; CHECK: @call
+define i32 @call() {
+ ; CHECK: store{{.*}}__dfsan_arg_tls
+ ; CHECK: call{{.*}}@f
+ ; CHECK: load{{.*}}__dfsan_retval_tls
+ %r = call i32 @f(i32 0)
+
+ ; CHECK-NOT: store{{.*}}__dfsan_arg_tls
+ %i = call float @llvm.sqrt.f32(float -1.0)
+
+ ; CHECK: store{{.*}}__dfsan_retval_tls
+ ; CHECK: ret i32
+ ret i32 %r
+}
OpenPOWER on IntegriCloud