Run DCE after a LoopFlatten test to reduce spurious output [nfc]
[llvm-project.git] / clang / test / CodeGen / SystemZ / builtins-systemz-zvector3-error.c
blob135e586f38aea1e590f89c57af3b84bf3c4a1a77
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
6 #include <vecintrin.h>
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;
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;
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;
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;
58 volatile unsigned int len;
59 volatile int idx;
60 int cc;
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 // expected-note@vecintrin.h:* 9 {{candidate function not viable}}
66 // expected-note@vecintrin.h:* 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 // expected-note@vecintrin.h:* 9 {{candidate function not viable}}
70 // expected-note@vecintrin.h:* 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 // expected-note@vecintrin.h:* 9 {{candidate function not viable}}
74 // expected-note@vecintrin.h:* 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 // expected-note@vecintrin.h:* 9 {{candidate function not viable}}
78 // expected-note@vecintrin.h:* 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 // expected-note@vecintrin.h:* 9 {{candidate function not viable}}
82 // expected-note@vecintrin.h:* 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 // expected-note@vecintrin.h:* 9 {{candidate function not viable}}
86 // expected-note@vecintrin.h:* 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 // expected-note@vecintrin.h:* 9 {{candidate function not viable}}
90 // expected-note@vecintrin.h:* 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 // expected-note@vecintrin.h:* 9 {{candidate function not viable}}
94 // expected-note@vecintrin.h:* 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 // expected-note@vecintrin.h:* 9 {{candidate function not viable}}
98 // expected-note@vecintrin.h:* 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 // expected-note@vecintrin.h:* 9 {{candidate function not viable}}
102 // expected-note@vecintrin.h:* 1 {{must be a constant integer from 0 to 7}}
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 // expected-note@vecintrin.h:* 9 {{candidate function not viable}}
107 // expected-note@vecintrin.h:* 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 // expected-note@vecintrin.h:* 9 {{candidate function not viable}}
111 // expected-note@vecintrin.h:* 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 // expected-note@vecintrin.h:* 9 {{candidate function not viable}}
115 // expected-note@vecintrin.h:* 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 // expected-note@vecintrin.h:* 9 {{candidate function not viable}}
119 // expected-note@vecintrin.h:* 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 // expected-note@vecintrin.h:* 9 {{candidate function not viable}}
123 // expected-note@vecintrin.h:* 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 // expected-note@vecintrin.h:* 9 {{candidate function not viable}}
127 // expected-note@vecintrin.h:* 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 // expected-note@vecintrin.h:* 9 {{candidate function not viable}}
131 // expected-note@vecintrin.h:* 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 // expected-note@vecintrin.h:* 9 {{candidate function not viable}}
135 // expected-note@vecintrin.h:* 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 // expected-note@vecintrin.h:* 9 {{candidate function not viable}}
139 // expected-note@vecintrin.h:* 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 // expected-note@vecintrin.h:* 9 {{candidate function not viable}}
143 // expected-note@vecintrin.h:* 1 {{must be a constant integer from 0 to 7}}