1*8424bf20SUlrich Weigand // REQUIRES: systemz-registered-target 2*8424bf20SUlrich Weigand // RUN: %clang_cc1 -target-cpu arch15 -triple s390x-linux-gnu \ 3*8424bf20SUlrich Weigand // RUN: -fzvector -flax-vector-conversions=none \ 4*8424bf20SUlrich Weigand // RUN: -Wall -Wno-unused -Werror -fsyntax-only -verify %s 5*8424bf20SUlrich Weigand 6*8424bf20SUlrich Weigand #include <vecintrin.h> 7*8424bf20SUlrich Weigand 8*8424bf20SUlrich Weigand volatile vector signed char vsc; 9*8424bf20SUlrich Weigand volatile vector signed short vss; 10*8424bf20SUlrich Weigand volatile vector signed int vsi; 11*8424bf20SUlrich Weigand volatile vector signed long long vsl; 12*8424bf20SUlrich Weigand volatile vector signed __int128 vslll; 13*8424bf20SUlrich Weigand volatile vector unsigned char vuc; 14*8424bf20SUlrich Weigand volatile vector unsigned short vus; 15*8424bf20SUlrich Weigand volatile vector unsigned int vui; 16*8424bf20SUlrich Weigand volatile vector unsigned long long vul; 17*8424bf20SUlrich Weigand volatile vector unsigned __int128 vulll; 18*8424bf20SUlrich Weigand volatile vector bool char vbc; 19*8424bf20SUlrich Weigand volatile vector bool short vbs; 20*8424bf20SUlrich Weigand volatile vector bool int vbi; 21*8424bf20SUlrich Weigand volatile vector bool long long vbl; 22*8424bf20SUlrich Weigand volatile vector bool __int128 vblll; 23*8424bf20SUlrich Weigand volatile vector double vd; 24*8424bf20SUlrich Weigand 25*8424bf20SUlrich Weigand volatile signed char sc; 26*8424bf20SUlrich Weigand volatile signed short ss; 27*8424bf20SUlrich Weigand volatile signed int si; 28*8424bf20SUlrich Weigand volatile signed long long sl; 29*8424bf20SUlrich Weigand volatile unsigned char uc; 30*8424bf20SUlrich Weigand volatile unsigned short us; 31*8424bf20SUlrich Weigand volatile unsigned int ui; 32*8424bf20SUlrich Weigand volatile unsigned long long ul; 33*8424bf20SUlrich Weigand volatile double d; 34*8424bf20SUlrich Weigand 35*8424bf20SUlrich Weigand const void * volatile cptr; 36*8424bf20SUlrich Weigand const signed char * volatile cptrsc; 37*8424bf20SUlrich Weigand const signed short * volatile cptrss; 38*8424bf20SUlrich Weigand const signed int * volatile cptrsi; 39*8424bf20SUlrich Weigand const signed long long * volatile cptrsl; 40*8424bf20SUlrich Weigand const unsigned char * volatile cptruc; 41*8424bf20SUlrich Weigand const unsigned short * volatile cptrus; 42*8424bf20SUlrich Weigand const unsigned int * volatile cptrui; 43*8424bf20SUlrich Weigand const unsigned long long * volatile cptrul; 44*8424bf20SUlrich Weigand const float * volatile cptrf; 45*8424bf20SUlrich Weigand const double * volatile cptrd; 46*8424bf20SUlrich Weigand 47*8424bf20SUlrich Weigand void * volatile ptr; 48*8424bf20SUlrich Weigand signed char * volatile ptrsc; 49*8424bf20SUlrich Weigand signed short * volatile ptrss; 50*8424bf20SUlrich Weigand signed int * volatile ptrsi; 51*8424bf20SUlrich Weigand signed long long * volatile ptrsl; 52*8424bf20SUlrich Weigand unsigned char * volatile ptruc; 53*8424bf20SUlrich Weigand unsigned short * volatile ptrus; 54*8424bf20SUlrich Weigand unsigned int * volatile ptrui; 55*8424bf20SUlrich Weigand unsigned long long * volatile ptrul; 56*8424bf20SUlrich Weigand float * volatile ptrf; 57*8424bf20SUlrich Weigand double * volatile ptrd; 58*8424bf20SUlrich Weigand 59*8424bf20SUlrich Weigand volatile unsigned int len; 60*8424bf20SUlrich Weigand volatile int idx; 61*8424bf20SUlrich Weigand int cc; 62*8424bf20SUlrich Weigand 63*8424bf20SUlrich Weigand void test_integer(void) { 64*8424bf20SUlrich Weigand vsc = vec_evaluate(vsc, vsc, vsc, idx); // expected-error {{no matching function}} \ 65*8424bf20SUlrich Weigand // expected-error {{argument to '__builtin_s390_veval' must be a constant integer}} \ 66*8424bf20SUlrich Weigand // expected-note@vecintrin.h:* 14 {{candidate function not viable}} 67*8424bf20SUlrich Weigand // expected-note@vecintrin.h:* 1 {{must be a constant integer}} 68*8424bf20SUlrich Weigand vuc = vec_evaluate(vuc, vuc, vuc, idx); // expected-error {{no matching function}} \ 69*8424bf20SUlrich Weigand // expected-error {{argument to '__builtin_s390_veval' must be a constant integer}} \ 70*8424bf20SUlrich Weigand // expected-note@vecintrin.h:* 13 {{candidate function not viable}} 71*8424bf20SUlrich Weigand // expected-note@vecintrin.h:* 2 {{must be a constant integer}} 72*8424bf20SUlrich Weigand vbc = vec_evaluate(vbc, vbc, vbc, idx); // expected-error {{no matching function}} \ 73*8424bf20SUlrich Weigand // expected-error {{argument to '__builtin_s390_veval' must be a constant integer}} \ 74*8424bf20SUlrich Weigand // expected-note@vecintrin.h:* 13 {{candidate function not viable}} 75*8424bf20SUlrich Weigand // expected-note@vecintrin.h:* 2 {{must be a constant integer}} 76*8424bf20SUlrich Weigand vss = vec_evaluate(vss, vss, vss, idx); // expected-error {{no matching function}} \ 77*8424bf20SUlrich Weigand // expected-error {{argument to '__builtin_s390_veval' must be a constant integer}} \ 78*8424bf20SUlrich Weigand // expected-note@vecintrin.h:* 14 {{candidate function not viable}} 79*8424bf20SUlrich Weigand // expected-note@vecintrin.h:* 1 {{must be a constant integer}} 80*8424bf20SUlrich Weigand vus = vec_evaluate(vus, vus, vus, idx); // expected-error {{no matching function}} \ 81*8424bf20SUlrich Weigand // expected-error {{argument to '__builtin_s390_veval' must be a constant integer}} \ 82*8424bf20SUlrich Weigand // expected-note@vecintrin.h:* 13 {{candidate function not viable}} 83*8424bf20SUlrich Weigand // expected-note@vecintrin.h:* 2 {{must be a constant integer}} 84*8424bf20SUlrich Weigand vbs = vec_evaluate(vbs, vbs, vbs, idx); // expected-error {{no matching function}} \ 85*8424bf20SUlrich Weigand // expected-error {{argument to '__builtin_s390_veval' must be a constant integer}} \ 86*8424bf20SUlrich Weigand // expected-note@vecintrin.h:* 13 {{candidate function not viable}} 87*8424bf20SUlrich Weigand // expected-note@vecintrin.h:* 2 {{must be a constant integer}} 88*8424bf20SUlrich Weigand vsi = vec_evaluate(vsi, vsi, vsi, idx); // expected-error {{no matching function}} \ 89*8424bf20SUlrich Weigand // expected-error {{argument to '__builtin_s390_veval' must be a constant integer}} \ 90*8424bf20SUlrich Weigand // expected-note@vecintrin.h:* 14 {{candidate function not viable}} 91*8424bf20SUlrich Weigand // expected-note@vecintrin.h:* 1 {{must be a constant integer}} 92*8424bf20SUlrich Weigand vui = vec_evaluate(vui, vui, vui, idx); // expected-error {{no matching function}} \ 93*8424bf20SUlrich Weigand // expected-error {{argument to '__builtin_s390_veval' must be a constant integer}} \ 94*8424bf20SUlrich Weigand // expected-note@vecintrin.h:* 13 {{candidate function not viable}} 95*8424bf20SUlrich Weigand // expected-note@vecintrin.h:* 2 {{must be a constant integer}} 96*8424bf20SUlrich Weigand vbi = vec_evaluate(vbi, vbi, vbi, idx); // expected-error {{no matching function}} \ 97*8424bf20SUlrich Weigand // expected-error {{argument to '__builtin_s390_veval' must be a constant integer}} \ 98*8424bf20SUlrich Weigand // expected-note@vecintrin.h:* 13 {{candidate function not viable}} 99*8424bf20SUlrich Weigand // expected-note@vecintrin.h:* 2 {{must be a constant integer}} 100*8424bf20SUlrich Weigand vsl = vec_evaluate(vsl, vsl, vsl, idx); // expected-error {{no matching function}} \ 101*8424bf20SUlrich Weigand // expected-error {{argument to '__builtin_s390_veval' must be a constant integer}} \ 102*8424bf20SUlrich Weigand // expected-note@vecintrin.h:* 14 {{candidate function not viable}} 103*8424bf20SUlrich Weigand // expected-note@vecintrin.h:* 1 {{must be a constant integer}} 104*8424bf20SUlrich Weigand vul = vec_evaluate(vul, vul, vul, idx); // expected-error {{no matching function}} \ 105*8424bf20SUlrich Weigand // expected-error {{argument to '__builtin_s390_veval' must be a constant integer}} \ 106*8424bf20SUlrich Weigand // expected-note@vecintrin.h:* 13 {{candidate function not viable}} 107*8424bf20SUlrich Weigand // expected-note@vecintrin.h:* 2 {{must be a constant integer}} 108*8424bf20SUlrich Weigand vbl = vec_evaluate(vbl, vbl, vbl, idx); // expected-error {{no matching function}} \ 109*8424bf20SUlrich Weigand // expected-error {{argument to '__builtin_s390_veval' must be a constant integer}} \ 110*8424bf20SUlrich Weigand // expected-note@vecintrin.h:* 13 {{candidate function not viable}} 111*8424bf20SUlrich Weigand // expected-note@vecintrin.h:* 2 {{must be a constant integer}} 112*8424bf20SUlrich Weigand vslll = vec_evaluate(vslll, vslll, vslll, idx); // expected-error {{no matching function}} \ 113*8424bf20SUlrich Weigand // expected-error {{argument to '__builtin_s390_veval' must be a constant integer}} \ 114*8424bf20SUlrich Weigand // expected-note@vecintrin.h:* 14 {{candidate function not viable}} 115*8424bf20SUlrich Weigand // expected-note@vecintrin.h:* 1 {{must be a constant integer}} 116*8424bf20SUlrich Weigand vulll = vec_evaluate(vulll, vulll, vulll, idx); // expected-error {{no matching function}} \ 117*8424bf20SUlrich Weigand // expected-error {{argument to '__builtin_s390_veval' must be a constant integer}} \ 118*8424bf20SUlrich Weigand // expected-note@vecintrin.h:* 13 {{candidate function not viable}} 119*8424bf20SUlrich Weigand // expected-note@vecintrin.h:* 2 {{must be a constant integer}} 120*8424bf20SUlrich Weigand vblll = vec_evaluate(vblll, vblll, vblll, idx); // expected-error {{no matching function}} \ 121*8424bf20SUlrich Weigand // expected-error {{argument to '__builtin_s390_veval' must be a constant integer}} \ 122*8424bf20SUlrich Weigand // expected-note@vecintrin.h:* 13 {{candidate function not viable}} 123*8424bf20SUlrich Weigand // expected-note@vecintrin.h:* 2 {{must be a constant integer}} 124*8424bf20SUlrich Weigand } 125