Run DCE after a LoopFlatten test to reduce spurious output [nfc]
[llvm-project.git] / clang / test / Sema / aarch64-neon-fp16-ranges.c
blobcb273eb56160b8395f92c3b7de9aee76a674a32d
1 // RUN: %clang_cc1 -triple arm64-linux-gnu -target-feature +neon -target-feature +fullfp16 -ffreestanding -fsyntax-only -verify %s
2 // RUN: %clang_cc1 -triple aarch64-linux-gnu -target-feature +fullfp16 -target-feature +neon -ffreestanding -fsyntax-only -verify %s
4 // REQUIRES: aarch64-registered-target || arm-registered-target
6 #include <arm_neon.h>
7 #include <arm_fp16.h>
9 void test_vcvt_f16_16(int16_t a){
10 vcvth_n_f16_s16(a, 1);
11 vcvth_n_f16_s16(a, 16);
12 vcvth_n_f16_s16(a, 0); // expected-error-re {{argument value {{.*}} is outside the valid range}}
13 vcvth_n_f16_s16(a, 17); // expected-error-re {{argument value {{.*}} is outside the valid range}}
15 vcvth_n_f16_u16(a, 1);
16 vcvth_n_f16_u16(a, 16);
17 vcvth_n_f16_u16(a, 0); // expected-error-re {{argument value {{.*}} is outside the valid range}}
18 vcvth_n_f16_u16(a, 17); // expected-error-re {{argument value {{.*}} is outside the valid range}}
21 void test_vcvt_f16_32(int32_t a){
22 vcvth_n_f16_u32(a, 1);
23 vcvth_n_f16_u32(a, 16);
24 vcvth_n_f16_u32(a, 0); // expected-error-re {{argument value {{.*}} is outside the valid range}}
25 vcvth_n_f16_u32(a, 17); // expected-error-re {{argument value {{.*}} is outside the valid range}}
27 vcvth_n_f16_s32(a, 1);
28 vcvth_n_f16_s32(a, 16);
29 vcvth_n_f16_s32(a, 0); // expected-error-re {{argument value {{.*}} is outside the valid range}}
30 vcvth_n_f16_s32(a, 17); // expected-error-re {{argument value {{.*}} is outside the valid range}}
33 void test_vcvt_f16_64(int64_t a){
34 vcvth_n_f16_s64(a, 1);
35 vcvth_n_f16_s64(a, 16);
36 vcvth_n_f16_s64(a, 0); // expected-error-re {{argument value {{.*}} is outside the valid range}}
37 vcvth_n_f16_s64(a, 17); // expected-error-re {{argument value {{.*}} is outside the valid range}}
41 void test_vcvt_su_f(float16_t a){
42 vcvth_n_s16_f16(a, 1);
43 vcvth_n_s16_f16(a, 16);
44 vcvth_n_s16_f16(a, 0); // expected-error-re {{argument value {{.*}} is outside the valid range}}
45 vcvth_n_s16_f16(a, 17); // expected-error-re {{argument value {{.*}} is outside the valid range}}
47 vcvth_n_s32_f16(a, 1);
48 vcvth_n_s32_f16(a, 16);
49 vcvth_n_s32_f16(a, 0); // expected-error-re {{argument value {{.*}} is outside the valid range}}
50 vcvth_n_s32_f16(a, 17); // expected-error-re {{argument value {{.*}} is outside the valid range}}
52 vcvth_n_s64_f16(a, 1);
53 vcvth_n_s64_f16(a, 16);
54 vcvth_n_s64_f16(a, 0); // expected-error-re {{argument value {{.*}} is outside the valid range}}
55 vcvth_n_s64_f16(a, 17); // expected-error-re {{argument value {{.*}} is outside the valid range}}
57 vcvth_n_u16_f16(a, 1);
58 vcvth_n_u16_f16(a, 16);
59 vcvth_n_u16_f16(a, 0); // expected-error-re {{argument value {{.*}} is outside the valid range}}
60 vcvth_n_u16_f16(a, 17); // expected-error-re {{argument value {{.*}} is outside the valid range}}
62 vcvth_n_u32_f16(a, 1);
63 vcvth_n_u32_f16(a, 16);
64 vcvth_n_u32_f16(a, 0); // expected-error-re {{argument value {{.*}} is outside the valid range}}
65 vcvth_n_u32_f16(a, 17); // expected-error-re {{argument value {{.*}} is outside the valid range}}