1 // REQUIRES: systemz-registered-target
2 // 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 %s
8 volatile vector
signed char vsc
;
9 volatile vector
signed short vss
;
10 volatile vector
signed int vsi
;
11 volatile vector
signed long long vsl
;
12 volatile vector
unsigned char vuc
;
13 volatile vector
unsigned short vus
;
14 volatile vector
unsigned int vui
;
15 volatile vector
unsigned long long vul
;
16 volatile vector
bool char vbc
;
17 volatile vector
bool short vbs
;
18 volatile vector
bool int vbi
;
19 volatile vector
bool long long vbl
;
20 volatile vector
float vf
;
21 volatile vector
double vd
;
23 volatile unsigned int len
;
25 void 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}}
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}}
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}}
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}}
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}}