Issue |
125154
|
Summary |
__riscv_vsetvlmax_e64m1 & co not available with attribute target arch=+v
|
Labels |
new issue
|
Assignees |
|
Reporter |
dzaima
|
Copying out of https://github.com/llvm/llvm-project/issues/56592:
The following fails to compile with `-march=rv64gc`, despite working with `-march=rv64gcv`, which should be what the `__attribute__` achieves:
```
#include<riscv_vector.h>
__attribute__((target("arch=+v")))
int vl_e64m1() {
return __riscv_vsetvlmax_e64m1();
}
```
https://godbolt.org/z/rPnh5zYE5
I believe this would be because these definitions are preprocessor-gated: https://github.com/llvm/llvm-project/blob/33c42f8bc5615b4dc46cb45ab41da97be52474ec/clang/include/clang/Basic/riscv_vector.td#L637-L675
_______________________________________________
llvm-bugs mailing list
llvm-bugs@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs