summaryrefslogtreecommitdiffstats
path: root/test/CodeGen/builtins-arm.c
diff options
context:
space:
mode:
Diffstat (limited to 'test/CodeGen/builtins-arm.c')
-rw-r--r--test/CodeGen/builtins-arm.c18
1 files changed, 18 insertions, 0 deletions
diff --git a/test/CodeGen/builtins-arm.c b/test/CodeGen/builtins-arm.c
index a51df15..9f3ed9a 100644
--- a/test/CodeGen/builtins-arm.c
+++ b/test/CodeGen/builtins-arm.c
@@ -55,6 +55,12 @@ void sevl() {
// CHECK: call {{.*}} @llvm.arm.hint(i32 5)
+void dbg() {
+ __builtin_arm_dbg(0);
+}
+
+// CHECK: call {{.*}} @llvm.arm.dbg(i32 0)
+
void test_barrier() {
__builtin_arm_dmb(1); //CHECK: call {{.*}} @llvm.arm.dmb(i32 1)
__builtin_arm_dsb(2); //CHECK: call {{.*}} @llvm.arm.dsb(i32 2)
@@ -66,3 +72,15 @@ void test_barrier() {
unsigned rbit(unsigned a) {
return __builtin_arm_rbit(a);
}
+
+void prefetch(int i) {
+ __builtin_arm_prefetch(&i, 0, 1);
+// CHECK: call {{.*}} @llvm.prefetch(i8* %{{.*}}, i32 0, i32 3, i32 1)
+
+ __builtin_arm_prefetch(&i, 1, 1);
+// CHECK: call {{.*}} @llvm.prefetch(i8* %{{.*}}, i32 1, i32 3, i32 1)
+
+
+ __builtin_arm_prefetch(&i, 1, 0);
+// CHECK: call {{.*}} @llvm.prefetch(i8* %{{.*}}, i32 1, i32 3, i32 0)
+}
OpenPOWER on IntegriCloud