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