1 // RUN: %clang_cc1 -triple aarch64-none-linux-gnu -target-feature +neon -fsyntax-only -verify -emit-llvm -o - %s
2 // REQUIRES: aarch64-registered-target
4 // Test that functions with the correct target attributes can use the correct FP16 intrinsics.
8 __attribute__((target("fullfp16")))
9 void test_fullfp16(float16_t f16
) {
13 __attribute__((target("fp16")))
14 void fp16(float16_t f16
) {
18 __attribute__((target("arch=armv8-a+fp16")))
19 void test_fp16_arch(float16_t f16
) {
23 __attribute__((target("+fp16")))
24 void test_plusfp16(float16_t f16
) {
28 void undefined(float16_t f16
) {
29 vabdh_f16(f16
, f16
); // expected-error {{'__builtin_neon_vabdh_f16' needs target feature fullfp16}}