[PATCH] D118225: [RISCV] Decouple Zve* extensions.

Jianjian Guan via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Wed Jan 26 18:23:30 PST 2022


jacquesguan added a comment.

In D118225#3272071 <https://reviews.llvm.org/D118225#3272071>, @eopXD wrote:

> Not sure if this simplifies things. Users and the compiler  can use the macro `__riscv_v_elen` and `__riscv_v_elen_fp` to do things to the vector-related target feature.
>
> Other than that I don't hold any strong objection to this refactoring.

This patch is similar with https://reviews.llvm.org/D117854. I think these five Zve* extensions are independent, we do not need to implement Zve32x for Zve64x, even all instructions of Zve32x is subset of instructions of Zve64x, same with other dependencies.
Current implemention of Zve* with depedency make some unclear. For example, in `clang/test/CodeGen/RISCV/rvv-intrinsics/rvv-error.c`, the error message shows that the buitin only needs Zve32x or V  extension to be enable. But actually, if we just implement Zve64x, these builtins should work as well. These error messages is kind of confusing if we make Zve* extensions has depedent relationship.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D118225/new/

https://reviews.llvm.org/D118225



More information about the cfe-commits mailing list