[PATCH] D129013: [RISCV] Enable (scalable) vectorization by default

Kito Cheng via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Aug 10 08:01:35 PDT 2022


kito-cheng added a comment.

> clang is inherently a cross compiler. We can't ask question of the host environment (e.g. kernel version). To my knowledge, this information is not available in any information we do have about the target platform. Am I missing something here?

We could check with `/proc/cpuinfo` like `-mcpu=native` for most other targets, `V` only appeared in the `/proc/cpuinfo` only if `V` is supported in kernel.

Ideally this issue should resolved by checking `Tag_RISCV_arch`[1] in kernel loader.

[1] https://github.com/riscv-non-isa/riscv-elf-psabi-doc/pull/292


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