From 572250d60a23307df846bf56b387d7dabca17948 Mon Sep 17 00:00:00 2001 From: Saleem Abdulrasool Date: Sat, 12 Jul 2014 23:27:22 +0000 Subject: CodeGen: support hint intrinsics from ACLE on AArch64 This adds support for the ACLE hint intrinsics on AArch64 similar to ARM. This is required to properly support ACLE on AArch64. llvm-svn: 212890 --- clang/test/CodeGen/arm_acle.c | 37 +++++++++++++++++++++++++++++++++++++ 1 file changed, 37 insertions(+) (limited to 'clang/test/CodeGen/arm_acle.c') diff --git a/clang/test/CodeGen/arm_acle.c b/clang/test/CodeGen/arm_acle.c index a2f24d3fbf4..a7c37f5f8a0 100644 --- a/clang/test/CodeGen/arm_acle.c +++ b/clang/test/CodeGen/arm_acle.c @@ -3,6 +3,43 @@ #include +/* Hints */ + +// ARM-LABEL: test_yield +// AArch32: call void @llvm.arm.hint(i32 1) +// AArch64: call void @llvm.aarch64.hint(i32 1) +void test_yield(void) { + __yield(); +} + +// ARM-LABEL: test_wfe +// AArch32: call void @llvm.arm.hint(i32 2) +// AArch64: call void @llvm.aarch64.hint(i32 2) +void test_wfe(void) { + __wfe(); +} + +// ARM-LABEL: test_wfi +// AArch32: call void @llvm.arm.hint(i32 3) +// AArch64: call void @llvm.aarch64.hint(i32 3) +void test_wfi(void) { + __wfi(); +} + +// ARM-LABEL: test_sev +// AArch32: call void @llvm.arm.hint(i32 4) +// AArch64: call void @llvm.aarch64.hint(i32 4) +void test_sev(void) { + __sev(); +} + +// ARM-LABEL: test_sevl +// AArch32: call void @llvm.arm.hint(i32 5) +// AArch64: call void @llvm.aarch64.hint(i32 5) +void test_sevl(void) { + __sevl(); +} + /* 9 DATA-PROCESSING INTRINSICS */ /* 9.2 Miscellaneous data-processing intrinsics */ // ARM-LABEL: test_rev -- cgit v1.2.3