summaryrefslogtreecommitdiffstats
path: root/clang/test/Sema
diff options
context:
space:
mode:
authorIvan A. Kosarev <ikosarev@accesssoftek.com>2018-07-23 16:01:35 +0000
committerIvan A. Kosarev <ikosarev@accesssoftek.com>2018-07-23 16:01:35 +0000
commitff08ea77b5ee9a5200a429be4f077e6ac172012f (patch)
tree503587898a8297d4be3816f97f290bb41ea7f53a /clang/test/Sema
parentfa1ea6977c37f4d6ac89907215dfa04b50f7ab8b (diff)
downloadbcm5719-llvm-ff08ea77b5ee9a5200a429be4f077e6ac172012f.tar.gz
bcm5719-llvm-ff08ea77b5ee9a5200a429be4f077e6ac172012f.zip
[NEON] Define half-precision vmaxnm intrinsics only when available
Differential Revision: https://reviews.llvm.org/D49375 llvm-svn: 337704
Diffstat (limited to 'clang/test/Sema')
-rw-r--r--clang/test/Sema/arm-no-fp16.c20
1 files changed, 19 insertions, 1 deletions
diff --git a/clang/test/Sema/arm-no-fp16.c b/clang/test/Sema/arm-no-fp16.c
index 2193c52fc56..2a23270e92d 100644
--- a/clang/test/Sema/arm-no-fp16.c
+++ b/clang/test/Sema/arm-no-fp16.c
@@ -1,4 +1,6 @@
-// RUN: %clang_cc1 -triple thumbv7-none-eabi %s -target-feature +neon -target-feature -fp16 -fsyntax-only -verify
+// RUN: %clang_cc1 -triple thumbv7-none-eabi %s -target-feature +neon \
+// RUN: -fallow-half-arguments-and-returns -target-feature -fp16 \
+// RUN: -fsyntax-only -verify
#include <arm_neon.h>
@@ -65,3 +67,19 @@ float16x4_t test_vrndx_f16(float16x4_t a) {
float16x8_t test_vrndxq_f16(float16x8_t a) {
return vrndxq_f16(a); // expected-warning{{implicit declaration of function 'vrndxq_f16'}} expected-error{{returning 'int' from a function with incompatible result type 'float16x8_t'}}
}
+
+float16x4_t test_vmaxnm_f16(float16x4_t a, float16x4_t b) {
+ return vmaxnm_f16(a, b); // expected-warning{{implicit declaration of function 'vmaxnm_f16'}} expected-error{{returning 'int' from a function with incompatible result type 'float16x4_t'}}
+}
+
+float16x8_t test_vmaxnmq_f16(float16x8_t a, float16x8_t b) {
+ return vmaxnmq_f16(a, b); // expected-warning{{implicit declaration of function 'vmaxnmq_f16'}} expected-error{{returning 'int' from a function with incompatible result type 'float16x8_t'}}
+}
+
+float16x4_t test_vminnm_f16(float16x4_t a, float16x4_t b) {
+ return vminnm_f16(a, b); // expected-warning{{implicit declaration of function 'vminnm_f16'}} expected-error{{returning 'int' from a function with incompatible result type 'float16x4_t'}}
+}
+
+float16x8_t test_vminnmq_f16(float16x8_t a, float16x8_t b) {
+ return vminnmq_f16(a, b); // expected-warning{{implicit declaration of function 'vminnmq_f16'}} expected-error{{returning 'int' from a function with incompatible result type 'float16x8_t'}}
+}
OpenPOWER on IntegriCloud