Eric Christopher | 3883e66 | 2011-07-26 22:17:02 +0000 | [diff] [blame] | 1 | // RUN: %clang_cc1 %s -emit-llvm -o - | FileCheck %s |
| 2 | // XFAIL: sparc |
| 3 | // rdar://7536390 |
| 4 | |
Eli Friedman | c83b975 | 2011-09-07 01:41:24 +0000 | [diff] [blame] | 5 | typedef unsigned __INT32_TYPE__ uint32_t; |
| 6 | |
| 7 | unsigned t(uint32_t *ptr, uint32_t val) { |
Eric Christopher | 3883e66 | 2011-07-26 22:17:02 +0000 | [diff] [blame] | 8 | // CHECK: @t |
Eli Friedman | c83b975 | 2011-09-07 01:41:24 +0000 | [diff] [blame] | 9 | // CHECK: atomicrmw xchg i32* {{.*}} seq_cst |
Eric Christopher | 3883e66 | 2011-07-26 22:17:02 +0000 | [diff] [blame] | 10 | return __sync_lock_test_and_set(ptr, val); |
| 11 | } |