[clang-cl] Ignore /Wv and /Wv:17 flags
[llvm-project.git] / clang / test / Sema / builtins-mips-features.c
blob4ea36d7f24dc07824f6fd237db0c9f2c10396d93
1 // REQUIRES: mips-registered-target
2 // RUN: %clang_cc1 -triple mips64 -fsyntax-only -verify %s
4 typedef signed char v4i8 __attribute__ ((vector_size(4)));
5 typedef signed char v4q7 __attribute__ ((vector_size(4)));
6 typedef signed char v16i8 __attribute__((vector_size(16), aligned(16)));
7 typedef unsigned char v16u8 __attribute__((vector_size(16), aligned(16)));
9 void dsp() {
10 v4i8 a;
11 void* p;
13 // expected-error@+1 {{this builtin requires 'dsp' ASE, please use -mdsp}}
14 __builtin_mips_addu_qb(a, a);
15 // expected-error@+1 {{this builtin requires 'dsp' ASE, please use -mdsp}}
16 __builtin_mips_lwx(p, 32);
19 void dspr2() {
20 v4i8 a;
21 v4q7 b;
23 // expected-error@+1 {{this builtin requires 'dsp r2' ASE, please use -mdspr2}}
24 __builtin_mips_absq_s_qb(b);
25 // expected-error@+1 {{this builtin requires 'dsp r2' ASE, please use -mdspr2}}
26 __builtin_mips_subuh_r_qb(a, a);
29 void msa() {
30 v16i8 a;
31 v16u8 b;
33 // expected-error@+1 {{this builtin requires 'msa' ASE, please use -mmsa}}
34 __builtin_msa_add_a_b(a, a);
35 // expected-error@+1 {{this builtin requires 'msa' ASE, please use -mmsa}}
36 __builtin_msa_xori_b(b, 5);