150
|
1 // RUN: %clang_cc1 -triple arm64-linux-gnu -fallow-half-arguments-and-returns -target-feature +neon -target-feature +fullfp16 -ffreestanding -fsyntax-only -verify %s
|
|
2 // RUN: %clang_cc1 -triple aarch64-linux-gnu -fallow-half-arguments-and-returns -target-feature +fullfp16 -target-feature +neon -ffreestanding -fsyntax-only -verify %s
|
|
3
|
|
4 #include <arm_neon.h>
|
|
5 #include <arm_fp16.h>
|
|
6
|
|
7 void test_vcvt_f16_16(int16_t a){
|
|
8 vcvth_n_f16_s16(a, 1);
|
|
9 vcvth_n_f16_s16(a, 16);
|
|
10 vcvth_n_f16_s16(a, 0); // expected-error-re {{argument value {{.*}} is outside the valid range}}
|
|
11 vcvth_n_f16_s16(a, 17); // expected-error-re {{argument value {{.*}} is outside the valid range}}
|
|
12
|
|
13 vcvth_n_f16_u16(a, 1);
|
|
14 vcvth_n_f16_u16(a, 16);
|
|
15 vcvth_n_f16_u16(a, 0); // expected-error-re {{argument value {{.*}} is outside the valid range}}
|
|
16 vcvth_n_f16_u16(a, 17); // expected-error-re {{argument value {{.*}} is outside the valid range}}
|
|
17 }
|
|
18
|
|
19 void test_vcvt_f16_32(int32_t a){
|
|
20 vcvth_n_f16_u32(a, 1);
|
|
21 vcvth_n_f16_u32(a, 16);
|
|
22 vcvth_n_f16_u32(a, 0); // expected-error-re {{argument value {{.*}} is outside the valid range}}
|
|
23 vcvth_n_f16_u32(a, 17); // expected-error-re {{argument value {{.*}} is outside the valid range}}
|
|
24
|
|
25 vcvth_n_f16_s32(a, 1);
|
|
26 vcvth_n_f16_s32(a, 16);
|
|
27 vcvth_n_f16_s32(a, 0); // expected-error-re {{argument value {{.*}} is outside the valid range}}
|
|
28 vcvth_n_f16_s32(a, 17); // expected-error-re {{argument value {{.*}} is outside the valid range}}
|
|
29 }
|
|
30
|
|
31 void test_vcvt_f16_64(int64_t a){
|
|
32 vcvth_n_f16_s64(a, 1);
|
|
33 vcvth_n_f16_s64(a, 16);
|
|
34 vcvth_n_f16_s64(a, 0); // expected-error-re {{argument value {{.*}} is outside the valid range}}
|
|
35 vcvth_n_f16_s64(a, 17); // expected-error-re {{argument value {{.*}} is outside the valid range}}
|
|
36 }
|
|
37
|
|
38
|
|
39 void test_vcvt_su_f(float16_t a){
|
|
40 vcvth_n_s16_f16(a, 1);
|
|
41 vcvth_n_s16_f16(a, 16);
|
|
42 vcvth_n_s16_f16(a, 0); // expected-error-re {{argument value {{.*}} is outside the valid range}}
|
|
43 vcvth_n_s16_f16(a, 17); // expected-error-re {{argument value {{.*}} is outside the valid range}}
|
|
44
|
|
45 vcvth_n_s32_f16(a, 1);
|
|
46 vcvth_n_s32_f16(a, 16);
|
|
47 vcvth_n_s32_f16(a, 0); // expected-error-re {{argument value {{.*}} is outside the valid range}}
|
|
48 vcvth_n_s32_f16(a, 17); // expected-error-re {{argument value {{.*}} is outside the valid range}}
|
|
49
|
|
50 vcvth_n_s64_f16(a, 1);
|
|
51 vcvth_n_s64_f16(a, 16);
|
|
52 vcvth_n_s64_f16(a, 0); // expected-error-re {{argument value {{.*}} is outside the valid range}}
|
|
53 vcvth_n_s64_f16(a, 17); // expected-error-re {{argument value {{.*}} is outside the valid range}}
|
|
54
|
|
55 vcvth_n_u16_f16(a, 1);
|
|
56 vcvth_n_u16_f16(a, 16);
|
|
57 vcvth_n_u16_f16(a, 0); // expected-error-re {{argument value {{.*}} is outside the valid range}}
|
|
58 vcvth_n_u16_f16(a, 17); // expected-error-re {{argument value {{.*}} is outside the valid range}}
|
|
59
|
|
60 vcvth_n_u32_f16(a, 1);
|
|
61 vcvth_n_u32_f16(a, 16);
|
|
62 vcvth_n_u32_f16(a, 0); // expected-error-re {{argument value {{.*}} is outside the valid range}}
|
|
63 vcvth_n_u32_f16(a, 17); // expected-error-re {{argument value {{.*}} is outside the valid range}}
|
|
64 }
|