1 ; RUN: opt < %s -basicaa -gvn -instcombine -S | grep {ret i32 0}
3 @flag0 = internal global i32 zeroinitializer
4 @turn = internal global i32 zeroinitializer
9 %b = tail call i32 @llvm.atomic.swap.i32.p0i32(i32* @turn, i32 1)
15 declare i32 @llvm.atomic.swap.i32.p0i32(i32*, i32) nounwind