Add support getting the operands of a User to ocaml.
[oota-llvm.git] / test / FrontendC / 2008-03-05-syncPtr.c
1 // RUN: %llvmgcc %s -S -emit-llvm -o - | grep llvm.atomic
2 // XFAIL: sparc-sun-solaris2|arm
3 // Feature currently implemented only for x86, alpha, powerpc.
4
5 int* foo(int** a, int* b, int* c) {
6 return __sync_val_compare_and_swap (a, b, c);
7 }
8
9 int foo2(int** a, int* b, int* c) {
10 return __sync_bool_compare_and_swap (a, b, c);
11 }
12
13 int* foo3(int** a, int b) {
14   return __sync_fetch_and_add (a, b);
15 }
16
17 int* foo4(int** a, int b) {
18   return __sync_fetch_and_sub (a, b);
19 }
20
21 int* foo5(int** a, int* b) {
22   return __sync_lock_test_and_set (a, b);
23 }
24
25 int* foo6(int** a, int*** b) {
26   return __sync_lock_test_and_set (a, b);
27 }