1 ; RUN: opt < %s -tsan -S | FileCheck %s
3 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"
5 define void @IncrementMe(i32* nocapture %ptr) nounwind uwtable sanitize_thread {
7 %0 = load i32, i32* %ptr, align 4
8 %inc = add nsw i32 %0, 1
9 store i32 %inc, i32* %ptr, align 4
12 ; CHECK: define void @IncrementMe
13 ; CHECK-NOT: __tsan_read
17 define void @IncrementMeWithCallInBetween(i32* nocapture %ptr) nounwind uwtable sanitize_thread {
19 %0 = load i32, i32* %ptr, align 4
20 %inc = add nsw i32 %0, 1
22 store i32 %inc, i32* %ptr, align 4
26 ; CHECK: define void @IncrementMeWithCallInBetween