[llvm-branch-commits] [clang] 5c6590e - [clang] Correct documentation for NEON and SVE operator support
Tobias Hieta via llvm-branch-commits
llvm-branch-commits at lists.llvm.org
Mon Aug 15 00:32:31 PDT 2022
Author: David Truby
Date: 2022-08-15T09:30:54+02:00
New Revision: 5c6590eb2775a545ad37c38c1c1f440e5687b079
URL: https://github.com/llvm/llvm-project/commit/5c6590eb2775a545ad37c38c1c1f440e5687b079
DIFF: https://github.com/llvm/llvm-project/commit/5c6590eb2775a545ad37c38c1c1f440e5687b079.diff
LOG: [clang] Correct documentation for NEON and SVE operator support
Previously the language extension documentation didn't mention SVE and
was incomplete in listing the C/C++ operators supported on NEON. This
corrects the documentation to be in line with the implementation.
(cherry picked from commit e4642d78a89930720bc84a4775614c45327bc0dc)
Added:
Modified:
clang/docs/LanguageExtensions.rst
Removed:
################################################################################
diff --git a/clang/docs/LanguageExtensions.rst b/clang/docs/LanguageExtensions.rst
index 259983271f345..86e88b19d7df1 100644
--- a/clang/docs/LanguageExtensions.rst
+++ b/clang/docs/LanguageExtensions.rst
@@ -400,7 +400,7 @@ Builtin Macros
Vectors and Extended Vectors
============================
-Supports the GCC, OpenCL, AltiVec and NEON vector extensions.
+Supports the GCC, OpenCL, AltiVec, NEON and SVE vector extensions.
OpenCL vector types are created using the ``ext_vector_type`` attribute. It
supports the ``V.xyzw`` syntax and other tidbits as seen in OpenCL. An example
@@ -539,32 +539,33 @@ The table below shows the support for each operation by vector extension. A
dash indicates that an operation is not accepted according to a corresponding
specification.
-============================== ======= ======= ============= =======
- Operator OpenCL AltiVec GCC NEON
-============================== ======= ======= ============= =======
-[] yes yes yes --
-unary operators +, -- yes yes yes --
-++, -- -- yes yes yes --
-+,--,*,/,% yes yes yes --
-bitwise operators &,|,^,~ yes yes yes --
->>,<< yes yes yes --
-!, &&, || yes -- yes --
-==, !=, >, <, >=, <= yes yes yes --
-= yes yes yes yes
-?: [#]_ yes -- yes --
-sizeof yes yes yes yes
-C-style cast yes yes yes no
-reinterpret_cast yes no yes no
-static_cast yes no yes no
-const_cast no no no no
-address &v[i] no no no [#]_ no
-============================== ======= ======= ============= =======
+============================== ======= ======= ============= ======= =====
+ Operator OpenCL AltiVec GCC NEON SVE
+============================== ======= ======= ============= ======= =====
+[] yes yes yes yes yes
+unary operators +, -- yes yes yes yes yes
+++, -- -- yes yes yes no no
++,--,*,/,% yes yes yes yes yes
+bitwise operators &,|,^,~ yes yes yes yes yes
+>>,<< yes yes yes yes yes
+!, &&, || yes -- yes yes yes
+==, !=, >, <, >=, <= yes yes yes yes yes
+= yes yes yes yes yes
+?: [#]_ yes -- yes yes yes
+sizeof yes yes yes yes yes
+C-style cast yes yes yes no no
+reinterpret_cast yes no yes no no
+static_cast yes no yes no no
+const_cast no no no no no
+address &v[i] no no no [#]_ no no
+============================== ======= ======= ============= ======= =====
See also :ref:`langext-__builtin_shufflevector`, :ref:`langext-__builtin_convertvector`.
.. [#] ternary operator(?:) has
diff erent behaviors depending on condition
operand's vector type. If the condition is a GNU vector (i.e. __vector_size__),
- it's only available in C++ and uses normal bool conversions (that is, != 0).
+ a NEON vector or an SVE vector, it's only available in C++ and uses normal bool
+ conversions (that is, != 0).
If it's an extension (OpenCL) vector, it's only available in C and OpenCL C.
And it selects base on signedness of the condition operands (OpenCL v1.1 s6.3.9).
.. [#] Clang does not allow the address of an element to be taken while GCC
More information about the llvm-branch-commits
mailing list