1*f4a2713aSLionel Sambuc // RUN: %clang_cc1 %s -emit-llvm -o - | FileCheck %s 2*f4a2713aSLionel Sambuc // rdar://7536390 3*f4a2713aSLionel Sambuc 4*f4a2713aSLionel Sambuc typedef unsigned __INT32_TYPE__ uint32_t; 5*f4a2713aSLionel Sambuc t(uint32_t * ptr,uint32_t val)6*f4a2713aSLionel Sambucunsigned t(uint32_t *ptr, uint32_t val) { 7*f4a2713aSLionel Sambuc // CHECK: @t 8*f4a2713aSLionel Sambuc // CHECK: atomicrmw xchg i32* {{.*}} seq_cst 9*f4a2713aSLionel Sambuc return __sync_lock_test_and_set(ptr, val); 10*f4a2713aSLionel Sambuc } 11