Open
Description
This is a complete duplicate of issue #56480 but for riscv-64.
Clang's intrinsics headers on Riscv-64 contain code like:
% head -20 /usr/lib/llvm-14/lib/clang/14.0.6/include/riscv_vector.h | tail -5
#ifndef __riscv_vector
#error "Vector intrinsics require the vector extension."
#endif
This means that one can only use Riscv-64 intrinsics in TUs that mark the feature as available for the entire intrinsic, e.g. via -march flags. In contrast, the x86 intrinsics are consistently defined, but tagged with __attribute__((__target__("whatever")))
:
See also: