[PATCH] D87607: [clang][aarch64] Support implicit casts between GNU and SVE vectors
Cullen Rhodes via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Mon Sep 14 05:45:27 PDT 2020
c-rhodes created this revision.
c-rhodes added reviewers: sdesmalen, efriedma, rsandifo-arm.
Herald added subscribers: kristof.beyls, tschuett.
Herald added a reviewer: rengolin.
Herald added a project: clang.
c-rhodes requested review of this revision.
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); }
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
Repository:
rG LLVM Github Monorepo
https://reviews.llvm.org/D87607
Files:
clang/lib/AST/ASTContext.cpp
clang/test/CodeGen/attr-arm-sve-vector-bits-cast.c
clang/test/Sema/attr-arm-sve-vector-bits.c
clang/test/SemaCXX/attr-arm-sve-vector-bits.cpp
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D87607.291550.patch
Type: text/x-patch
Size: 17934 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20200914/0deb93aa/attachment-0001.bin>
More information about the cfe-commits
mailing list