46 lines · c
1// REQUIRES: systemz-registered-target2// RUN: %clang_cc1 -target-cpu z16 -triple s390x-linux-gnu \3// RUN: -fzvector -flax-vector-conversions=none \4// RUN: -Wall -Wno-unused -Werror -fsyntax-only -verify %s5 6#include <vecintrin.h>7 8volatile vector signed char vsc;9volatile vector signed short vss;10volatile vector signed int vsi;11volatile vector signed long long vsl;12volatile vector unsigned char vuc;13volatile vector unsigned short vus;14volatile vector unsigned int vui;15volatile vector unsigned long long vul;16volatile vector bool char vbc;17volatile vector bool short vbs;18volatile vector bool int vbi;19volatile vector bool long long vbl;20volatile vector float vf;21volatile vector double vd;22 23volatile unsigned int len;24 25void test_nnp_assist(void) {26 vf = vec_extend_to_fp32_hi(vus, -1); // expected-error {{argument value -1 is outside the valid range [0, 15]}}27 vf = vec_extend_to_fp32_hi(vus, 16); // expected-error {{argument value 16 is outside the valid range [0, 15]}}28 vf = vec_extend_to_fp32_hi(vus, len); // expected-error {{argument to '__builtin_s390_vclfnhs' must be a constant integer}}29 30 vf = vec_extend_to_fp32_lo(vus, -1); // expected-error {{argument value -1 is outside the valid range [0, 15]}}31 vf = vec_extend_to_fp32_lo(vus, 16); // expected-error {{argument value 16 is outside the valid range [0, 15]}}32 vf = vec_extend_to_fp32_lo(vus, len); // expected-error {{argument to '__builtin_s390_vclfnls' must be a constant integer}}33 34 vus = vec_round_from_fp32(vf, vf, -1); // expected-error {{argument value -1 is outside the valid range [0, 15]}}35 vus = vec_round_from_fp32(vf, vf, 16); // expected-error {{argument value 16 is outside the valid range [0, 15]}}36 vus = vec_round_from_fp32(vf, vf, len); // expected-error {{argument to '__builtin_s390_vcrnfs' must be a constant integer}}37 38 vus = vec_convert_to_fp16(vus, -1); // expected-error {{argument value -1 is outside the valid range [0, 15]}}39 vus = vec_convert_to_fp16(vus, 16); // expected-error {{argument value 16 is outside the valid range [0, 15]}}40 vus = vec_convert_to_fp16(vus, len); // expected-error {{argument to '__builtin_s390_vcfn' must be a constant integer}}41 42 vus = vec_convert_from_fp16(vus, -1); // expected-error {{argument value -1 is outside the valid range [0, 15]}}43 vus = vec_convert_from_fp16(vus, 16); // expected-error {{argument value 16 is outside the valid range [0, 15]}}44 vus = vec_convert_from_fp16(vus, len); // expected-error {{argument to '__builtin_s390_vcnf' must be a constant integer}}45}46