brintos

brintos / llvm-project-archived public Read only

0
0
Text · 11.3 KiB · 83af380 Raw
163 lines · c
1// REQUIRES: systemz-registered-target2// 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 %s5 6#include <vecintrin.h>7 8volatile vector signed char vsc;9volatile vector signed short vss;10volatile vector signed int vsi;11volatile vector signed long long vsl;12volatile vector signed __int128 vslll;13volatile vector unsigned char vuc;14volatile vector unsigned short vus;15volatile vector unsigned int vui;16volatile vector unsigned long long vul;17volatile vector unsigned __int128 vulll;18volatile vector bool char vbc;19volatile vector bool short vbs;20volatile vector bool int vbi;21volatile vector bool long long vbl;22volatile vector float vf;23volatile vector double vd;24 25volatile signed char sc;26volatile signed short ss;27volatile signed int si;28volatile signed long long sl;29volatile unsigned char uc;30volatile unsigned short us;31volatile unsigned int ui;32volatile unsigned long long ul;33volatile float f;34volatile double d;35 36const void * volatile cptr;37const signed char * volatile cptrsc;38const signed short * volatile cptrss;39const signed int * volatile cptrsi;40const signed long long * volatile cptrsl;41const unsigned char * volatile cptruc;42const unsigned short * volatile cptrus;43const unsigned int * volatile cptrui;44const unsigned long long * volatile cptrul;45const float * volatile cptrf;46const double * volatile cptrd;47 48void * volatile ptr;49signed char * volatile ptrsc;50signed short * volatile ptrss;51signed int * volatile ptrsi;52signed long long * volatile ptrsl;53unsigned char * volatile ptruc;54unsigned short * volatile ptrus;55unsigned int * volatile ptrui;56unsigned long long * volatile ptrul;57float * volatile ptrf;58double * volatile ptrd;59 60volatile unsigned int len;61volatile int idx;62int cc;63 64void test_integer(void) {65  vsc = vec_sldb(vsc, vsc, idx); // expected-error {{no matching function}} \66                                 // expected-error {{argument to '__builtin_s390_vsld' must be a constant integer}}67                                 // expected-note@vecintrin.h:* 11 {{candidate function not viable}}68                                 // expected-note@vecintrin.h:* 1 {{must be a constant integer from 0 to 7}}69  vuc = vec_sldb(vuc, vuc, idx); // expected-error {{no matching function}} \70                                 // expected-error {{argument to '__builtin_s390_vsld' must be a constant integer}}71                                 // expected-note@vecintrin.h:* 11 {{candidate function not viable}}72                                 // expected-note@vecintrin.h:* 1 {{must be a constant integer from 0 to 7}}73  vss = vec_sldb(vss, vss, idx); // expected-error {{no matching function}} \74                                 // expected-error {{argument to '__builtin_s390_vsld' must be a constant integer}}75                                 // expected-note@vecintrin.h:* 11 {{candidate function not viable}}76                                 // expected-note@vecintrin.h:* 1 {{must be a constant integer from 0 to 7}}77  vus = vec_sldb(vus, vus, idx); // expected-error {{no matching function}} \78                                 // expected-error {{argument to '__builtin_s390_vsld' must be a constant integer}}79                                 // expected-note@vecintrin.h:* 11 {{candidate function not viable}}80                                 // expected-note@vecintrin.h:* 1 {{must be a constant integer from 0 to 7}}81  vsi = vec_sldb(vsi, vsi, idx); // expected-error {{no matching function}} \82                                 // expected-error {{argument to '__builtin_s390_vsld' must be a constant integer}}83                                 // expected-note@vecintrin.h:* 11 {{candidate function not viable}}84                                 // expected-note@vecintrin.h:* 1 {{must be a constant integer from 0 to 7}}85  vui = vec_sldb(vui, vui, idx); // expected-error {{no matching function}} \86                                 // expected-error {{argument to '__builtin_s390_vsld' must be a constant integer}}87                                 // expected-note@vecintrin.h:* 11 {{candidate function not viable}}88                                 // expected-note@vecintrin.h:* 1 {{must be a constant integer from 0 to 7}}89  vsl = vec_sldb(vsl, vsl, idx); // expected-error {{no matching function}} \90                                 // expected-error {{argument to '__builtin_s390_vsld' must be a constant integer}}91                                 // expected-note@vecintrin.h:* 11 {{candidate function not viable}}92                                 // expected-note@vecintrin.h:* 1 {{must be a constant integer from 0 to 7}}93  vul = vec_sldb(vul, vul, idx); // expected-error {{no matching function}} \94                                 // expected-error {{argument to '__builtin_s390_vsld' must be a constant integer}}95                                 // expected-note@vecintrin.h:* 11 {{candidate function not viable}}96                                 // expected-note@vecintrin.h:* 1 {{must be a constant integer from 0 to 7}}97  vslll = vec_sldb(vslll, vslll, idx); // expected-error {{no matching function}} \98                                 // expected-error {{argument to '__builtin_s390_vsld' must be a constant integer}}99                                 // expected-note@vecintrin.h:* 11 {{candidate function not viable}}100                                 // expected-note@vecintrin.h:* 1 {{must be a constant integer from 0 to 7}}101  vulll = vec_sldb(vulll, vulll, idx); // expected-error {{no matching function}} \102                                 // expected-error {{argument to '__builtin_s390_vsld' must be a constant integer}}103                                 // expected-note@vecintrin.h:* 11 {{candidate function not viable}}104                                 // expected-note@vecintrin.h:* 1 {{must be a constant integer from 0 to 7}}105  vf = vec_sldb(vf, vf, idx);    // expected-error {{no matching function}} \106                                 // expected-error {{argument to '__builtin_s390_vsld' must be a constant integer}}107                                 // expected-note@vecintrin.h:* 11 {{candidate function not viable}}108                                 // expected-note@vecintrin.h:* 1 {{must be a constant integer from 0 to 7}}109  vd = vec_sldb(vd, vd, idx);    // expected-error {{no matching function}} \110                                 // expected-error {{argument to '__builtin_s390_vsld' must be a constant integer}}111                                 // expected-note@vecintrin.h:* 11 {{candidate function not viable}}112                                 // expected-note@vecintrin.h:* 1 {{must be a constant integer from 0 to 7}}113 114  vsc = vec_srdb(vsc, vsc, idx); // expected-error {{no matching function}} \115                                 // expected-error {{argument to '__builtin_s390_vsrd' must be a constant integer}}116                                 // expected-note@vecintrin.h:* 11 {{candidate function not viable}}117                                 // expected-note@vecintrin.h:* 1 {{must be a constant integer from 0 to 7}}118  vuc = vec_srdb(vuc, vuc, idx); // expected-error {{no matching function}} \119                                 // expected-error {{argument to '__builtin_s390_vsrd' must be a constant integer}}120                                 // expected-note@vecintrin.h:* 11 {{candidate function not viable}}121                                 // expected-note@vecintrin.h:* 1 {{must be a constant integer from 0 to 7}}122  vss = vec_srdb(vss, vss, idx); // expected-error {{no matching function}} \123                                 // expected-error {{argument to '__builtin_s390_vsrd' must be a constant integer}}124                                 // expected-note@vecintrin.h:* 11 {{candidate function not viable}}125                                 // expected-note@vecintrin.h:* 1 {{must be a constant integer from 0 to 7}}126  vus = vec_srdb(vus, vus, idx); // expected-error {{no matching function}} \127                                 // expected-error {{argument to '__builtin_s390_vsrd' must be a constant integer}}128                                 // expected-note@vecintrin.h:* 11 {{candidate function not viable}}129                                 // expected-note@vecintrin.h:* 1 {{must be a constant integer from 0 to 7}}130  vsi = vec_srdb(vsi, vsi, idx); // expected-error {{no matching function}} \131                                 // expected-error {{argument to '__builtin_s390_vsrd' must be a constant integer}}132                                 // expected-note@vecintrin.h:* 11 {{candidate function not viable}}133                                 // expected-note@vecintrin.h:* 1 {{must be a constant integer from 0 to 7}}134  vui = vec_srdb(vui, vui, idx); // expected-error {{no matching function}} \135                                 // expected-error {{argument to '__builtin_s390_vsrd' must be a constant integer}}136                                 // expected-note@vecintrin.h:* 11 {{candidate function not viable}}137                                 // expected-note@vecintrin.h:* 1 {{must be a constant integer from 0 to 7}}138  vsl = vec_srdb(vsl, vsl, idx); // expected-error {{no matching function}} \139                                 // expected-error {{argument to '__builtin_s390_vsrd' must be a constant integer}}140                                 // expected-note@vecintrin.h:* 11 {{candidate function not viable}}141                                 // expected-note@vecintrin.h:* 1 {{must be a constant integer from 0 to 7}}142  vul = vec_srdb(vul, vul, idx); // expected-error {{no matching function}} \143                                 // expected-error {{argument to '__builtin_s390_vsrd' must be a constant integer}}144                                 // expected-note@vecintrin.h:* 11 {{candidate function not viable}}145                                 // expected-note@vecintrin.h:* 1 {{must be a constant integer from 0 to 7}}146  vslll = vec_srdb(vslll, vslll, idx); // expected-error {{no matching function}} \147                                 // expected-error {{argument to '__builtin_s390_vsrd' must be a constant integer}}148                                 // expected-note@vecintrin.h:* 11 {{candidate function not viable}}149                                 // expected-note@vecintrin.h:* 1 {{must be a constant integer from 0 to 7}}150  vulll = vec_srdb(vulll, vulll, idx); // expected-error {{no matching function}} \151                                 // expected-error {{argument to '__builtin_s390_vsrd' must be a constant integer}}152                                 // expected-note@vecintrin.h:* 11 {{candidate function not viable}}153                                 // expected-note@vecintrin.h:* 1 {{must be a constant integer from 0 to 7}}154  vf = vec_srdb(vf, vf, idx);    // expected-error {{no matching function}} \155                                 // expected-error {{argument to '__builtin_s390_vsrd' must be a constant integer}}156                                 // expected-note@vecintrin.h:* 11 {{candidate function not viable}}157                                 // expected-note@vecintrin.h:* 1 {{must be a constant integer from 0 to 7}}158  vd = vec_srdb(vd, vd, idx);    // expected-error {{no matching function}} \159                                 // expected-error {{argument to '__builtin_s390_vsrd' must be a constant integer}}160                                 // expected-note@vecintrin.h:* 11 {{candidate function not viable}}161                                 // expected-note@vecintrin.h:* 1 {{must be a constant integer from 0 to 7}}162}163