You've already forked linux-packaging-mono
Imported Upstream version 5.18.0.246
Former-commit-id: 0c7ce5b1a7851e13f22acfd379b7f9fb304e4833
This commit is contained in:
parent
a7724cd563
commit
279aa8f685
32
external/llvm/test/Instrumentation/ThreadSanitizer/read_before_write.ll
vendored
Normal file
32
external/llvm/test/Instrumentation/ThreadSanitizer/read_before_write.ll
vendored
Normal file
@ -0,0 +1,32 @@
|
||||
; RUN: opt < %s -tsan -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 @IncrementMe(i32* nocapture %ptr) nounwind uwtable sanitize_thread {
|
||||
entry:
|
||||
%0 = load i32, i32* %ptr, align 4
|
||||
%inc = add nsw i32 %0, 1
|
||||
store i32 %inc, i32* %ptr, align 4
|
||||
ret void
|
||||
}
|
||||
; CHECK: define void @IncrementMe
|
||||
; CHECK-NOT: __tsan_read
|
||||
; CHECK: __tsan_write
|
||||
; CHECK: ret void
|
||||
|
||||
define void @IncrementMeWithCallInBetween(i32* nocapture %ptr) nounwind uwtable sanitize_thread {
|
||||
entry:
|
||||
%0 = load i32, i32* %ptr, align 4
|
||||
%inc = add nsw i32 %0, 1
|
||||
call void @foo()
|
||||
store i32 %inc, i32* %ptr, align 4
|
||||
ret void
|
||||
}
|
||||
|
||||
; CHECK: define void @IncrementMeWithCallInBetween
|
||||
; CHECK: __tsan_read
|
||||
; CHECK: __tsan_write
|
||||
; CHECK: ret void
|
||||
|
||||
declare void @foo()
|
||||
|
Reference in New Issue
Block a user