blob: c09e74c1c2f24e047d38fcc3d16f404d2f6c4f13 [file] [log] [blame]
Tim Northover420a2162014-06-13 14:24:07 +00001; RUN: llvm-as %s -o - | llvm-dis | FileCheck %s
Duncan P. N. Exon Smithc8eccd12014-08-19 21:08:27 +00002; RUN: verify-uselistorder < %s
Tim Northover420a2162014-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
14 cmpxchg weak volatile i32* %addr, i32 %desired, i32 %new singlethread release monotonic
15 ; CHECK: cmpxchg weak volatile i32* %addr, i32 %desired, i32 %new singlethread release monotonic
16
17 ret void
Duncan P. N. Exon Smithfee1f502014-07-29 01:10:57 +000018}