-
Notifications
You must be signed in to change notification settings - Fork 13.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
RISC-V RVV not enabled despite -Ctarget-cpu=native
#138789
Comments
I should add: It's my understanding that the |
LLVM is responsible for |
You can ask $ rustc --print target-cpus
Available CPUs for this target:
native - Select the CPU of the current host (currently znver5).
... |
Generic, apparently:
So I guess it has specific boards or CPUs, and doesn't at all use the features listed in |
For |
Currently LLVM can only detect SiFive CPU (by comparing strings from /proc/cpuinfo) Comparing https://github.com/llvm/llvm-project/blob/main/llvm/lib/Target/RISCV/RISCVProcessors.td#L561 |
I tried this code
I expected to see this happen
When building with
-Ctarget-cpu=native
I expect both of these to betrue
.Instead, this happened
Both are false. I'm surprised that the first is
false
becausenative
should meanv
is enabled. I'm also surprised that the second is false, because even if not built in, it should be detected at least?If forcing
v
feature on, it works as expected:Meta
Surely this CPU supports
v
as a whole? The instructions definitely work. Well, the ones I've tried work. It's an Orange Pi RV2.The text was updated successfully, but these errors were encountered: