1 // REQUIRES: systemz-registered-target 2 // RUN: %clang_cc1 -target-cpu z15 -triple s390x-linux-gnu \ 3 // RUN: -fzvector -flax-vector-conversions=none \ 4 // RUN: -Wall -Wno-unused -Werror -fsyntax-only -verify %s 5 6 #include <vecintrin.h> 7 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; 22 23 volatile signed char sc; 24 volatile signed short ss; 25 volatile signed int si; 26 volatile signed long long sl; 27 volatile unsigned char uc; 28 volatile unsigned short us; 29 volatile unsigned int ui; 30 volatile unsigned long long ul; 31 volatile float f; 32 volatile double d; 33 34 const void * volatile cptr; 35 const signed char * volatile cptrsc; 36 const signed short * volatile cptrss; 37 const signed int * volatile cptrsi; 38 const signed long long * volatile cptrsl; 39 const unsigned char * volatile cptruc; 40 const unsigned short * volatile cptrus; 41 const unsigned int * volatile cptrui; 42 const unsigned long long * volatile cptrul; 43 const float * volatile cptrf; 44 const double * volatile cptrd; 45 46 void * volatile ptr; 47 signed char * volatile ptrsc; 48 signed short * volatile ptrss; 49 signed int * volatile ptrsi; 50 signed long long * volatile ptrsl; 51 unsigned char * volatile ptruc; 52 unsigned short * volatile ptrus; 53 unsigned int * volatile ptrui; 54 unsigned long long * volatile ptrul; 55 float * volatile ptrf; 56 double * volatile ptrd; 57 58 volatile unsigned int len; 59 volatile int idx; 60 int cc; 61 62 void test_integer(void) { 63 vsc = vec_sldb(vsc, vsc, idx); // expected-error {{no matching function}} \ 64 // expected-error {{argument to '__builtin_s390_vsld' must be a constant integer}} 65 // [email protected]:* 9 {{candidate function not viable}} 66 // [email protected]:* 1 {{must be a constant integer from 0 to 7}} 67 vuc = vec_sldb(vuc, vuc, idx); // expected-error {{no matching function}} \ 68 // expected-error {{argument to '__builtin_s390_vsld' must be a constant integer}} 69 // [email protected]:* 9 {{candidate function not viable}} 70 // [email protected]:* 1 {{must be a constant integer from 0 to 7}} 71 vss = vec_sldb(vss, vss, idx); // expected-error {{no matching function}} \ 72 // expected-error {{argument to '__builtin_s390_vsld' must be a constant integer}} 73 // [email protected]:* 9 {{candidate function not viable}} 74 // [email protected]:* 1 {{must be a constant integer from 0 to 7}} 75 vus = vec_sldb(vus, vus, idx); // expected-error {{no matching function}} \ 76 // expected-error {{argument to '__builtin_s390_vsld' must be a constant integer}} 77 // [email protected]:* 9 {{candidate function not viable}} 78 // [email protected]:* 1 {{must be a constant integer from 0 to 7}} 79 vsi = vec_sldb(vsi, vsi, idx); // expected-error {{no matching function}} \ 80 // expected-error {{argument to '__builtin_s390_vsld' must be a constant integer}} 81 // [email protected]:* 9 {{candidate function not viable}} 82 // [email protected]:* 1 {{must be a constant integer from 0 to 7}} 83 vui = vec_sldb(vui, vui, idx); // expected-error {{no matching function}} \ 84 // expected-error {{argument to '__builtin_s390_vsld' must be a constant integer}} 85 // [email protected]:* 9 {{candidate function not viable}} 86 // [email protected]:* 1 {{must be a constant integer from 0 to 7}} 87 vsl = vec_sldb(vsl, vsl, idx); // expected-error {{no matching function}} \ 88 // expected-error {{argument to '__builtin_s390_vsld' must be a constant integer}} 89 // [email protected]:* 9 {{candidate function not viable}} 90 // [email protected]:* 1 {{must be a constant integer from 0 to 7}} 91 vul = vec_sldb(vul, vul, idx); // expected-error {{no matching function}} \ 92 // expected-error {{argument to '__builtin_s390_vsld' must be a constant integer}} 93 // [email protected]:* 9 {{candidate function not viable}} 94 // [email protected]:* 1 {{must be a constant integer from 0 to 7}} 95 vf = vec_sldb(vf, vf, idx); // expected-error {{no matching function}} \ 96 // expected-error {{argument to '__builtin_s390_vsld' must be a constant integer}} 97 // [email protected]:* 9 {{candidate function not viable}} 98 // [email protected]:* 1 {{must be a constant integer from 0 to 7}} 99 vd = vec_sldb(vd, vd, idx); // expected-error {{no matching function}} \ 100 // expected-error {{argument to '__builtin_s390_vsld' must be a constant integer}} 101 // [email protected]:* 9 {{candidate function not viable}} 102 // [email protected]:* 1 {{must be a constant integer from 0 to 7}} 103 104 vsc = vec_srdb(vsc, vsc, idx); // expected-error {{no matching function}} \ 105 // expected-error {{argument to '__builtin_s390_vsrd' must be a constant integer}} 106 // [email protected]:* 9 {{candidate function not viable}} 107 // [email protected]:* 1 {{must be a constant integer from 0 to 7}} 108 vuc = vec_srdb(vuc, vuc, idx); // expected-error {{no matching function}} \ 109 // expected-error {{argument to '__builtin_s390_vsrd' must be a constant integer}} 110 // [email protected]:* 9 {{candidate function not viable}} 111 // [email protected]:* 1 {{must be a constant integer from 0 to 7}} 112 vss = vec_srdb(vss, vss, idx); // expected-error {{no matching function}} \ 113 // expected-error {{argument to '__builtin_s390_vsrd' must be a constant integer}} 114 // [email protected]:* 9 {{candidate function not viable}} 115 // [email protected]:* 1 {{must be a constant integer from 0 to 7}} 116 vus = vec_srdb(vus, vus, idx); // expected-error {{no matching function}} \ 117 // expected-error {{argument to '__builtin_s390_vsrd' must be a constant integer}} 118 // [email protected]:* 9 {{candidate function not viable}} 119 // [email protected]:* 1 {{must be a constant integer from 0 to 7}} 120 vsi = vec_srdb(vsi, vsi, idx); // expected-error {{no matching function}} \ 121 // expected-error {{argument to '__builtin_s390_vsrd' must be a constant integer}} 122 // [email protected]:* 9 {{candidate function not viable}} 123 // [email protected]:* 1 {{must be a constant integer from 0 to 7}} 124 vui = vec_srdb(vui, vui, idx); // expected-error {{no matching function}} \ 125 // expected-error {{argument to '__builtin_s390_vsrd' must be a constant integer}} 126 // [email protected]:* 9 {{candidate function not viable}} 127 // [email protected]:* 1 {{must be a constant integer from 0 to 7}} 128 vsl = vec_srdb(vsl, vsl, idx); // expected-error {{no matching function}} \ 129 // expected-error {{argument to '__builtin_s390_vsrd' must be a constant integer}} 130 // [email protected]:* 9 {{candidate function not viable}} 131 // [email protected]:* 1 {{must be a constant integer from 0 to 7}} 132 vul = vec_srdb(vul, vul, idx); // expected-error {{no matching function}} \ 133 // expected-error {{argument to '__builtin_s390_vsrd' must be a constant integer}} 134 // [email protected]:* 9 {{candidate function not viable}} 135 // [email protected]:* 1 {{must be a constant integer from 0 to 7}} 136 vf = vec_srdb(vf, vf, idx); // expected-error {{no matching function}} \ 137 // expected-error {{argument to '__builtin_s390_vsrd' must be a constant integer}} 138 // [email protected]:* 9 {{candidate function not viable}} 139 // [email protected]:* 1 {{must be a constant integer from 0 to 7}} 140 vd = vec_srdb(vd, vd, idx); // expected-error {{no matching function}} \ 141 // expected-error {{argument to '__builtin_s390_vsrd' must be a constant integer}} 142 // [email protected]:* 9 {{candidate function not viable}} 143 // [email protected]:* 1 {{must be a constant integer from 0 to 7}} 144 } 145