1*8cd8120aSUlrich Weigand // REQUIRES: systemz-registered-target
2*8cd8120aSUlrich Weigand // RUN: %clang_cc1 -target-cpu z15 -triple s390x-unknown-unknown \
3*8cd8120aSUlrich Weigand // RUN: -Wall -Wno-unused -Werror -fsyntax-only -verify %s
4*8cd8120aSUlrich Weigand
5*8cd8120aSUlrich Weigand typedef __attribute__((vector_size(16))) signed char vec_schar;
6*8cd8120aSUlrich Weigand typedef __attribute__((vector_size(16))) signed short vec_sshort;
7*8cd8120aSUlrich Weigand typedef __attribute__((vector_size(16))) signed int vec_sint;
8*8cd8120aSUlrich Weigand typedef __attribute__((vector_size(16))) signed long long vec_slong;
9*8cd8120aSUlrich Weigand typedef __attribute__((vector_size(16))) unsigned char vec_uchar;
10*8cd8120aSUlrich Weigand typedef __attribute__((vector_size(16))) unsigned short vec_ushort;
11*8cd8120aSUlrich Weigand typedef __attribute__((vector_size(16))) unsigned int vec_uint;
12*8cd8120aSUlrich Weigand typedef __attribute__((vector_size(16))) unsigned long long vec_ulong;
13*8cd8120aSUlrich Weigand typedef __attribute__((vector_size(16))) double vec_double;
14*8cd8120aSUlrich Weigand typedef __attribute__((vector_size(16))) float vec_float;
15*8cd8120aSUlrich Weigand
16*8cd8120aSUlrich Weigand volatile vec_schar vsc;
17*8cd8120aSUlrich Weigand volatile vec_sshort vss;
18*8cd8120aSUlrich Weigand volatile vec_sint vsi;
19*8cd8120aSUlrich Weigand volatile vec_slong vsl;
20*8cd8120aSUlrich Weigand volatile vec_uchar vuc;
21*8cd8120aSUlrich Weigand volatile vec_ushort vus;
22*8cd8120aSUlrich Weigand volatile vec_uint vui;
23*8cd8120aSUlrich Weigand volatile vec_ulong vul;
24*8cd8120aSUlrich Weigand volatile vec_double vd;
25*8cd8120aSUlrich Weigand volatile vec_float vf;
26*8cd8120aSUlrich Weigand
27*8cd8120aSUlrich Weigand volatile unsigned int len;
28*8cd8120aSUlrich Weigand
test_nnp_assist(void)29*8cd8120aSUlrich Weigand void test_nnp_assist(void) {
30*8cd8120aSUlrich Weigand __builtin_s390_vclfnhs(vus, -1); // expected-error-re {{argument value {{.*}} is outside the valid range}}
31*8cd8120aSUlrich Weigand __builtin_s390_vclfnhs(vus, 16); // expected-error-re {{argument value {{.*}} is outside the valid range}}
32*8cd8120aSUlrich Weigand __builtin_s390_vclfnhs(vus, len); // expected-error {{must be a constant integer}}
33*8cd8120aSUlrich Weigand
34*8cd8120aSUlrich Weigand __builtin_s390_vclfnls(vus, -1); // expected-error-re {{argument value {{.*}} is outside the valid range}}
35*8cd8120aSUlrich Weigand __builtin_s390_vclfnls(vus, 16); // expected-error-re {{argument value {{.*}} is outside the valid range}}
36*8cd8120aSUlrich Weigand __builtin_s390_vclfnls(vus, len); // expected-error {{must be a constant integer}}
37*8cd8120aSUlrich Weigand
38*8cd8120aSUlrich Weigand __builtin_s390_vcrnfs(vf, vf, -1); // expected-error-re {{argument value {{.*}} is outside the valid range}}
39*8cd8120aSUlrich Weigand __builtin_s390_vcrnfs(vf, vf, 16); // expected-error-re {{argument value {{.*}} is outside the valid range}}
40*8cd8120aSUlrich Weigand __builtin_s390_vcrnfs(vf, vf, len); // expected-error {{must be a constant integer}}
41*8cd8120aSUlrich Weigand
42*8cd8120aSUlrich Weigand __builtin_s390_vcfn(vus, -1); // expected-error-re {{argument value {{.*}} is outside the valid range}}
43*8cd8120aSUlrich Weigand __builtin_s390_vcfn(vus, 16); // expected-error-re {{argument value {{.*}} is outside the valid range}}
44*8cd8120aSUlrich Weigand __builtin_s390_vcfn(vus, len); // expected-error {{must be a constant integer}}
45*8cd8120aSUlrich Weigand
46*8cd8120aSUlrich Weigand __builtin_s390_vcnf(vus, -1); // expected-error-re {{argument value {{.*}} is outside the valid range}}
47*8cd8120aSUlrich Weigand __builtin_s390_vcnf(vus, 16); // expected-error-re {{argument value {{.*}} is outside the valid range}}
48*8cd8120aSUlrich Weigand __builtin_s390_vcnf(vus, len); // expected-error {{must be a constant integer}}
49*8cd8120aSUlrich Weigand }
50*8cd8120aSUlrich Weigand
51