blob: bef3f2712935a69a268e6e6cb2078d8a432e64c1 [file] [log] [blame]
Tim Northover8f2a85e2014-06-13 14:24:07 +00001; RUN: llvm-as %s -o - | llvm-dis | FileCheck %s
Duncan P. N. Exon Smith13f5c582014-08-19 21:08:27 +00002; RUN: verify-uselistorder < %s
Tim Northover8f2a85e2014-06-13 14:24:07 +00003
4define void @test_cmpxchg(i32* %addr, i32 %desired, i32 %new) {
5 cmpxchg i32* %addr, i32 %desired, i32 %new seq_cst seq_cst
6 ; CHECK: cmpxchg i32* %addr, i32 %desired, i32 %new seq_cst seq_cst
7
8 cmpxchg volatile i32* %addr, i32 %desired, i32 %new seq_cst monotonic
9 ; CHECK: cmpxchg volatile i32* %addr, i32 %desired, i32 %new seq_cst monotonic
10
11 cmpxchg weak i32* %addr, i32 %desired, i32 %new acq_rel acquire
12 ; CHECK: cmpxchg weak i32* %addr, i32 %desired, i32 %new acq_rel acquire
13
Konstantin Zhuravlyov8f856852017-07-11 22:23:00 +000014 cmpxchg weak volatile i32* %addr, i32 %desired, i32 %new syncscope("singlethread") release monotonic
15 ; CHECK: cmpxchg weak volatile i32* %addr, i32 %desired, i32 %new syncscope("singlethread") release monotonic
Tim Northover8f2a85e2014-06-13 14:24:07 +000016
17 ret void
Duncan P. N. Exon Smith15f92a32014-07-29 01:10:57 +000018}