LLVM 12 - Improved SVE/SVE2 intrinsics, PoC Autovectorization
Highlights- Clang: Support for Arm Neoverse V1 and Arm Neoverse N2 cores
- Clang: Support for vector-length specific (VLS) SVE and SVE2 ACLE
- Clang: debug info support for SVE(2) variables
- LLDB: full support for debugging SVE(2)
- Clang: general improvements to SVE(2) ACLE code quality
- Clang: Experimental (non-production) vector-length-agnostic (VLA) auto-vectorization
Details
Clang 12 brings a number of code quality features to its SVE(2) ACLE implementation.
It adds VLS ACLE support, which allows transparent casting between known-width and scalable vector types if the user supplies a vector width using -msve-vector-bits=<value>
.
It also adds generation of debug info for SVE(2) variables, which is supported by both the GDB and LLDB debuggers.
Finally, it extends Clang's loop pragmas to force vectorization using the new experimental VLA SVE loop vectorizer. This is not yet a supported production feature.
- Supported features
- Debug Info support is available for SVE(2) variables in clang/LLVM
- LLDB support for debugging SVE(2) applications
__ARM_FEATURE_SVE_BITS
(Support for thearm_sve_vector_bits(N)
attribute, which is part of vector-length specific ACLE support)__ARM_FEATURE_SVE_VECTOR_OPERATORS
(Support for casting between GNU vector types and SVE vector types whenarm_sve_vector_bits
is specified - part of VLS ACLE support)__ARM_FEATURE_SVE_PREDICATE_OPERATORS
(VLS support for SVE(2) predicate types - part of VLS ACLE support)
- Unsupported features
__ARM_FEATURE_SVE_NONMEMBER_OPERATORS
(C++ non-member operator functions. This is a convenience function and allows (for example) use of the infix + operator on SVE(2) ACLE variables)
Find out more
For more information on these features, see our blog post on LLVM 12 and our Virtual Linaro Connect 2021 update on SVE(2) autovectorization in LLVM.