[PATCH] D129013: [RISCV] Enable (scalable) vectorization by default
Saleem Abdulrasool via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed Aug 10 07:24:10 PDT 2022
compnerd added a comment.
The CPU does support the vector extensions in this case though. The problem is that the default hardware boot state does not support it. A loss of state due to the kernel not maintaining the hardware state is different than an immediate trap due to the use of an instruction. Taking x86 as an example, people check whether they have a specific processor not whether they have a specific processor, kernel version x, libc y, version z, etc. In the case of the other architectures, the kernel support for the architectural features has been there since the beginning and no one would possibly have a kernel that is missing the functionality.
I agree with @asb that a warning may become dated and annoying (not to mention people building with `-Werror` would be rather unhappy; I suppose a remark could work?). Perhaps we should be checking whether the kernel supports the v extension? Kernel updates are not always guaranteed and people do switch between kernel versions. This seems like a case where we may be in a state where we cannot safely determine if the cpu specification and the vended kernel can work together. A failure to boot with a trap early in the system setup is difficult to diagnose.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D129013/new/
https://reviews.llvm.org/D129013
More information about the llvm-commits
mailing list