brintos

brintos / llvm-project-archived public Read only

0
0
Text · 3.7 KiB · 3a90b44 Raw
80 lines · c
1// RUN: %clang_cc1 -triple aarch64-linux-gnu -target-feature +neon  -target-feature +v8.2a -ffreestanding -fsyntax-only -verify %s2 3#include <arm_neon.h>4#include <arm_fp16.h>5// REQUIRES: aarch64-registered-target6 7void test_conversions_s16(int16_t arg_i16) {8	vcvth_n_f16_s16(arg_i16, 1);9	vcvth_n_f16_s16(arg_i16, 16);10	vcvth_n_f16_s16(arg_i16, 0); // expected-error-re {{argument value {{.*}} is outside the valid range}}11	vcvth_n_f16_s16(arg_i16, 17); // expected-error-re {{argument value {{.*}} is outside the valid range}}12}13 14void test_conversions_s32(int32_t arg_i32) {15	vcvth_n_f16_s32(arg_i32, 1);16	vcvth_n_f16_s32(arg_i32, 16);17	vcvth_n_f16_s32(arg_i32, 0); // expected-error-re {{argument value {{.*}} is outside the valid range}}18	vcvth_n_f16_s32(arg_i32, 17); // expected-error-re {{argument value {{.*}} is outside the valid range}}19}20 21void test_conversions_s64(int64_t arg_i64) {22	vcvth_n_f16_s64(arg_i64, 1);23	vcvth_n_f16_s64(arg_i64, 16);24	vcvth_n_f16_s64(arg_i64, 0); // expected-error-re {{argument value {{.*}} is outside the valid range}}25	vcvth_n_f16_s64(arg_i64, 17); // expected-error-re {{argument value {{.*}} is outside the valid range}}26}27 28void test_conversions_u16(uint16_t arg_u16) {29	vcvth_n_f16_u16(arg_u16, 1);30	vcvth_n_f16_u16(arg_u16, 16);31	vcvth_n_f16_u16(arg_u16, 0); // expected-error-re {{argument value {{.*}} is outside the valid range}}32	vcvth_n_f16_u16(arg_u16, 17); // expected-error-re {{argument value {{.*}} is outside the valid range}}33}34 35void test_conversions_u32(uint32_t arg_u32) {36	vcvth_n_f16_u32(arg_u32, 1);37	vcvth_n_f16_u32(arg_u32, 16);38	vcvth_n_f16_u32(arg_u32, 0); // expected-error-re {{argument value {{.*}} is outside the valid range}}39	vcvth_n_f16_u32(arg_u32, 17); // expected-error-re {{argument value {{.*}} is outside the valid range}}40}41 42void test_conversions_u64(uint64_t arg_u64) {43	vcvth_n_f16_u64(arg_u64, 1);44	vcvth_n_f16_u64(arg_u64, 16);45	vcvth_n_f16_u64(arg_u64, 0); // expected-error-re {{argument value {{.*}} is outside the valid range}}46	vcvth_n_f16_u64(arg_u64, 17); // expected-error-re {{argument value {{.*}} is outside the valid range}}47}48 49void test_conversions_f16(float16_t arg_f16) {50	vcvth_n_s16_f16(arg_f16, 1);51	vcvth_n_s16_f16(arg_f16, 16);52	vcvth_n_s16_f16(arg_f16, 0); // expected-error-re {{argument value {{.*}} is outside the valid range}}53	vcvth_n_s16_f16(arg_f16, 17); // expected-error-re {{argument value {{.*}} is outside the valid range}}54 55	vcvth_n_s32_f16(arg_f16, 1);56	vcvth_n_s32_f16(arg_f16, 16);57	vcvth_n_s32_f16(arg_f16, 0); // expected-error-re {{argument value {{.*}} is outside the valid range}}58	vcvth_n_s32_f16(arg_f16, 17); // expected-error-re {{argument value {{.*}} is outside the valid range}}59 60	vcvth_n_s64_f16(arg_f16, 1);61	vcvth_n_s64_f16(arg_f16, 16);62	vcvth_n_s64_f16(arg_f16, 0); // expected-error-re {{argument value {{.*}} is outside the valid range}}63	vcvth_n_s64_f16(arg_f16, 17); // expected-error-re {{argument value {{.*}} is outside the valid range}}64 65	vcvth_n_u16_f16(arg_f16, 1);66	vcvth_n_u16_f16(arg_f16, 16);67	vcvth_n_u16_f16(arg_f16, 0); // expected-error-re {{argument value {{.*}} is outside the valid range}}68	vcvth_n_u16_f16(arg_f16, 17); // expected-error-re {{argument value {{.*}} is outside the valid range}}69 70	vcvth_n_u32_f16(arg_f16, 1);71	vcvth_n_u32_f16(arg_f16, 16);72	vcvth_n_u32_f16(arg_f16, 0); // expected-error-re {{argument value {{.*}} is outside the valid range}}73	vcvth_n_u32_f16(arg_f16, 17); // expected-error-re {{argument value {{.*}} is outside the valid range}}74 75	vcvth_n_u64_f16(arg_f16, 1);76	vcvth_n_u64_f16(arg_f16, 16);77	vcvth_n_u64_f16(arg_f16, 0); // expected-error-re {{argument value {{.*}} is outside the valid range}}78	vcvth_n_u64_f16(arg_f16, 17); // expected-error-re {{argument value {{.*}} is outside the valid range}}79}80