llvm-project
llvm-project copied to clipboard
[RISC-V][SiFive] `sifive_vector.h` doesn't work in C++?
The same code for C works just fine: https://godbolt.org/z/T3WboYvT3 but fails for C++: https://godbolt.org/z/aKP38aTqd
#include <sifive_vector.h>
#define p27_26 (0b11)
#define p11_7 (0b11111)
void test_sf_vc_xv_se_u64m1(vuint64m1_t vs2, uint64_t rs1, size_t vl) {
__riscv_sf_vc_xv_se_u64m1(p27_26, p11_7, vs2, rs1, vl);
}
C++ failure:
<source>:7:3: error: use of undeclared identifier '__riscv_sf_vc_xv_se_u64m1'
7 | __riscv_sf_vc_xv_se_u64m1(p27_26, p11_7, vs2, rs1, vl);
| ^
1 error generated.
Compiler returned: 1
(both compiled with -march=rv64gcv_xsfvcp
)
Am I doing something wrong? Any advice would be welcome! :)
@4vtomat @topperc @kito-cheng Perhaps you have some suggestions since you worked on https://reviews.llvm.org/D148223
@llvm/issue-subscribers-backend-risc-v
cc: @eopXD
Resolving this issue in https://reviews.llvm.org/D154050
Awesome, thank you! 😄
Patch has landed, closing the issue.
@llvm/issue-subscribers-clang-frontend