1 // RUN: %clang_cc1 -Wall -Werror -triple thumbv8-linux-gnueabi -fno-signed-char -emit-llvm -o - %s | FileCheck %s
2 // RUN: %clang_cc1 -Wall -Werror -triple arm64-apple-ios7.0 -emit-llvm -o - %s | FileCheck %s --check-prefix=CHECK-ARM64
6 // CHECK-LABEL: @_Z10test_ldrexv()
7 // CHECK: call i32 @llvm.arm.ldrex.p0(ptr elementtype(i8) @b)
9 // CHECK-ARM64-LABEL: @_Z10test_ldrexv()
10 // CHECK-ARM64: call i64 @llvm.aarch64.ldxr.p0(ptr elementtype(i8) @b)
13 b
= __builtin_arm_ldrex(&b
);
16 // CHECK-LABEL: @_Z10tset_strexv()
17 // CHECK: %{{.*}} = call i32 @llvm.arm.strex.p0(i32 1, ptr elementtype(i8) @b)
19 // CHECK-ARM64-LABEL: @_Z10tset_strexv()
20 // CHECK-ARM64: %{{.*}} = call i32 @llvm.aarch64.stxr.p0(i64 1, ptr elementtype(i8) @b)
23 __builtin_arm_strex(true, &b
);