| 1 |
// REQUIRES: riscv-registered-target |
| 2 |
// RUN: %clang_cc1 -triple riscv32 -target-feature +v %s -fsyntax-only -verify |
| 3 |
|
| 4 |
#include <riscv_vector.h> |
| 5 |
#include <sifive_vector.h> |
| 6 |
|
| 7 |
vint8m1_t test_vloxei64_v_i8m1(const int8_t *base, vuint64m8_t bindex, size_t vl) { |
| 8 |
return __riscv_vloxei64(base, bindex, vl); // expected-error {{builtin requires at least one of the following extensions: 64bit}} |
| 9 |
} |
| 10 |
|
| 11 |
void test_vsoxei64_v_i8m1(int8_t *base, vuint64m8_t bindex, vint8m1_t value, size_t vl) { |
| 12 |
__riscv_vsoxei64(base, bindex, value, vl); // expected-error {{builtin requires at least one of the following extensions: 64bit}} |
| 13 |
} |
| 14 |
|
| 15 |
void test_xsfvcp_sf_vc_x_se_u64m1(uint64_t rs1, size_t vl) { |
| 16 |
__riscv_sf_vc_x_se_u64m1(1, 1, 1, rs1, vl); // expected-error {{call to undeclared function '__riscv_sf_vc_x_se_u64m1'}} |
| 17 |
} |
| 18 |
|
| 19 |
void test_xsfvqmaccdod(vint32m8_t vd, vint8m1_t vs1, vint8m8_t vs2, size_t vl) { |
| 20 |
__riscv_sf_vqmacc_2x8x2(vd, vs1, vs2, vl); // expected-error {{builtin requires at least one of the following extensions: xsfvqmaccdod}} |
| 21 |
} |
| 22 |
|
| 23 |
void test_xsfvqmaccqoq(vint32m1_t vd, vint8m1_t vs1, vint8mf2_t vs2, size_t vl) { |
| 24 |
__riscv_sf_vqmacc_4x8x4(vd, vs1, vs2, vl); // expected-error {{builtin requires at least one of the following extensions: xsfvqmaccqoq}} |
| 25 |
} |
| 26 |
|
| 27 |
void test_xsfvfwmaccqqq(vfloat32m4_t vd, vbfloat16m1_t vs1, vbfloat16m2_t vs2, size_t vl) { |
| 28 |
// expected-error@-1 {{RISC-V type 'vbfloat16m1_t' (aka '__rvv_bfloat16m1_t') requires the 'zvfbfmin' extension}} |
| 29 |
// expected-error@-2 {{RISC-V type 'vbfloat16m2_t' (aka '__rvv_bfloat16m2_t') requires the 'zvfbfmin' extension}} |
| 30 |
__riscv_sf_vfwmacc_4x4x4(vd, vs1, vs2, vl); // expected-error {{RISC-V type 'vbfloat16m1_t' (aka '__rvv_bfloat16m1_t') requires the 'zvfbfmin' extension}} |
| 31 |
// expected-error@-1 {{RISC-V type 'vbfloat16m2_t' (aka '__rvv_bfloat16m2_t') requires the 'zvfbfmin' extension}} |
| 32 |
// expected-error@-2 {{RISC-V type '__rvv_bfloat16m1_t' requires the 'zvfbfmin' extension}} |
| 33 |
// expected-error@-3 {{RISC-V type '__rvv_bfloat16m2_t' requires the 'zvfbfmin' extension}} |
| 34 |
// expected-error@-4 {{builtin requires at least one of the following extensions: xsfvfwmaccqqq}} |
| 35 |
} |
| 36 |
|
| 37 |
void test_xsfvfnrclipxfqf(vfloat32m1_t vs2, float rs1, size_t vl) { |
| 38 |
__riscv_sf_vfnrclip_x_f_qf(vs2, rs1, vl); // expected-error {{builtin requires at least one of the following extensions: xsfvfnrclipxfqf}} |
| 39 |
} |
| 40 |
|
| 41 |
void test_xsfvfnrclipxufqf(vfloat32mf2_t vs2, float rs1, size_t vl) { |
| 42 |
__riscv_sf_vfnrclip_xu_f_qf(vs2, rs1, 2, vl); // expected-error {{builtin requires at least one of the following extensions: xsfvfnrclipxfqf}} |
| 43 |
} |
| 44 |
|
| 45 |
void test_zvfbfwma_vfwmaccbf16(vfloat32m4_t vd, __bf16 vs1, vbfloat16m2_t vs2, size_t vl) { |
| 46 |
// expected-error@-1 {{RISC-V type 'vbfloat16m2_t' (aka '__rvv_bfloat16m2_t') requires the 'zvfbfmin' extension}} |
| 47 |
__riscv_vfwmaccbf16(vd, vs1, vs2, vl); // expected-error {{RISC-V type 'vbfloat16m2_t' (aka '__rvv_bfloat16m2_t') requires the 'zvfbfmin' extension}} |
| 48 |
// expected-error@-1 {{RISC-V type '__rvv_bfloat16m2_t' requires the 'zvfbfmin' extension}} |
| 49 |
// expected-error@-2 {{builtin requires at least one of the following extensions: zvfbfwma}} |
| 50 |
} |
| 51 |
|
| 52 |
void test_zvfbfmin_vfwcvtbf16(vbfloat16m2_t vs2, size_t vl) { |
| 53 |
// expected-error@-1 {{RISC-V type 'vbfloat16m2_t' (aka '__rvv_bfloat16m2_t') requires the 'zvfbfmin' extension}} |
| 54 |
__riscv_vfwcvtbf16_f_f_v_f32m4(vs2, vl);; // expected-error {{RISC-V type 'vbfloat16m2_t' (aka '__rvv_bfloat16m2_t') requires the 'zvfbfmin' extension}} |
| 55 |
// expected-error@-1 {{RISC-V type '__rvv_bfloat16m2_t' requires the 'zvfbfmin' extension}} |
| 56 |
// expected-error@-2 {{builtin requires at least one of the following extensions: zvfbfmin}} |
| 57 |
} |