summaryrefslogtreecommitdiffstats
path: root/llvm/test/Bindings/llvm-c/atomics.ll
blob: 4fe62b07d48885cb0045482b819a3920ea1fe53a (plain)
1
2
3
4
5
6
7
8
9
10
; RUN: llvm-as < %s | llvm-dis > %t.orig
; RUN: llvm-as < %s | llvm-c-test --echo > %t.echo
; RUN: diff -w %t.orig %t.echo

define i32 @main() {
  %1 = alloca i32
  %2 = cmpxchg i32* %1, i32 2, i32 3 seq_cst acquire
  %3 = extractvalue { i32, i1 } %2, 0
  ret i32 %3
}
OpenPOWER on IntegriCloud