[llvm] [Docs][RISCV] Document RISC-V vector codegen (PR #96740)
Pengcheng Wang via llvm-commits
llvm-commits at lists.llvm.org
Wed Jun 26 03:02:03 PDT 2024
================
@@ -0,0 +1,285 @@
+=========================
+ RISC-V Vector Extension
+=========================
+
+.. contents::
+ :local:
+
+The RISC-V target readily supports the 1.0 version of the `RISC-V Vector Extension (RVV) <https://github.com/riscv/riscv-v-spec/blob/v1.0/v-spec.adoc>`_, but requires some tricks to handle its unique design.
+This guide gives an overview of how RVV is modelled in LLVM IR and how the backend generates code for it.
+
+Mapping to LLVM IR types
+========================
+
+RVV adds 32 ``VLEN`` sized registers, where ``VLEN`` is an unknown constant to the compiler. To be able to represent ``VLEN`` sized values, the RISC-V backend takes the same approach as AArch64's SVE and uses `scalable vector types <https://lists.llvm.org/pipermail/llvm-dev/2018-July/124396.html>`_.
----------------
wangpc-pp wrote:
Maybe use this link (https://llvm.org/docs/LangRef.html#t-vector)?
https://github.com/llvm/llvm-project/pull/96740
More information about the llvm-commits
mailing list