mirror of
https://github.com/RPCS3/llvm.git
synced 2025-01-12 15:30:56 +00:00
6fa33f5dd9
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 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@187923 91177308-0d34-0410-b5e6-96231b3b80d8
76 lines
1.6 KiB
LLVM
76 lines
1.6 KiB
LLVM
; 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"
|
|
|
|
define void @store8(i8 %v, i8* %p) {
|
|
; CHECK: @store8
|
|
; CHECK: load{{.*}}__dfsan_arg_tls
|
|
; CHECK: ptrtoint
|
|
; CHECK: and
|
|
; CHECK: mul
|
|
; CHECK: inttoptr
|
|
; CHECK: getelementptr
|
|
; CHECK: store
|
|
; CHECK: store
|
|
store i8 %v, i8* %p
|
|
ret void
|
|
}
|
|
|
|
define void @store16(i16 %v, i16* %p) {
|
|
; CHECK: @store16
|
|
; CHECK: load{{.*}}__dfsan_arg_tls
|
|
; CHECK: ptrtoint
|
|
; CHECK: and
|
|
; CHECK: mul
|
|
; CHECK: inttoptr
|
|
; CHECK: getelementptr
|
|
; CHECK: store
|
|
; CHECK: getelementptr
|
|
; CHECK: store
|
|
; CHECK: store
|
|
store i16 %v, i16* %p
|
|
ret void
|
|
}
|
|
|
|
define void @store32(i32 %v, i32* %p) {
|
|
; CHECK: @store32
|
|
; CHECK: load{{.*}}__dfsan_arg_tls
|
|
; CHECK: ptrtoint
|
|
; CHECK: and
|
|
; CHECK: mul
|
|
; CHECK: inttoptr
|
|
; CHECK: getelementptr
|
|
; CHECK: store
|
|
; CHECK: getelementptr
|
|
; CHECK: store
|
|
; CHECK: getelementptr
|
|
; CHECK: store
|
|
; CHECK: getelementptr
|
|
; CHECK: store
|
|
; CHECK: store
|
|
store i32 %v, i32* %p
|
|
ret void
|
|
}
|
|
|
|
define void @store64(i64 %v, i64* %p) {
|
|
; CHECK: @store64
|
|
; CHECK: load{{.*}}__dfsan_arg_tls
|
|
; CHECK: ptrtoint
|
|
; CHECK: and
|
|
; CHECK: mul
|
|
; CHECK: inttoptr
|
|
; CHECK: insertelement
|
|
; CHECK: insertelement
|
|
; CHECK: insertelement
|
|
; CHECK: insertelement
|
|
; CHECK: insertelement
|
|
; CHECK: insertelement
|
|
; CHECK: insertelement
|
|
; CHECK: insertelement
|
|
; CHECK: bitcast
|
|
; CHECK: getelementptr
|
|
; CHECK: store
|
|
; CHECK: store
|
|
store i64 %v, i64* %p
|
|
ret void
|
|
}
|