summaryrefslogtreecommitdiffstats
path: root/clang/test/Sema/arm_acle.c
diff options
context:
space:
mode:
authorYi Kong <Yi.Kong@arm.com>2014-06-27 21:25:42 +0000
committerYi Kong <Yi.Kong@arm.com>2014-06-27 21:25:42 +0000
commita44c4d7173937163c90f6cb7d67401882547e8e3 (patch)
tree7ae254e0fa933f037ba3960deb2b29f4812c031b /clang/test/Sema/arm_acle.c
parent4a26c0ccaef5dfda8b12f89892ec1fcacc52e744 (diff)
downloadbcm5719-llvm-a44c4d7173937163c90f6cb7d67401882547e8e3.tar.gz
bcm5719-llvm-a44c4d7173937163c90f6cb7d67401882547e8e3.zip
Introduce arm_acle.h supporting existing LLVM builtin intrinsics
Summary: This patch introduces ACLE header file, implementing extensions that can be directly mapped to existing Clang intrinsics. It implements for both AArch32 and AArch64. Reviewers: t.p.northover, compnerd, rengolin Reviewed By: compnerd, rengolin Subscribers: rnk, echristo, compnerd, aemerson, mroth, cfe-commits Differential Revision: http://reviews.llvm.org/D4296 llvm-svn: 211962
Diffstat (limited to 'clang/test/Sema/arm_acle.c')
-rw-r--r--clang/test/Sema/arm_acle.c16
1 files changed, 16 insertions, 0 deletions
diff --git a/clang/test/Sema/arm_acle.c b/clang/test/Sema/arm_acle.c
new file mode 100644
index 00000000000..0bdbdce2a96
--- /dev/null
+++ b/clang/test/Sema/arm_acle.c
@@ -0,0 +1,16 @@
+// RUN: %clang_cc1 -triple armv8 -target-cpu cortex-a57 -fsyntax-only -verify %s
+
+#include <arm_acle.h>
+
+/*
+ * Saturating intrinsics
+ * Second argument for SSAT and USAT intrinsics must be compile-time constant,
+ * otherwise an error should be raised.
+ */
+int32_t test_ssat_const_diag(int32_t t, const int32_t v) {
+ return __ssat(t, v); // expected-error-re {{argument to {{.*}} must be a constant integer}}
+}
+
+int32_t test_usat_const_diag(int32_t t, const int32_t v) {
+ return __usat(t, v); // expected-error-re {{argument to {{.*}} must be a constant integer}}
+}
OpenPOWER on IntegriCloud