annotate clang/test/Sema/aarch64-neon-fp16-ranges.c @ 222:81f6424ef0e3 llvm-original

LLVM original branch
author Shinji KONO <kono@ie.u-ryukyu.ac.jp>
date Sun, 18 Jul 2021 22:10:01 +0900 (2021-07-18)
parents 1d019706d866
children c4bab56944e8
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
150
anatofuz
parents:
diff changeset
1 // RUN: %clang_cc1 -triple arm64-linux-gnu -fallow-half-arguments-and-returns -target-feature +neon -target-feature +fullfp16 -ffreestanding -fsyntax-only -verify %s
anatofuz
parents:
diff changeset
2 // RUN: %clang_cc1 -triple aarch64-linux-gnu -fallow-half-arguments-and-returns -target-feature +fullfp16 -target-feature +neon -ffreestanding -fsyntax-only -verify %s
anatofuz
parents:
diff changeset
3
anatofuz
parents:
diff changeset
4 #include <arm_neon.h>
anatofuz
parents:
diff changeset
5 #include <arm_fp16.h>
anatofuz
parents:
diff changeset
6
anatofuz
parents:
diff changeset
7 void test_vcvt_f16_16(int16_t a){
anatofuz
parents:
diff changeset
8 vcvth_n_f16_s16(a, 1);
anatofuz
parents:
diff changeset
9 vcvth_n_f16_s16(a, 16);
anatofuz
parents:
diff changeset
10 vcvth_n_f16_s16(a, 0); // expected-error-re {{argument value {{.*}} is outside the valid range}}
anatofuz
parents:
diff changeset
11 vcvth_n_f16_s16(a, 17); // expected-error-re {{argument value {{.*}} is outside the valid range}}
anatofuz
parents:
diff changeset
12
anatofuz
parents:
diff changeset
13 vcvth_n_f16_u16(a, 1);
anatofuz
parents:
diff changeset
14 vcvth_n_f16_u16(a, 16);
anatofuz
parents:
diff changeset
15 vcvth_n_f16_u16(a, 0); // expected-error-re {{argument value {{.*}} is outside the valid range}}
anatofuz
parents:
diff changeset
16 vcvth_n_f16_u16(a, 17); // expected-error-re {{argument value {{.*}} is outside the valid range}}
anatofuz
parents:
diff changeset
17 }
anatofuz
parents:
diff changeset
18
anatofuz
parents:
diff changeset
19 void test_vcvt_f16_32(int32_t a){
anatofuz
parents:
diff changeset
20 vcvth_n_f16_u32(a, 1);
anatofuz
parents:
diff changeset
21 vcvth_n_f16_u32(a, 16);
anatofuz
parents:
diff changeset
22 vcvth_n_f16_u32(a, 0); // expected-error-re {{argument value {{.*}} is outside the valid range}}
anatofuz
parents:
diff changeset
23 vcvth_n_f16_u32(a, 17); // expected-error-re {{argument value {{.*}} is outside the valid range}}
anatofuz
parents:
diff changeset
24
anatofuz
parents:
diff changeset
25 vcvth_n_f16_s32(a, 1);
anatofuz
parents:
diff changeset
26 vcvth_n_f16_s32(a, 16);
anatofuz
parents:
diff changeset
27 vcvth_n_f16_s32(a, 0); // expected-error-re {{argument value {{.*}} is outside the valid range}}
anatofuz
parents:
diff changeset
28 vcvth_n_f16_s32(a, 17); // expected-error-re {{argument value {{.*}} is outside the valid range}}
anatofuz
parents:
diff changeset
29 }
anatofuz
parents:
diff changeset
30
anatofuz
parents:
diff changeset
31 void test_vcvt_f16_64(int64_t a){
anatofuz
parents:
diff changeset
32 vcvth_n_f16_s64(a, 1);
anatofuz
parents:
diff changeset
33 vcvth_n_f16_s64(a, 16);
anatofuz
parents:
diff changeset
34 vcvth_n_f16_s64(a, 0); // expected-error-re {{argument value {{.*}} is outside the valid range}}
anatofuz
parents:
diff changeset
35 vcvth_n_f16_s64(a, 17); // expected-error-re {{argument value {{.*}} is outside the valid range}}
anatofuz
parents:
diff changeset
36 }
anatofuz
parents:
diff changeset
37
anatofuz
parents:
diff changeset
38
anatofuz
parents:
diff changeset
39 void test_vcvt_su_f(float16_t a){
anatofuz
parents:
diff changeset
40 vcvth_n_s16_f16(a, 1);
anatofuz
parents:
diff changeset
41 vcvth_n_s16_f16(a, 16);
anatofuz
parents:
diff changeset
42 vcvth_n_s16_f16(a, 0); // expected-error-re {{argument value {{.*}} is outside the valid range}}
anatofuz
parents:
diff changeset
43 vcvth_n_s16_f16(a, 17); // expected-error-re {{argument value {{.*}} is outside the valid range}}
anatofuz
parents:
diff changeset
44
anatofuz
parents:
diff changeset
45 vcvth_n_s32_f16(a, 1);
anatofuz
parents:
diff changeset
46 vcvth_n_s32_f16(a, 16);
anatofuz
parents:
diff changeset
47 vcvth_n_s32_f16(a, 0); // expected-error-re {{argument value {{.*}} is outside the valid range}}
anatofuz
parents:
diff changeset
48 vcvth_n_s32_f16(a, 17); // expected-error-re {{argument value {{.*}} is outside the valid range}}
anatofuz
parents:
diff changeset
49
anatofuz
parents:
diff changeset
50 vcvth_n_s64_f16(a, 1);
anatofuz
parents:
diff changeset
51 vcvth_n_s64_f16(a, 16);
anatofuz
parents:
diff changeset
52 vcvth_n_s64_f16(a, 0); // expected-error-re {{argument value {{.*}} is outside the valid range}}
anatofuz
parents:
diff changeset
53 vcvth_n_s64_f16(a, 17); // expected-error-re {{argument value {{.*}} is outside the valid range}}
anatofuz
parents:
diff changeset
54
anatofuz
parents:
diff changeset
55 vcvth_n_u16_f16(a, 1);
anatofuz
parents:
diff changeset
56 vcvth_n_u16_f16(a, 16);
anatofuz
parents:
diff changeset
57 vcvth_n_u16_f16(a, 0); // expected-error-re {{argument value {{.*}} is outside the valid range}}
anatofuz
parents:
diff changeset
58 vcvth_n_u16_f16(a, 17); // expected-error-re {{argument value {{.*}} is outside the valid range}}
anatofuz
parents:
diff changeset
59
anatofuz
parents:
diff changeset
60 vcvth_n_u32_f16(a, 1);
anatofuz
parents:
diff changeset
61 vcvth_n_u32_f16(a, 16);
anatofuz
parents:
diff changeset
62 vcvth_n_u32_f16(a, 0); // expected-error-re {{argument value {{.*}} is outside the valid range}}
anatofuz
parents:
diff changeset
63 vcvth_n_u32_f16(a, 17); // expected-error-re {{argument value {{.*}} is outside the valid range}}
anatofuz
parents:
diff changeset
64 }