• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 // REQUIRES: mips-registered-target
2 // RUN: %clang_cc1 -triple mips-unknown-linux-gnu -fsyntax-only %s \
3 // RUN:            -target-feature +msa -target-feature +fp64 \
4 // RUN:            -verify -mfloat-abi hard -o - 2>&1
5 
6 #include <msa.h>
7 
test(void)8 void test(void) {
9   v16i8 v16i8_a = (v16i8) {0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15};
10   v16i8 v16i8_b = (v16i8) {16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31};
11   v16i8 v16i8_r;
12   v8i16 v8i16_a = (v8i16) {0, 1, 2, 3, 4, 5, 6, 7};
13   v8i16 v8i16_b = (v8i16) {8, 9, 10, 11, 12, 13, 14, 15};
14   v8i16 v8i16_r;
15   v4i32 v4i32_a = (v4i32) {0, 1, 2, 3};
16   v4i32 v4i32_b = (v4i32) {4, 5, 6, 7};
17   v4i32 v4i32_r;
18   v2i64 v2i64_a = (v2i64) {0, 1};
19   v2i64 v2i64_b = (v2i64) {3, 4};
20   v2i64 v2i64_r;
21 
22   v16u8 v16u8_a = (v16u8) {0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15};
23   v16u8 v16u8_r;
24   v8u16 v8u16_a = (v8u16) {0, 1, 2, 3, 4, 5, 6, 7};
25   v8u16 v8u16_r;
26   v4u32 v4u32_a = (v4u32) {0, 1, 2, 3};
27   v4u32 v4u32_r;
28   v2u64 v2u64_a = (v2u64) {0, 1};
29   v2u64 v2u64_r;
30 
31   int int_r;
32   long long ll_r;
33 
34   v16u8_r = __msa_addvi_b(v16u8_a, 32);              // expected-error {{argument value 32 is outside the valid range [0, 31]}}
35   v8u16_r = __msa_addvi_h(v8u16_a, 32);              // expected-error {{argument value 32 is outside the valid range [0, 31]}}
36   v4u32_r = __msa_addvi_w(v4u32_a, 32);              // expected-error {{argument value 32 is outside the valid range [0, 31]}}
37   v2u64_r = __msa_addvi_d(v2u64_a, 32);              // expected-error {{argument value 32 is outside the valid range [0, 31]}}
38 
39   v16i8_r = __msa_andi_b(v16i8_a, 256);              // expected-error {{argument value 256 is outside the valid range [0, 255]}}
40   v8i16_r = __msa_andi_b(v8i16_a, 256);              // expected-error {{argument value 256 is outside the valid range [0, 255]}}
41   v4i32_r = __msa_andi_b(v4i32_a, 256);              // expected-error {{argument value 256 is outside the valid range [0, 255]}}
42   v2i64_r = __msa_andi_b(v2i64_a, 256);              // expected-error {{argument value 256 is outside the valid range [0, 255]}}
43 
44   v16i8_r = __msa_bclri_b(v16i8_a, 8);               // expected-error {{argument value 8 is outside the valid range [0, 7]}}
45   v8i16_r = __msa_bclri_h(v8i16_a, 16);              // expected-error {{argument value 16 is outside the valid range [0, 15]}}
46   v4i32_r = __msa_bclri_w(v4i32_a, 32);              // expected-error {{argument value 32 is outside the valid range [0, 31]}}
47   v2i64_r = __msa_bclri_d(v2i64_a, 64);              // expected-error {{argument value 64 is outside the valid range [0, 63]}}
48 
49   v16i8_r = __msa_binsli_b(v16i8_r, v16i8_a, 8);     // expected-error {{argument value 8 is outside the valid range [0, 7]}}
50   v8i16_r = __msa_binsli_h(v8i16_r, v8i16_a, 16);    // expected-error {{argument value 16 is outside the valid range [0, 15]}}
51   v4i32_r = __msa_binsli_w(v4i32_r, v4i32_a, 32);    // expected-error {{argument value 32 is outside the valid range [0, 31]}}
52   v2i64_r = __msa_binsli_d(v2i64_r, v2i64_a, 64);    // expected-error {{argument value 64 is outside the valid range [0, 63]}}
53 
54   v16i8_r = __msa_binsri_b(v16i8_r, v16i8_a, 8);     // expected-error {{argument value 8 is outside the valid range [0, 7]}}
55   v8i16_r = __msa_binsri_h(v8i16_r, v8i16_a, 16);    // expected-error {{argument value 16 is outside the valid range [0, 15]}}
56   v4i32_r = __msa_binsri_w(v4i32_r, v4i32_a, 32);    // expected-error {{argument value 32 is outside the valid range [0, 31]}}
57   v2i64_r = __msa_binsri_d(v2i64_r, v2i64_a, 64);    // expected-error {{argument value 64 is outside the valid range [0, 63]}}
58 
59   v16i8_r = __msa_bmnzi_b(v16i8_r, v16i8_a, 256);    // expected-error {{argument value 256 is outside the valid range [0, 255]}}
60 
61   v16i8_r = __msa_bmzi_b(v16i8_r, v16i8_a, 256);     // expected-error {{argument value 256 is outside the valid range [0, 255]}}
62 
63   v16i8_r = __msa_bnegi_b(v16i8_a, 8);               // expected-error {{argument value 8 is outside the valid range [0, 7]}}
64   v8i16_r = __msa_bnegi_h(v8i16_a, 16);              // expected-error {{argument value 16 is outside the valid range [0, 15]}}
65   v4i32_r = __msa_bnegi_w(v4i32_a, 32);              // expected-error {{argument value 32 is outside the valid range [0, 31]}}
66   v2i64_r = __msa_bnegi_d(v2i64_a, 64);              // expected-error {{argument value 64 is outside the valid range [0, 63]}}
67 
68   v16i8_r = __msa_bseli_b(v16i8_r, v16i8_a, 256);    // expected-error {{argument value 256 is outside the valid range [0, 255]}}
69 
70   v16i8_r = __msa_bseti_b(v16i8_a, 8);               // expected-error {{argument value 8 is outside the valid range [0, 7]}}
71   v8i16_r = __msa_bseti_h(v8i16_a, 16);              // expected-error {{argument value 16 is outside the valid range [0, 15]}}
72   v4i32_r = __msa_bseti_w(v4i32_a, 32);              // expected-error {{argument value 32 is outside the valid range [0, 31]}}
73   v2i64_r = __msa_bseti_d(v2i64_a, 64);              // expected-error {{argument value 64 is outside the valid range [0, 63]}}
74 
75   v16i8_r = __msa_ceqi_b(v16i8_a, 16);               // expected-error {{argument value 16 is outside the valid range [-16, 15]}}
76   v8i16_r = __msa_ceqi_h(v8i16_a, 16);               // expected-error {{argument value 16 is outside the valid range [-16, 15]}}
77   v4i32_r = __msa_ceqi_w(v4i32_a, 16);               // expected-error {{argument value 16 is outside the valid range [-16, 15]}}
78   v2i64_r = __msa_ceqi_d(v2i64_a, 16);               // expected-error {{argument value 16 is outside the valid range [-16, 15]}}
79 
80   int_r = __msa_cfcmsa(32);                          // expected-error {{argument value 32 is outside the valid range [0, 31]}}
81 
82   v16i8_r = __msa_clei_s_b(v16i8_a, 16);             // expected-error {{argument value 16 is outside the valid range [-16, 15]}}
83   v8i16_r = __msa_clei_s_h(v8i16_a, 16);             // expected-error {{argument value 16 is outside the valid range [-16, 15]}}
84   v4i32_r = __msa_clei_s_w(v4i32_a, 16);             // expected-error {{argument value 16 is outside the valid range [-16, 15]}}
85   v2i64_r = __msa_clei_s_d(v2i64_a, 16);             // expected-error {{argument value 16 is outside the valid range [-16, 15]}}
86 
87   v16u8_r = __msa_clei_u_b(v16u8_a, 32);             // expected-error {{argument value 32 is outside the valid range [0, 31]}}
88   v8u16_r = __msa_clei_u_h(v8u16_a, 32);             // expected-error {{argument value 32 is outside the valid range [0, 31]}}
89   v4u32_r = __msa_clei_u_w(v4u32_a, 32);             // expected-error {{argument value 32 is outside the valid range [0, 31]}}
90   v2u64_r = __msa_clei_u_d(v2u64_a, 32);             // expected-error {{argument value 32 is outside the valid range [0, 31]}}
91 
92   v16i8_r = __msa_clti_s_b(v16i8_a, 16);             // expected-error {{argument value 16 is outside the valid range [-16, 15]}}
93   v8i16_r = __msa_clti_s_h(v8i16_a, 16);             // expected-error {{argument value 16 is outside the valid range [-16, 15]}}
94   v4i32_r = __msa_clti_s_w(v4i32_a, 16);             // expected-error {{argument value 16 is outside the valid range [-16, 15]}}
95   v2i64_r = __msa_clti_s_d(v2i64_a, 16);             // expected-error {{argument value 16 is outside the valid range [-16, 15]}}
96 
97   v16u8_r = __msa_clti_u_b(v16u8_a, 32);             // expected-error {{argument value 32 is outside the valid range [0, 31]}}
98   v8u16_r = __msa_clti_u_h(v8u16_a, 32);             // expected-error {{argument value 32 is outside the valid range [0, 31]}}
99   v4u32_r = __msa_clti_u_w(v4u32_a, 32);             // expected-error {{argument value 32 is outside the valid range [0, 31]}}
100   v2u64_r = __msa_clti_u_d(v2u64_a, 32);             // expected-error {{argument value 32 is outside the valid range [0, 31]}}
101 
102   int_r = __msa_copy_s_b(v16i8_a, 16);               // expected-error {{argument value 16 is outside the valid range [0, 15]}}
103   int_r = __msa_copy_s_h(v8i16_a, 8);                // expected-error {{argument value 8 is outside the valid range [0, 7]}}
104   int_r = __msa_copy_s_w(v4i32_a, 4);                // expected-error {{argument value 4 is outside the valid range [0, 3]}}
105   ll_r  = __msa_copy_s_d(v2i64_a, 2);                // expected-error {{argument value 2 is outside the valid range [0, 1]}}
106 
107   int_r = __msa_copy_u_b(v16u8_a, 16);               // expected-error {{argument value 16 is outside the valid range [0, 15]}}
108   int_r = __msa_copy_u_h(v8u16_a, 8);                // expected-error {{argument value 8 is outside the valid range [0, 7]}}
109   int_r = __msa_copy_u_w(v4u32_a, 4);                // expected-error {{argument value 4 is outside the valid range [0, 3]}}
110   ll_r  = __msa_copy_u_d(v2i64_a, 2);                // expected-error {{argument value 2 is outside the valid range [0, 1]}}
111 
112   __builtin_msa_ctcmsa(32, 777);                     // expected-error {{argument value 32 is outside the valid range [0, 31]}}
113 
114   v16i8_r = __msa_insve_b(v16i8_r, 16, v16i8_a);     // expected-error {{argument value 16 is outside the valid range [0, 15]}}
115   v8i16_r = __msa_insve_h(v8i16_r, 8, v8i16_a);      // expected-error {{argument value 8 is outside the valid range [0, 7]}}
116   v4i32_r = __msa_insve_w(v4i32_r, 4, v4i32_a);      // expected-error {{argument value 4 is outside the valid range [0, 3]}}
117   v2i64_r = __msa_insve_d(v2i64_r, 2, v2i64_a);      // expected-error {{argument value 2 is outside the valid range [0, 1]}}
118 
119   v8i16_r = __msa_ld_h(&v8i16_a, 77);                // expected-error {{argument should be a multiple of 2}}
120   v4i32_r = __msa_ld_w(&v4i32_a, 14);                // expected-error {{argument should be a multiple of 4}}
121   v2i64_r = __msa_ld_d(&v2i64_a, 23);                // expected-error {{argument should be a multiple of 8}}
122 
123   v16i8_r = __msa_ld_b(&v16i8_a, 512);               // expected-error {{argument value 512 is outside the valid range [-512, 511]}}
124   v8i16_r = __msa_ld_h(&v8i16_a, 1024);              // expected-error {{argument value 1024 is outside the valid range [-1024, 1022]}}
125   v4i32_r = __msa_ld_w(&v4i32_a, 2048);              // expected-error {{argument value 2048 is outside the valid range [-2048, 2044]}}
126   v2i64_r = __msa_ld_d(&v2i64_a, 4096);              // expected-error {{argument value 4096 is outside the valid range [-4096, 4088]}}
127 
128   v16i8_r = __msa_ldi_b(256);                        // expected-error {{argument value 256 is outside the valid range [-128, 255]}}
129   v8i16_r = __msa_ldi_h(512);                        // expected-error {{argument value 512 is outside the valid range [-512, 511]}}
130   v4i32_r = __msa_ldi_w(512);                        // expected-error {{argument value 512 is outside the valid range [-512, 511]}}
131   v2i64_r = __msa_ldi_d(512);                        // expected-error {{argument value 512 is outside the valid range [-512, 511]}}
132 
133   v16i8_r = __msa_maxi_s_b(v16i8_a, 16);             // expected-error {{argument value 16 is outside the valid range [-16, 15]}}
134   v8i16_r = __msa_maxi_s_h(v8i16_a, 16);             // expected-error {{argument value 16 is outside the valid range [-16, 15]}}
135   v4i32_r = __msa_maxi_s_w(v4i32_a, 16);             // expected-error {{argument value 16 is outside the valid range [-16, 15]}}
136   v2i64_r = __msa_maxi_s_d(v2i64_a, 16);             // expected-error {{argument value 16 is outside the valid range [-16, 15]}}
137 
138   v16u8_r = __msa_maxi_u_b(v16u8_a, 32);             // expected-error {{argument value 32 is outside the valid range [0, 31]}}
139   v8u16_r = __msa_maxi_u_h(v8u16_a, 32);             // expected-error {{argument value 32 is outside the valid range [0, 31]}}
140   v4u32_r = __msa_maxi_u_w(v4u32_a, 32);             // expected-error {{argument value 32 is outside the valid range [0, 31]}}
141   v2u64_r = __msa_maxi_u_d(v2u64_a, 32);             // expected-error {{argument value 32 is outside the valid range [0, 31]}}
142 
143   v16i8_r = __msa_mini_s_b(v16i8_a, 16);             // expected-error {{argument value 16 is outside the valid range [-16, 15]}}
144   v8i16_r = __msa_mini_s_h(v8i16_a, 16);             // expected-error {{argument value 16 is outside the valid range [-16, 15]}}
145   v4i32_r = __msa_mini_s_w(v4i32_a, 16);             // expected-error {{argument value 16 is outside the valid range [-16, 15]}}
146   v2i64_r = __msa_mini_s_d(v2i64_a, 16);             // expected-error {{argument value 16 is outside the valid range [-16, 15]}}
147 
148   v16u8_r = __msa_mini_u_b(v16u8_a, 32);             // expected-error {{argument value 32 is outside the valid range [0, 31]}}
149   v8u16_r = __msa_mini_u_h(v8u16_a, 32);             // expected-error {{argument value 32 is outside the valid range [0, 31]}}
150   v4u32_r = __msa_mini_u_w(v4u32_a, 32);             // expected-error {{argument value 32 is outside the valid range [0, 31]}}
151   v2u64_r = __msa_mini_u_d(v2u64_a, 32);             // expected-error {{argument value 32 is outside the valid range [0, 31]}}
152 
153   v16i8_r = __msa_nori_b(v16i8_a, 256);              // expected-error {{argument value 256 is outside the valid range [0, 255]}}
154 
155   v16i8_r = __msa_ori_b(v16i8_a, 256);               // expected-error {{argument value 256 is outside the valid range [0, 255]}}
156 
157   v16i8_r = __msa_sat_s_b(v16i8_a, 8);               // expected-error {{argument value 8 is outside the valid range [0, 7]}}
158   v8i16_r = __msa_sat_s_h(v8i16_a, 16);              // expected-error {{argument value 16 is outside the valid range [0, 15]}}
159   v4i32_r = __msa_sat_s_w(v4i32_a, 32);              // expected-error {{argument value 32 is outside the valid range [0, 31]}}
160   v2i64_r = __msa_sat_s_d(v2i64_a, 64);              // expected-error {{argument value 64 is outside the valid range [0, 63]}}
161 
162   v16i8_r = __msa_sat_u_b(v16i8_a, 8);               // expected-error {{argument value 8 is outside the valid range [0, 7]}}
163   v8i16_r = __msa_sat_u_h(v8i16_a, 16);              // expected-error {{argument value 16 is outside the valid range [0, 15]}}
164   v4i32_r = __msa_sat_u_w(v4i32_a, 32);              // expected-error {{argument value 32 is outside the valid range [0, 31]}}
165   v2i64_r = __msa_sat_u_d(v2i64_a, 64);              // expected-error {{argument value 64 is outside the valid range [0, 63]}}
166 
167   v16i8_r = __msa_shf_b(v16i8_a, 256);               // expected-error {{argument value 256 is outside the valid range [0, 255]}}
168   v8i16_r = __msa_shf_h(v8i16_a, 256);               // expected-error {{argument value 256 is outside the valid range [0, 255]}}
169   v4i32_r = __msa_shf_w(v4i32_a, 256);               // expected-error {{argument value 256 is outside the valid range [0, 255]}}
170 
171   v16i8_r = __msa_sldi_b(v16i8_r, v16i8_a, 16);      // expected-error {{argument value 16 is outside the valid range [0, 15]}}
172   v8i16_r = __msa_sldi_h(v8i16_r, v8i16_a, 8);       // expected-error {{argument value 8 is outside the valid range [0, 7]}}
173   v4i32_r = __msa_sldi_w(v4i32_r, v4i32_a, 4);       // expected-error {{argument value 4 is outside the valid range [0, 3]}}
174   v2i64_r = __msa_sldi_d(v2i64_r, v2i64_a, 2);       // expected-error {{argument value 2 is outside the valid range [0, 1]}}
175 
176   v16i8_r = __msa_slli_b(v16i8_a, 8);                // expected-error {{argument value 8 is outside the valid range [0, 7]}}
177   v8i16_r = __msa_slli_h(v8i16_a, 16);               // expected-error {{argument value 16 is outside the valid range [0, 15]}}
178   v4i32_r = __msa_slli_w(v4i32_a, 32);               // expected-error {{argument value 32 is outside the valid range [0, 31]}}
179   v2i64_r = __msa_slli_d(v2i64_a, 64);               // expected-error {{argument value 64 is outside the valid range [0, 63]}}
180 
181   v16i8_r = __msa_splati_b(v16i8_a, 16);             // expected-error {{argument value 16 is outside the valid range [0, 15]}}
182   v8i16_r = __msa_splati_h(v8i16_a, 8);              // expected-error {{argument value 8 is outside the valid range [0, 7]}}
183   v4i32_r = __msa_splati_w(v4i32_a, 4);              // expected-error {{argument value 4 is outside the valid range [0, 3]}}
184   v2i64_r = __msa_splati_d(v2i64_a, 2);              // expected-error {{argument value 2 is outside the valid range [0, 1]}}
185 
186   v16i8_r = __msa_srai_b(v16i8_a, 8);                // expected-error {{argument value 8 is outside the valid range [0, 7]}}
187   v8i16_r = __msa_srai_h(v8i16_a, 16);               // expected-error {{argument value 16 is outside the valid range [0, 15]}}
188   v4i32_r = __msa_srai_w(v4i32_a, 32);               // expected-error {{argument value 32 is outside the valid range [0, 31]}}
189   v2i64_r = __msa_srai_d(v2i64_a, 64);               // expected-error {{argument value 64 is outside the valid range [0, 63]}}
190 
191   v16i8_r = __msa_srari_b(v16i8_a, 8);               // expected-error {{argument value 8 is outside the valid range [0, 7]}}
192   v8i16_r = __msa_srari_h(v8i16_a, 16);              // expected-error {{argument value 16 is outside the valid range [0, 15]}}
193   v4i32_r = __msa_srari_w(v4i32_a, 32);              // expected-error {{argument value 32 is outside the valid range [0, 31]}}
194   v2i64_r = __msa_srari_d(v2i64_a, 64);              // expected-error {{argument value 64 is outside the valid range [0, 63]}}
195 
196   v16i8_r = __msa_srli_b(v16i8_a, 8);                // expected-error {{argument value 8 is outside the valid range [0, 7]}}
197   v8i16_r = __msa_srli_h(v8i16_a, 16);               // expected-error {{argument value 16 is outside the valid range [0, 15]}}
198   v4i32_r = __msa_srli_w(v4i32_a, 32);               // expected-error {{argument value 32 is outside the valid range [0, 31]}}
199   v2i64_r = __msa_srli_d(v2i64_a, 64);               // expected-error {{argument value 64 is outside the valid range [0, 63]}}
200 
201   v16i8_r = __msa_srlri_b(v16i8_a, 8);               // expected-error {{argument value 8 is outside the valid range [0, 7]}}
202   v8i16_r = __msa_srlri_h(v8i16_a, 16);              // expected-error {{argument value 16 is outside the valid range [0, 15]}}
203   v4i32_r = __msa_srlri_w(v4i32_a, 32);              // expected-error {{argument value 32 is outside the valid range [0, 31]}}
204   v2i64_r = __msa_srlri_d(v2i64_a, 64);              // expected-error {{argument value 64 is outside the valid range [0, 63]}}
205 
206   __msa_st_h(v8i16_b, &v8i16_a, 51);                // expected-error {{argument should be a multiple of 2}}
207   __msa_st_w(v4i32_b, &v4i32_a, 51);                // expected-error {{argument should be a multiple of 4}}
208   __msa_st_d(v2i64_b, &v2i64_a, 12);                // expected-error {{argument should be a multiple of 8}}
209 
210   __msa_st_b(v16i8_b, &v16i8_a, 512);                // expected-error {{argument value 512 is outside the valid range [-512, 511]}}
211   __msa_st_h(v8i16_b, &v8i16_a, 1024);                // expected-error {{argument value 1024 is outside the valid range [-1024, 1022]}}
212   __msa_st_w(v4i32_b, &v4i32_a, 2048);                // expected-error {{argument value 2048 is outside the valid range [-2048, 2044]}}
213   __msa_st_d(v2i64_b, &v2i64_a, 4096);                // expected-error {{argument value 4096 is outside the valid range [-4096, 4088]}}
214 
215   v16i8_r = __msa_subvi_b(v16i8_a, 256);             // expected-error {{argument value 256 is outside the valid range [0, 31]}}
216   v8i16_r = __msa_subvi_h(v8i16_a, 256);             // expected-error {{argument value 256 is outside the valid range [0, 31]}}
217   v4i32_r = __msa_subvi_w(v4i32_a, 256);             // expected-error {{argument value 256 is outside the valid range [0, 31]}}
218   v2i64_r = __msa_subvi_d(v2i64_a, 256);             // expected-error {{argument value 256 is outside the valid range [0, 31]}}
219 
220   v16i8_r = __msa_xori_b(v16i8_a, 256);              // expected-error {{argument value 256 is outside the valid range [0, 255]}}
221   v8i16_r = __msa_xori_b(v8i16_a, 256);              // expected-error {{argument value 256 is outside the valid range [0, 255]}}
222   v4i32_r = __msa_xori_b(v4i32_a, 256);              // expected-error {{argument value 256 is outside the valid range [0, 255]}}
223   v2i64_r = __msa_xori_b(v2i64_a, 256);              // expected-error {{argument value 256 is outside the valid range [0, 255]}}
224 
225   v16u8_r = __msa_xori_b(v16u8_a, 256);              // expected-error {{argument value 256 is outside the valid range [0, 255]}}
226   v8u16_r = __msa_xori_b(v8u16_a, 256);              // expected-error {{argument value 256 is outside the valid range [0, 255]}}
227   v4u32_r = __msa_xori_b(v4u32_a, 256);              // expected-error {{argument value 256 is outside the valid range [0, 255]}}
228   v2u64_r = __msa_xori_b(v2u64_a, 256);              // expected-error {{argument value 256 is outside the valid range [0, 255]}}
229 
230   // Test the lower bounds
231 
232   v16u8_r = __msa_addvi_b(v16u8_a, -1);              // expected-error {{argument value 4294967295 is outside the valid range [0, 31]}}
233   v8u16_r = __msa_addvi_h(v8u16_a, -1);              // expected-error {{argument value 4294967295 is outside the valid range [0, 31]}}
234   v4u32_r = __msa_addvi_w(v4u32_a, -1);              // expected-error {{argument value 4294967295 is outside the valid range [0, 31]}}
235   v2u64_r = __msa_addvi_d(v2u64_a, -1);              // expected-error {{argument value 4294967295 is outside the valid range [0, 31]}}
236 
237   v16i8_r = __msa_andi_b(v16i8_a, -1);               // expected-error {{argument value 4294967295 is outside the valid range [0, 255]}}
238   v8i16_r = __msa_andi_b(v8i16_a, -1);               // expected-error {{argument value 4294967295 is outside the valid range [0, 255]}}
239   v4i32_r = __msa_andi_b(v4i32_a, -1);               // expected-error {{argument value 4294967295 is outside the valid range [0, 255]}}
240   v2i64_r = __msa_andi_b(v2i64_a, -1);               // expected-error {{argument value 4294967295 is outside the valid range [0, 255]}}
241 
242   v16i8_r = __msa_bclri_b(v16i8_a, -1);              // expected-error {{argument value 4294967295 is outside the valid range [0, 7]}}
243   v8i16_r = __msa_bclri_h(v8i16_a, -1);              // expected-error {{argument value 4294967295 is outside the valid range [0, 15]}}
244   v4i32_r = __msa_bclri_w(v4i32_a, -1);              // expected-error {{argument value 4294967295 is outside the valid range [0, 31]}}
245   v2i64_r = __msa_bclri_d(v2i64_a, -1);              // expected-error {{argument value 4294967295 is outside the valid range [0, 63]}}
246 
247   v16i8_r = __msa_binsli_b(v16i8_r, v16i8_a, -1);    // expected-error {{argument value 4294967295 is outside the valid range [0, 7]}}
248   v8i16_r = __msa_binsli_h(v8i16_r, v8i16_a, -1);    // expected-error {{argument value 4294967295 is outside the valid range [0, 15]}}
249   v4i32_r = __msa_binsli_w(v4i32_r, v4i32_a, -1);    // expected-error {{argument value 4294967295 is outside the valid range [0, 31]}}
250   v2i64_r = __msa_binsli_d(v2i64_r, v2i64_a, -1);    // expected-error {{argument value 4294967295 is outside the valid range [0, 63]}}
251 
252   v16i8_r = __msa_binsri_b(v16i8_r, v16i8_a, -1);    // expected-error {{argument value 4294967295 is outside the valid range [0, 7]}}
253   v8i16_r = __msa_binsri_h(v8i16_r, v8i16_a, -1);    // expected-error {{argument value 4294967295 is outside the valid range [0, 15]}}
254   v4i32_r = __msa_binsri_w(v4i32_r, v4i32_a, -1);    // expected-error {{argument value 4294967295 is outside the valid range [0, 31]}}
255   v2i64_r = __msa_binsri_d(v2i64_r, v2i64_a, -1);    // expected-error {{argument value 4294967295 is outside the valid range [0, 63]}}
256 
257   v16i8_r = __msa_bmnzi_b(v16i8_r, v16i8_a, -1);     // expected-error {{argument value 4294967295 is outside the valid range [0, 255]}}
258 
259   v16i8_r = __msa_bmzi_b(v16i8_r, v16i8_a, -1);      // expected-error {{argument value 4294967295 is outside the valid range [0, 255]}}
260 
261   v16i8_r = __msa_bnegi_b(v16i8_a, -1);              // expected-error {{argument value 4294967295 is outside the valid range [0, 7]}}
262   v8i16_r = __msa_bnegi_h(v8i16_a, -1);              // expected-error {{argument value 4294967295 is outside the valid range [0, 15]}}
263   v4i32_r = __msa_bnegi_w(v4i32_a, -1);              // expected-error {{argument value 4294967295 is outside the valid range [0, 31]}}
264   v2i64_r = __msa_bnegi_d(v2i64_a, -1);              // expected-error {{argument value 4294967295 is outside the valid range [0, 63]}}
265 
266   v16i8_r = __msa_bseli_b(v16i8_r, v16i8_a, -1);     // expected-error {{argument value 4294967295 is outside the valid range [0, 255]}}
267 
268   v16i8_r = __msa_bseti_b(v16i8_a, -1);              // expected-error {{argument value 4294967295 is outside the valid range [0, 7]}}
269   v8i16_r = __msa_bseti_h(v8i16_a, -1);              // expected-error {{argument value 4294967295 is outside the valid range [0, 15]}}
270   v4i32_r = __msa_bseti_w(v4i32_a, -1);              // expected-error {{argument value 4294967295 is outside the valid range [0, 31]}}
271   v2i64_r = __msa_bseti_d(v2i64_a, -1);              // expected-error {{argument value 4294967295 is outside the valid range [0, 63]}}
272 
273   v16i8_r = __msa_ceqi_b(v16i8_a, -17);              // expected-error {{argument value -17 is outside the valid range [-16, 15]}}
274   v8i16_r = __msa_ceqi_h(v8i16_a, -17);              // expected-error {{argument value -17 is outside the valid range [-16, 15]}}
275   v4i32_r = __msa_ceqi_w(v4i32_a, -17);              // expected-error {{argument value -17 is outside the valid range [-16, 15]}}
276   v2i64_r = __msa_ceqi_d(v2i64_a, -17);              // expected-error {{argument value -17 is outside the valid range [-16, 15]}}
277 
278   v16i8_r = __msa_clei_s_b(v16i8_a, -17);            // expected-error {{argument value -17 is outside the valid range [-16, 15]}}
279   v8i16_r = __msa_clei_s_h(v8i16_a, -17);            // expected-error {{argument value -17 is outside the valid range [-16, 15]}}
280   v4i32_r = __msa_clei_s_w(v4i32_a, -17);            // expected-error {{argument value -17 is outside the valid range [-16, 15]}}
281   v2i64_r = __msa_clei_s_d(v2i64_a, -17);            // expected-error {{argument value -17 is outside the valid range [-16, 15]}}
282 
283   v16u8_r = __msa_clei_u_b(v16u8_a, -1);             // expected-error {{argument value 4294967295 is outside the valid range [0, 31]}}
284   v8u16_r = __msa_clei_u_h(v8u16_a, -1);             // expected-error {{argument value 4294967295 is outside the valid range [0, 31]}}
285   v4u32_r = __msa_clei_u_w(v4u32_a, -1);             // expected-error {{argument value 4294967295 is outside the valid range [0, 31]}}
286   v2u64_r = __msa_clei_u_d(v2u64_a, -1);             // expected-error {{argument value 4294967295 is outside the valid range [0, 31]}}
287 
288   v16i8_r = __msa_clti_s_b(v16i8_a, -17);            // expected-error {{argument value -17 is outside the valid range [-16, 15]}}
289   v8i16_r = __msa_clti_s_h(v8i16_a, -17);            // expected-error {{argument value -17 is outside the valid range [-16, 15]}}
290   v4i32_r = __msa_clti_s_w(v4i32_a, -17);            // expected-error {{argument value -17 is outside the valid range [-16, 15]}}
291   v2i64_r = __msa_clti_s_d(v2i64_a, -17);            // expected-error {{argument value -17 is outside the valid range [-16, 15]}}
292 
293   v16u8_r = __msa_clti_u_b(v16u8_a, -1);             // expected-error {{argument value 4294967295 is outside the valid range [0, 31]}}
294   v8u16_r = __msa_clti_u_h(v8u16_a, -1);             // expected-error {{argument value 4294967295 is outside the valid range [0, 31]}}
295   v4u32_r = __msa_clti_u_w(v4u32_a, -1);             // expected-error {{argument value 4294967295 is outside the valid range [0, 31]}}
296   v2u64_r = __msa_clti_u_d(v2u64_a, -1);             // expected-error {{argument value 4294967295 is outside the valid range [0, 31]}}
297 
298   int_r = __msa_copy_s_b(v16i8_a, -1);               // expected-error {{argument value 4294967295 is outside the valid range [0, 15]}}
299   int_r = __msa_copy_s_h(v8i16_a, -1);               // expected-error {{argument value 4294967295 is outside the valid range [0, 7]}}
300   int_r = __msa_copy_s_w(v4i32_a, -1);               // expected-error {{argument value 4294967295 is outside the valid range [0, 3]}}
301   ll_r  = __msa_copy_s_d(v2i64_a, -1);               // expected-error {{argument value 4294967295 is outside the valid range [0, 1]}}
302 
303   int_r = __msa_copy_u_b(v16u8_a, -1);               // expected-error {{argument value 4294967295 is outside the valid range [0, 15]}}
304   int_r = __msa_copy_u_h(v8u16_a, -1);               // expected-error {{argument value 4294967295 is outside the valid range [0, 7]}}
305   int_r = __msa_copy_u_w(v4u32_a, -1);               // expected-error {{argument value 4294967295 is outside the valid range [0, 3]}}
306   ll_r  = __msa_copy_u_d(v2i64_a, -1);               // expected-error {{argument value 4294967295 is outside the valid range [0, 1]}}
307 
308   v16i8_r = __msa_insve_b(v16i8_r, 16, v16i8_a);     // expected-error {{argument value 16 is outside the valid range [0, 15]}}
309   v8i16_r = __msa_insve_h(v8i16_r, 8, v8i16_a);      // expected-error {{argument value 8 is outside the valid range [0, 7]}}
310   v4i32_r = __msa_insve_w(v4i32_r, 4, v4i32_a);      // expected-error {{argument value 4 is outside the valid range [0, 3]}}
311   v2i64_r = __msa_insve_d(v2i64_r, 2, v2i64_a);      // expected-error {{argument value 2 is outside the valid range [0, 1]}}
312 
313   v16i8_r = __msa_ld_b(&v16i8_a, -513);              // expected-error {{argument value -513 is outside the valid range [-512, 511]}}
314   v8i16_r = __msa_ld_h(&v8i16_a, -1028);              // expected-error {{argument value -1028 is outside the valid range [-1024, 1022]}}
315   v4i32_r = __msa_ld_w(&v4i32_a, -2052);              // expected-error {{argument value -2052 is outside the valid range [-2048, 2044]}}
316   v2i64_r = __msa_ld_d(&v2i64_a, -4104);              // expected-error {{argument value -4104 is outside the valid range [-4096, 4088]}}
317 
318   v16i8_r = __msa_ldi_b(-129);                       // expected-error {{argument value -129 is outside the valid range [-128, 255]}}
319   v8i16_r = __msa_ldi_h(-513);                       // expected-error {{argument value -513 is outside the valid range [-512, 511]}}
320   v4i32_r = __msa_ldi_w(-513);                       // expected-error {{argument value -513 is outside the valid range [-512, 511]}}
321   v2i64_r = __msa_ldi_d(-513);                       // expected-error {{argument value -513 is outside the valid range [-512, 511]}}
322 
323   v16i8_r = __msa_maxi_s_b(v16i8_a, -17);            // expected-error {{argument value -17 is outside the valid range [-16, 15]}}
324   v8i16_r = __msa_maxi_s_h(v8i16_a, -17);            // expected-error {{argument value -17 is outside the valid range [-16, 15]}}
325   v4i32_r = __msa_maxi_s_w(v4i32_a, -17);            // expected-error {{argument value -17 is outside the valid range [-16, 15]}}
326   v2i64_r = __msa_maxi_s_d(v2i64_a, -17);            // expected-error {{argument value -17 is outside the valid range [-16, 15]}}
327 
328   v16u8_r = __msa_maxi_u_b(v16u8_a, -1);             // expected-error {{argument value -1 is outside the valid range [0, 31]}}
329   v8u16_r = __msa_maxi_u_h(v8u16_a, -1);             // expected-error {{argument value -1 is outside the valid range [0, 31]}}
330   v4u32_r = __msa_maxi_u_w(v4u32_a, -1);             // expected-error {{argument value -1 is outside the valid range [0, 31]}}
331   v2u64_r = __msa_maxi_u_d(v2u64_a, -1);             // expected-error {{argument value -1 is outside the valid range [0, 31]}}
332 
333   v16i8_r = __msa_mini_s_b(v16i8_a, -17);            // expected-error {{argument value -17 is outside the valid range [-16, 15]}}
334   v8i16_r = __msa_mini_s_h(v8i16_a, -17);            // expected-error {{argument value -17 is outside the valid range [-16, 15]}}
335   v4i32_r = __msa_mini_s_w(v4i32_a, -17);            // expected-error {{argument value -17 is outside the valid range [-16, 15]}}
336   v2i64_r = __msa_mini_s_d(v2i64_a, -17);            // expected-error {{argument value -17 is outside the valid range [-16, 15]}}
337 
338   v16u8_r = __msa_mini_u_b(v16u8_a, -1);             // expected-error {{argument value -1 is outside the valid range [0, 31]}}
339   v8u16_r = __msa_mini_u_h(v8u16_a, -1);             // expected-error {{argument value -1 is outside the valid range [0, 31]}}
340   v4u32_r = __msa_mini_u_w(v4u32_a, -1);             // expected-error {{argument value -1 is outside the valid range [0, 31]}}
341   v2u64_r = __msa_mini_u_d(v2u64_a, -1);             // expected-error {{argument value -1 is outside the valid range [0, 31]}}
342 
343   v16i8_r = __msa_nori_b(v16i8_a, -1);               // expected-error {{argument value 4294967295 is outside the valid range [0, 255]}}
344 
345   v16i8_r = __msa_ori_b(v16i8_a, -1);                // expected-error {{argument value 4294967295 is outside the valid range [0, 255]}}
346 
347   v16i8_r = __msa_sat_s_b(v16i8_a, -1);              // expected-error {{argument value 4294967295 is outside the valid range [0, 7]}}
348   v8i16_r = __msa_sat_s_h(v8i16_a, -1);              // expected-error {{argument value 4294967295 is outside the valid range [0, 15]}}
349   v4i32_r = __msa_sat_s_w(v4i32_a, -1);              // expected-error {{argument value 4294967295 is outside the valid range [0, 31]}}
350   v2i64_r = __msa_sat_s_d(v2i64_a, -1);              // expected-error {{argument value 4294967295 is outside the valid range [0, 63]}}
351 
352   v16i8_r = __msa_sat_u_b(v16i8_a, -8);              // expected-error {{argument value 4294967288 is outside the valid range [0, 7]}}
353   v8i16_r = __msa_sat_u_h(v8i16_a, -17);             // expected-error {{argument value 4294967279 is outside the valid range [0, 15]}}
354   v4i32_r = __msa_sat_u_w(v4i32_a, -32);             // expected-error {{argument value 4294967264 is outside the valid range [0, 31]}}
355   v2i64_r = __msa_sat_u_d(v2i64_a, -64);             // expected-error {{argument value 4294967232 is outside the valid range [0, 63]}}
356 
357   v16i8_r = __msa_shf_b(v16i8_a, -1);                // expected-error {{argument value 4294967295 is outside the valid range [0, 255]}}
358   v8i16_r = __msa_shf_h(v8i16_a, -1);                // expected-error {{argument value 4294967295 is outside the valid range [0, 255]}}
359   v4i32_r = __msa_shf_w(v4i32_a, -1);                // expected-error {{argument value 4294967295 is outside the valid range [0, 255]}}
360 
361   v16i8_r = __msa_sldi_b(v16i8_r, v16i8_a, -17);     // expected-error {{argument value 4294967279 is outside the valid range [0, 15]}}
362   v8i16_r = __msa_sldi_h(v8i16_r, v8i16_a, -8);      // expected-error {{argument value 4294967288 is outside the valid range [0, 7]}}
363   v4i32_r = __msa_sldi_w(v4i32_r, v4i32_a, -4);      // expected-error {{argument value 4294967292 is outside the valid range [0, 3]}}
364   v2i64_r = __msa_sldi_d(v2i64_r, v2i64_a, -2);      // expected-error {{argument value 4294967294 is outside the valid range [0, 1]}}
365 
366   v16i8_r = __msa_slli_b(v16i8_a, -8);               // expected-error {{argument value 4294967288 is outside the valid range [0, 7]}}
367   v8i16_r = __msa_slli_h(v8i16_a, -17);              // expected-error {{argument value 4294967279 is outside the valid range [0, 15]}}
368   v4i32_r = __msa_slli_w(v4i32_a, -32);              // expected-error {{argument value 4294967264 is outside the valid range [0, 31]}}
369   v2i64_r = __msa_slli_d(v2i64_a, -64);              // expected-error {{argument value 4294967232 is outside the valid range [0, 63]}}
370 
371   v16i8_r = __msa_splati_b(v16i8_a, -17);            // expected-error {{argument value 4294967279 is outside the valid range [0, 15]}}
372   v8i16_r = __msa_splati_h(v8i16_a, -8);             // expected-error {{argument value 4294967288 is outside the valid range [0, 7]}}
373   v4i32_r = __msa_splati_w(v4i32_a, -4);             // expected-error {{argument value 4294967292 is outside the valid range [0, 3]}}
374   v2i64_r = __msa_splati_d(v2i64_a, -2);             // expected-error {{argument value 4294967294 is outside the valid range [0, 1]}}
375 
376   v16i8_r = __msa_srai_b(v16i8_a, -8);               // expected-error {{argument value 4294967288 is outside the valid range [0, 7]}}
377   v8i16_r = __msa_srai_h(v8i16_a, -17);              // expected-error {{argument value 4294967279 is outside the valid range [0, 15]}}
378   v4i32_r = __msa_srai_w(v4i32_a, -32);              // expected-error {{argument value 4294967264 is outside the valid range [0, 31]}}
379   v2i64_r = __msa_srai_d(v2i64_a, -64);              // expected-error {{argument value 4294967232 is outside the valid range [0, 63]}}
380 
381   v16i8_r = __msa_srari_b(v16i8_a, -8);              // expected-error {{argument value 4294967288 is outside the valid range [0, 7]}}
382   v8i16_r = __msa_srari_h(v8i16_a, -17);             // expected-error {{argument value 4294967279 is outside the valid range [0, 15]}}
383   v4i32_r = __msa_srari_w(v4i32_a, -32);             // expected-error {{argument value 4294967264 is outside the valid range [0, 31]}}
384   v2i64_r = __msa_srari_d(v2i64_a, -64);             // expected-error {{argument value 4294967232 is outside the valid range [0, 63]}}
385 
386   v16i8_r = __msa_srli_b(v16i8_a, -8);               // expected-error {{argument value 4294967288 is outside the valid range [0, 7]}}
387   v8i16_r = __msa_srli_h(v8i16_a, -17);              // expected-error {{argument value 4294967279 is outside the valid range [0, 15]}}
388   v4i32_r = __msa_srli_w(v4i32_a, -32);              // expected-error {{argument value 4294967264 is outside the valid range [0, 31]}}
389   v2i64_r = __msa_srli_d(v2i64_a, -64);              // expected-error {{argument value 4294967232 is outside the valid range [0, 63]}}
390 
391   v16i8_r = __msa_srlri_b(v16i8_a, -8);              // expected-error {{argument value 4294967288 is outside the valid range [0, 7]}}
392   v8i16_r = __msa_srlri_h(v8i16_a, -17);             // expected-error {{argument value 4294967279 is outside the valid range [0, 15]}}
393   v4i32_r = __msa_srlri_w(v4i32_a, -32);             // expected-error {{argument value 4294967264 is outside the valid range [0, 31]}}
394   v2i64_r = __msa_srlri_d(v2i64_a, -64);             // expected-error {{argument value 4294967232 is outside the valid range [0, 63]}}
395 
396   __msa_st_b(v16i8_b, &v16i8_a, -513);               // expected-error {{argument value -513 is outside the valid range [-512, 511]}}
397   __msa_st_h(v8i16_b, &v8i16_a, -1025);               // expected-error {{argument value -1025 is outside the valid range [-1024, 1022]}}
398   __msa_st_w(v4i32_b, &v4i32_a, -2049);               // expected-error {{argument value -2049 is outside the valid range [-2048, 2044]}}
399   __msa_st_d(v2i64_b, &v2i64_a, -4097);               // expected-error {{argument value -4097 is outside the valid range [-4096, 4088]}}
400 
401   v16i8_r = __msa_subvi_b(v16i8_a, -1);              // expected-error {{argument value 4294967295 is outside the valid range [0, 31]}}
402   v8i16_r = __msa_subvi_h(v8i16_a, -1);              // expected-error {{argument value 4294967295 is outside the valid range [0, 31]}}
403   v4i32_r = __msa_subvi_w(v4i32_a, -1);              // expected-error {{argument value 4294967295 is outside the valid range [0, 31]}}
404   v2i64_r = __msa_subvi_d(v2i64_a, -1);              // expected-error {{argument value 4294967295 is outside the valid range [0, 31]}}
405 
406   v16i8_r = __msa_xori_b(v16i8_a, -1);               // expected-error {{argument value 4294967295 is outside the valid range [0, 255]}}
407   v8i16_r = __msa_xori_b(v8i16_a, -1);               // expected-error {{argument value 4294967295 is outside the valid range [0, 255]}}
408   v4i32_r = __msa_xori_b(v4i32_a, -1);               // expected-error {{argument value 4294967295 is outside the valid range [0, 255]}}
409   v2i64_r = __msa_xori_b(v2i64_a, -1);               // expected-error {{argument value 4294967295 is outside the valid range [0, 255]}}
410 
411   v16u8_r = __msa_xori_b(v16u8_a, -1);               // expected-error {{argument value 4294967295 is outside the valid range [0, 255]}}
412   v8u16_r = __msa_xori_b(v8u16_a, -1);               // expected-error {{argument value 4294967295 is outside the valid range [0, 255]}}
413   v4u32_r = __msa_xori_b(v4u32_a, -1);               // expected-error {{argument value 4294967295 is outside the valid range [0, 255]}}
414   v2u64_r = __msa_xori_b(v2u64_a, -1);               // expected-error {{argument value 4294967295 is outside the valid range [0, 255]}}
415 
416 }
417