brintos

brintos / llvm-project-archived public Read only

0
0
Text · 13.8 KiB · 6d39e1a Raw
347 lines · c
1// REQUIRES: riscv-registered-target2// RUN: %clang_cc1 -triple riscv64 -target-feature +f -target-feature +d \3// RUN:   -target-feature +v -target-feature +zfh -target-feature +zvfh \4// RUN:   -fsyntax-only -verify %s5 6#include <riscv_vector.h>7 8vint8m1_t test_vset_v_index_not_constant(vint8m2_t dest, vint8m1_t val, int index) {9  // expected-error@+1 {{argument to '__riscv_vset_v_i8m1_i8m2' must be a constant integer}}10  return __riscv_vset_v_i8m1_i8m2(dest, index, val);11}12 13vint8m2_t test_vset_v_i8m1_i8m2(vint8m2_t dest, vint8m1_t val) {14  // expected-error@+1 {{argument value 2 is outside the valid range [0, 1]}}15  return __riscv_vset_v_i8m1_i8m2(dest, 2, val);16}17 18vint8m4_t test_vset_v_i8m1_i8m4(vint8m4_t dest, vint8m1_t val) {19  // expected-error@+1 {{argument value 4 is outside the valid range [0, 3]}}20  return __riscv_vset_v_i8m1_i8m4(dest, 4, val);21}22 23vint8m4_t test_vset_v_i8m2_i8m4(vint8m4_t dest, vint8m2_t val) {24  // expected-error@+1 {{argument value 2 is outside the valid range [0, 1]}}25  return __riscv_vset_v_i8m2_i8m4(dest, 2, val);26}27 28vint8m8_t test_vset_v_i8m1_i8m8(vint8m8_t dest, vint8m1_t val) {29  // expected-error@+1 {{argument value 8 is outside the valid range [0, 7]}}30  return __riscv_vset_v_i8m1_i8m8(dest, 8, val);31}32 33vint8m8_t test_vset_v_i8m2_i8m8(vint8m8_t dest, vint8m2_t val) {34  // expected-error@+1 {{argument value 4 is outside the valid range [0, 3]}}35  return __riscv_vset_v_i8m2_i8m8(dest, 4, val);36}37 38vint8m8_t test_vset_v_i8m4_i8m8(vint8m8_t dest, vint8m4_t val) {39  // expected-error@+1 {{argument value 2 is outside the valid range [0, 1]}}40  return __riscv_vset_v_i8m4_i8m8(dest, 2, val);41}42 43vint16m2_t test_vset_v_i16m1_i16m2(vint16m2_t dest, vint16m1_t val) {44  // expected-error@+1 {{argument value 2 is outside the valid range [0, 1]}}45  return __riscv_vset_v_i16m1_i16m2(dest, 2, val);46}47 48vint16m4_t test_vset_v_i16m1_i16m4(vint16m4_t dest, vint16m1_t val) {49  // expected-error@+1 {{argument value 4 is outside the valid range [0, 3]}}50  return __riscv_vset_v_i16m1_i16m4(dest, 4, val);51}52 53vint16m4_t test_vset_v_i16m2_i16m4(vint16m4_t dest, vint16m2_t val) {54  // expected-error@+1 {{argument value 2 is outside the valid range [0, 1]}}55  return __riscv_vset_v_i16m2_i16m4(dest, 2, val);56}57 58vint16m8_t test_vset_v_i16m1_i16m8(vint16m8_t dest, vint16m1_t val) {59  // expected-error@+1 {{argument value 8 is outside the valid range [0, 7]}}60  return __riscv_vset_v_i16m1_i16m8(dest, 8, val);61}62 63vint16m8_t test_vset_v_i16m2_i16m8(vint16m8_t dest, vint16m2_t val) {64  // expected-error@+1 {{argument value 4 is outside the valid range [0, 3]}}65  return __riscv_vset_v_i16m2_i16m8(dest, 4, val);66}67 68vint16m8_t test_vset_v_i16m4_i16m8(vint16m8_t dest, vint16m4_t val) {69  // expected-error@+1 {{argument value 2 is outside the valid range [0, 1]}}70  return __riscv_vset_v_i16m4_i16m8(dest, 2, val);71}72 73vint32m2_t test_vset_v_i32m1_i32m2(vint32m2_t dest, vint32m1_t val) {74  // expected-error@+1 {{argument value 2 is outside the valid range [0, 1]}}75  return __riscv_vset_v_i32m1_i32m2(dest, 2, val);76}77 78vint32m4_t test_vset_v_i32m1_i32m4(vint32m4_t dest, vint32m1_t val) {79  // expected-error@+1 {{argument value 4 is outside the valid range [0, 3]}}80  return __riscv_vset_v_i32m1_i32m4(dest, 4, val);81}82 83vint32m4_t test_vset_v_i32m2_i32m4(vint32m4_t dest, vint32m2_t val) {84  // expected-error@+1 {{argument value 2 is outside the valid range [0, 1]}}85  return __riscv_vset_v_i32m2_i32m4(dest, 2, val);86}87 88vint32m8_t test_vset_v_i32m1_i32m8(vint32m8_t dest, vint32m1_t val) {89  // expected-error@+1 {{argument value 8 is outside the valid range [0, 7]}}90  return __riscv_vset_v_i32m1_i32m8(dest, 8, val);91}92 93vint32m8_t test_vset_v_i32m2_i32m8(vint32m8_t dest, vint32m2_t val) {94  // expected-error@+1 {{argument value 4 is outside the valid range [0, 3]}}95  return __riscv_vset_v_i32m2_i32m8(dest, 4, val);96}97 98vint32m8_t test_vset_v_i32m4_i32m8(vint32m8_t dest, vint32m4_t val) {99  // expected-error@+1 {{argument value 2 is outside the valid range [0, 1]}}100  return __riscv_vset_v_i32m4_i32m8(dest, 2, val);101}102 103vint64m2_t test_vset_v_i64m1_i64m2(vint64m2_t dest, vint64m1_t val) {104  // expected-error@+1 {{argument value 2 is outside the valid range [0, 1]}}105  return __riscv_vset_v_i64m1_i64m2(dest, 2, val);106}107 108vint64m4_t test_vset_v_i64m1_i64m4(vint64m4_t dest, vint64m1_t val) {109  // expected-error@+1 {{argument value 4 is outside the valid range [0, 3]}}110  return __riscv_vset_v_i64m1_i64m4(dest, 4, val);111}112 113vint64m4_t test_vset_v_i64m2_i64m4(vint64m4_t dest, vint64m2_t val) {114  // expected-error@+1 {{argument value 2 is outside the valid range [0, 1]}}115  return __riscv_vset_v_i64m2_i64m4(dest, 2, val);116}117 118vint64m8_t test_vset_v_i64m1_i64m8(vint64m8_t dest, vint64m1_t val) {119  // expected-error@+1 {{argument value 8 is outside the valid range [0, 7]}}120  return __riscv_vset_v_i64m1_i64m8(dest, 8, val);121}122 123vint64m8_t test_vset_v_i64m2_i64m8(vint64m8_t dest, vint64m2_t val) {124  // expected-error@+1 {{argument value 4 is outside the valid range [0, 3]}}125  return __riscv_vset_v_i64m2_i64m8(dest, 4, val);126}127 128vint64m8_t test_vset_v_i64m4_i64m8(vint64m8_t dest, vint64m4_t val) {129  // expected-error@+1 {{argument value 2 is outside the valid range [0, 1]}}130  return __riscv_vset_v_i64m4_i64m8(dest, 2, val);131}132 133vuint8m2_t test_vset_v_u8m1_u8m2(vuint8m2_t dest, vuint8m1_t val) {134  // expected-error@+1 {{argument value 2 is outside the valid range [0, 1]}}135  return __riscv_vset_v_u8m1_u8m2(dest, 2, val);136}137 138vuint8m4_t test_vset_v_u8m1_u8m4(vuint8m4_t dest, vuint8m1_t val) {139  // expected-error@+1 {{argument value 4 is outside the valid range [0, 3]}}140  return __riscv_vset_v_u8m1_u8m4(dest, 4, val);141}142 143vuint8m4_t test_vset_v_u8m2_u8m4(vuint8m4_t dest, vuint8m2_t val) {144  // expected-error@+1 {{argument value 2 is outside the valid range [0, 1]}}145  return __riscv_vset_v_u8m2_u8m4(dest, 2, val);146}147 148vuint8m8_t test_vset_v_u8m1_u8m8(vuint8m8_t dest, vuint8m1_t val) {149  // expected-error@+1 {{argument value 8 is outside the valid range [0, 7]}}150  return __riscv_vset_v_u8m1_u8m8(dest, 8, val);151}152 153vuint8m8_t test_vset_v_u8m2_u8m8(vuint8m8_t dest, vuint8m2_t val) {154  // expected-error@+1 {{argument value 4 is outside the valid range [0, 3]}}155  return __riscv_vset_v_u8m2_u8m8(dest, 4, val);156}157 158vuint8m8_t test_vset_v_u8m4_u8m8(vuint8m8_t dest, vuint8m4_t val) {159  // expected-error@+1 {{argument value 2 is outside the valid range [0, 1]}}160  return __riscv_vset_v_u8m4_u8m8(dest, 2, val);161}162 163vuint16m2_t test_vset_v_u16m1_u16m2(vuint16m2_t dest, vuint16m1_t val) {164  // expected-error@+1 {{argument value 2 is outside the valid range [0, 1]}}165  return __riscv_vset_v_u16m1_u16m2(dest, 2, val);166}167 168vuint16m4_t test_vset_v_u16m1_u16m4(vuint16m4_t dest, vuint16m1_t val) {169  // expected-error@+1 {{argument value 4 is outside the valid range [0, 3]}}170  return __riscv_vset_v_u16m1_u16m4(dest, 4, val);171}172 173vuint16m4_t test_vset_v_u16m2_u16m4(vuint16m4_t dest, vuint16m2_t val) {174  // expected-error@+1 {{argument value 2 is outside the valid range [0, 1]}}175  return __riscv_vset_v_u16m2_u16m4(dest, 2, val);176}177 178vuint16m8_t test_vset_v_u16m1_u16m8(vuint16m8_t dest, vuint16m1_t val) {179  // expected-error@+1 {{argument value 8 is outside the valid range [0, 7]}}180  return __riscv_vset_v_u16m1_u16m8(dest, 8, val);181}182 183vuint16m8_t test_vset_v_u16m2_u16m8(vuint16m8_t dest, vuint16m2_t val) {184  // expected-error@+1 {{argument value 4 is outside the valid range [0, 3]}}185  return __riscv_vset_v_u16m2_u16m8(dest, 4, val);186}187 188vuint16m8_t test_vset_v_u16m4_u16m8(vuint16m8_t dest, vuint16m4_t val) {189  // expected-error@+1 {{argument value 2 is outside the valid range [0, 1]}}190  return __riscv_vset_v_u16m4_u16m8(dest, 2, val);191}192 193vuint32m2_t test_vset_v_u32m1_u32m2(vuint32m2_t dest, vuint32m1_t val) {194  // expected-error@+1 {{argument value 2 is outside the valid range [0, 1]}}195  return __riscv_vset_v_u32m1_u32m2(dest, 2, val);196}197 198vuint32m4_t test_vset_v_u32m1_u32m4(vuint32m4_t dest, vuint32m1_t val) {199  // expected-error@+1 {{argument value 4 is outside the valid range [0, 3]}}200  return __riscv_vset_v_u32m1_u32m4(dest, 4, val);201}202 203vuint32m4_t test_vset_v_u32m2_u32m4(vuint32m4_t dest, vuint32m2_t val) {204  // expected-error@+1 {{argument value 2 is outside the valid range [0, 1]}}205  return __riscv_vset_v_u32m2_u32m4(dest, 2, val);206}207 208vuint32m8_t test_vset_v_u32m1_u32m8(vuint32m8_t dest, vuint32m1_t val) {209  // expected-error@+1 {{argument value 8 is outside the valid range [0, 7]}}210  return __riscv_vset_v_u32m1_u32m8(dest, 8, val);211}212 213vuint32m8_t test_vset_v_u32m2_u32m8(vuint32m8_t dest, vuint32m2_t val) {214  // expected-error@+1 {{argument value 4 is outside the valid range [0, 3]}}215  return __riscv_vset_v_u32m2_u32m8(dest, 4, val);216}217 218vuint32m8_t test_vset_v_u32m4_u32m8(vuint32m8_t dest, vuint32m4_t val) {219  // expected-error@+1 {{argument value 2 is outside the valid range [0, 1]}}220  return __riscv_vset_v_u32m4_u32m8(dest, 2, val);221}222 223vuint64m2_t test_vset_v_u64m1_u64m2(vuint64m2_t dest, vuint64m1_t val) {224  // expected-error@+1 {{argument value 2 is outside the valid range [0, 1]}}225  return __riscv_vset_v_u64m1_u64m2(dest, 2, val);226}227 228vuint64m4_t test_vset_v_u64m1_u64m4(vuint64m4_t dest, vuint64m1_t val) {229  // expected-error@+1 {{argument value 4 is outside the valid range [0, 3]}}230  return __riscv_vset_v_u64m1_u64m4(dest, 4, val);231}232 233vuint64m4_t test_vset_v_u64m2_u64m4(vuint64m4_t dest, vuint64m2_t val) {234  // expected-error@+1 {{argument value 2 is outside the valid range [0, 1]}}235  return __riscv_vset_v_u64m2_u64m4(dest, 2, val);236}237 238vuint64m8_t test_vset_v_u64m1_u64m8(vuint64m8_t dest, vuint64m1_t val) {239  // expected-error@+1 {{argument value 8 is outside the valid range [0, 7]}}240  return __riscv_vset_v_u64m1_u64m8(dest, 8, val);241}242 243vuint64m8_t test_vset_v_u64m2_u64m8(vuint64m8_t dest, vuint64m2_t val) {244  // expected-error@+1 {{argument value 4 is outside the valid range [0, 3]}}245  return __riscv_vset_v_u64m2_u64m8(dest, 4, val);246}247 248vuint64m8_t test_vset_v_u64m4_u64m8(vuint64m8_t dest, vuint64m4_t val) {249  // expected-error@+1 {{argument value 2 is outside the valid range [0, 1]}}250  return __riscv_vset_v_u64m4_u64m8(dest, 2, val);251}252 253vfloat32m2_t test_vset_v_f32m1_f32m2(vfloat32m2_t dest, vfloat32m1_t val) {254  // expected-error@+1 {{argument value 2 is outside the valid range [0, 1]}}255  return __riscv_vset_v_f32m1_f32m2(dest, 2, val);256}257 258vfloat32m4_t test_vset_v_f32m1_f32m4(vfloat32m4_t dest, vfloat32m1_t val) {259  // expected-error@+1 {{argument value 4 is outside the valid range [0, 3]}}260  return __riscv_vset_v_f32m1_f32m4(dest, 4, val);261}262 263vfloat32m4_t test_vset_v_f32m2_f32m4(vfloat32m4_t dest, vfloat32m2_t val) {264  // expected-error@+1 {{argument value 2 is outside the valid range [0, 1]}}265  return __riscv_vset_v_f32m2_f32m4(dest, 2, val);266}267 268vfloat32m8_t test_vset_v_f32m1_f32m8(vfloat32m8_t dest, vfloat32m1_t val) {269  // expected-error@+1 {{argument value 8 is outside the valid range [0, 7]}}270  return __riscv_vset_v_f32m1_f32m8(dest, 8, val);271}272 273vfloat32m8_t test_vset_v_f32m2_f32m8(vfloat32m8_t dest, vfloat32m2_t val) {274  // expected-error@+1 {{argument value 4 is outside the valid range [0, 3]}}275  return __riscv_vset_v_f32m2_f32m8(dest, 4, val);276}277 278vfloat32m8_t test_vset_v_f32m4_f32m8(vfloat32m8_t dest, vfloat32m4_t val) {279  // expected-error@+1 {{argument value 2 is outside the valid range [0, 1]}}280  return __riscv_vset_v_f32m4_f32m8(dest, 2, val);281}282 283vfloat64m2_t test_vset_v_f64m1_f64m2(vfloat64m2_t dest, vfloat64m1_t val) {284  // expected-error@+1 {{argument value 2 is outside the valid range [0, 1]}}285  return __riscv_vset_v_f64m1_f64m2(dest, 2, val);286}287 288vfloat64m4_t test_vset_v_f64m1_f64m4(vfloat64m4_t dest, vfloat64m1_t val) {289  // expected-error@+1 {{argument value 4 is outside the valid range [0, 3]}}290  return __riscv_vset_v_f64m1_f64m4(dest, 4, val);291}292 293vfloat64m4_t test_vset_v_f64m2_f64m4(vfloat64m4_t dest, vfloat64m2_t val) {294  // expected-error@+1 {{argument value 2 is outside the valid range [0, 1]}}295  return __riscv_vset_v_f64m2_f64m4(dest, 2, val);296}297 298vfloat64m8_t test_vset_v_f64m1_f64m8(vfloat64m8_t dest, vfloat64m1_t val) {299  // expected-error@+1 {{argument value 8 is outside the valid range [0, 7]}}300  return __riscv_vset_v_f64m1_f64m8(dest, 8, val);301}302 303vfloat64m8_t test_vset_v_f64m2_f64m8(vfloat64m8_t dest, vfloat64m2_t val) {304  // expected-error@+1 {{argument value 4 is outside the valid range [0, 3]}}305  return __riscv_vset_v_f64m2_f64m8(dest, 4, val);306}307 308vfloat64m8_t test_vset_v_f64m4_f64m8(vfloat64m8_t dest, vfloat64m4_t val) {309  // expected-error@+1 {{argument value 2 is outside the valid range [0, 1]}}310  return __riscv_vset_v_f64m4_f64m8(dest, 2, val);311}312 313vfloat16m2_t test_vset_v_f16m1_f16m2(vfloat16m2_t dest, vfloat16m1_t val) {314  // expected-error@+1 {{argument value 2 is outside the valid range [0, 1]}}315  return __riscv_vset_v_f16m1_f16m2(dest, 2, val);316}317 318vfloat16m4_t test_vset_v_f16m1_f16m4(vfloat16m4_t dest, vfloat16m1_t val) {319  // expected-error@+1 {{argument value 4 is outside the valid range [0, 3]}}320  return __riscv_vset_v_f16m1_f16m4(dest, 4, val);321}322 323vfloat16m4_t test_vset_v_f16m2_f16m4(vfloat16m4_t dest, vfloat16m2_t val) {324  // expected-error@+1 {{argument value 2 is outside the valid range [0, 1]}}325  return __riscv_vset_v_f16m2_f16m4(dest, 2, val);326}327 328vfloat16m8_t test_vset_v_f16m1_f16m8(vfloat16m8_t dest, vfloat16m1_t val) {329  // expected-error@+1 {{argument value 8 is outside the valid range [0, 7]}}330  return __riscv_vset_v_f16m1_f16m8(dest, 8, val);331}332 333vfloat16m8_t test_vset_v_f16m2_f16m8(vfloat16m8_t dest, vfloat16m2_t val) {334  // expected-error@+1 {{argument value 4 is outside the valid range [0, 3]}}335  return __riscv_vset_v_f16m2_f16m8(dest, 4, val);336}337 338vfloat16m8_t test_vset_v_f16m4_f16m8(vfloat16m8_t dest, vfloat16m4_t val) {339  // expected-error@+1 {{argument value 2 is outside the valid range [0, 1]}}340  return __riscv_vset_v_f16m4_f16m8(dest, 2, val);341}342 343vint32m1x2_t test_vset_v_i32m1_i32m1x2(vint32m1x2_t dest, vint32m1_t val) {344  // expected-error@+1 {{argument value 2 is outside the valid range [0, 1]}}345  return __riscv_vset_v_i32m1_i32m1x2(dest, 2, val);346}347