diff options
author | Cullen Rhodes <cullen.rhodes@arm.com> | 2020-09-11 15:18:44 +0000 |
---|---|---|
committer | Cullen Rhodes <cullen.rhodes@arm.com> | 2020-09-17 09:35:30 +0000 |
commit | 9218f9283802b2d1ff33c490761fdb925b1e56d9 (patch) | |
tree | 83af8d4e02c499b238091cf794fbf7c9798de041 /llvm/lib/CodeGen/ModuloSchedule.cpp | |
parent | c687af0c30b4dbdc9f614d5e061c888238e0f9c5 (diff) | |
download | llvm-9218f9283802b2d1ff33c490761fdb925b1e56d9.zip llvm-9218f9283802b2d1ff33c490761fdb925b1e56d9.tar.gz llvm-9218f9283802b2d1ff33c490761fdb925b1e56d9.tar.bz2 |
[clang][aarch64] ACLE: Support implicit casts between GNU and SVE vectors
This patch adds support for implicit casting between GNU vectors and SVE
vectors when `__ARM_FEATURE_SVE_BITS==N`, as defined by the Arm C
Language Extensions (ACLE, version 00bet5, section 3.7.3.3) for SVE [1].
This behavior makes it possible to use GNU vectors with ACLE functions
that operate on VLAT. For example:
typedef int8_t vec __attribute__((vector_size(32)));
vec f(vec x) { return svasrd_x(svptrue_b8(), x, 1); }
Tests are also added for implicit casting between GNU and fixed-length
SVE vectors created by the 'arm_sve_vector_bits' attribute. This
behavior makes it possible to use VLST with existing interfaces that
operate on GNUT. For example:
typedef int8_t vec1 __attribute__((vector_size(32)));
void f(vec1);
#if __ARM_FEATURE_SVE_BITS==256 && __ARM_FEATURE_SVE_VECTOR_OPERATORS
typedef svint8_t vec2 __attribute__((arm_sve_vector_bits(256)));
void g(vec2 x) { f(x); } // OK
#endif
The `__ARM_FEATURE_SVE_VECTOR_OPERATORS` feature macro indicates
interoperability with the GNU vector extension. This is the first patch
providing support for this feature, which once complete will be enabled
by the `-msve-vector-bits` flag, as the `__ARM_FEATURE_SVE_BITS` feature
currently is.
[1] https://developer.arm.com/documentation/100987/latest
Reviewed By: efriedma
Differential Revision: https://reviews.llvm.org/D87607
Diffstat (limited to 'llvm/lib/CodeGen/ModuloSchedule.cpp')
0 files changed, 0 insertions, 0 deletions