LLVM with RVV 0.7.1 support

Hi all,

LLVM supports auto-vectorization for RVV 0.10, but some RISC-V chips such as Nezha board implement older RVV versions e.g., RVV 0.7.1.

LLVM release11.x supports RVV 0.8, but I couldn’t find support for older versions. Is there any LLVM support for RVV 0.7.1?

GCC has support for different RVV versions, but as I understood, GCC only supports RVV intrinsics and not auto-vectorization.

@zhanghb97 @javiersetoain

Thank you!

Hi,

Yes, GCC doesn’t support RVV auto-vectorization now.

As far as I know, LLVM upstream doesn’t support RVV 0.7.1. Maybe you can contact the T-Head (Homepage | GitHub) compiler team, their processor and compiler support RVV 0.7.1, but I’m not sure if they have an open-source version.

Hope this helps you!

Hongbin

1 Like

Hi, Hongbin
What RVV version got supported by LLVM with auto-vectorization?
To support auto-vectorization, the front-end (clang) has to figure out how to translate source-code with special pattern into intrinsic call, Am I right?

B. R.
Liwei

Hi Liwei,

AFAIK, RVV 0.10

Clang front-end will not perform the optimization. All the patterns work on the IR level.

Got it, thank you, good day!

B. R.
Liwei