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 the arm_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 when arm_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.

LLVM 11 - SVE and SVE2 intrinsic

Highlights
  • Clang: SVE and SVE2 - Vector Length Agnostic (VLA) intrinsic support
  • Clang: SVE and SVE2 - No support for VLS (-msve-vector-bits=) intrinsic
  • Clang: SVE and SVE2 - No auto-vectorization support
  • LLDB: Basic debug support - No SVE register access.

Details

  • Supported features:
    • __ARM_FEATURE_SVE  (Base SVE functions defined in ACLE specification)
    • __ARM_FEATURE_SVE_BF16  (BFloat16 extensions)
    • __ARM_FEATURE_SVE_MATMUL_INT8  (INT8 matrix multiply extensions)
    • __ARM_FEATURE_SVE_MATMUL_FP32  (FP32 matrix multiply extensions)
    • __ARM_FEATURE_SVE_MATMUL_FP64  (FP64 matrix multiply extensions)
    • __ARM_FEATURE_SVE2  (Base SVE2 functions )
    • __ARM_FEATURE_SVE2_BITPERM  (SVE2 bit permutation extensions)
    • __ARM_FEATURE_SVE2_AES  (SVE2 AES-128 extensions)
    • __ARM_FEATURE_SVE2_SHA3  (SVE2 SHA3 extensions)
    • __ARM_FEATURE_SVE2_SM4  (SVE2 SM4 extensions)
    • Stack unwinding in the presence of ACLE variables on the stack.
    • Debug:  Stepping of functions, software and hardware breakpoints, disassembly.
  • Unsupported features:
    • __ARM_FEATURE_SVE_BITS (Support for the arm_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 when arm_sve_vector_bits is specified - part of VLS ACLE support)
    • __ARM_FEATURE_SVE_PREDICATE_OPERATORS (VLS support for SVE predicate types - part of VLS ACLE support)
    • __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 ACLE variables)
  • Known issues
    • Debug Info support is not available for SVE variables in clang/LLVM
    • SVE register access is not available in LLDB

LLVM 9 onwards - SVE2 asm/disasm support

Highlights
  • SVE2 assembly/disassembly
  • SVE and SVE2 - No intrinsic or auto-vectorization support

LLVM 5 onwards  - SVE asm/disasm support

Highlights
  • SVE assembly/disassembly
  • SVE - No intrinsic or auto-vectorization support
  • SVE2 - No support