Skip to content

Commit c15131e

Browse files
author
David Truby
authored
[main] expand SVE_VECTOR_OPERATORS to include sizeless vectors (#213)
To guard usage of C/C++ operators on sizeless SVE vectors, we should expand __ARM_FEATURE_SVE_VECTOR_OPERATORS to include sizeless vectors and __ARM_FEATURE_SVE_PREDICATE_OPERATORS to include predicate vectors. It's possible that we also need something in the spec to explain what these operators do, but right now I would like to get consensus on what the feature macro should look like so we can add it to clang and gcc before people start using the operators without it.
1 parent 634227e commit c15131e

File tree

1 file changed

+16
-6
lines changed

1 file changed

+16
-6
lines changed

main/acle.md

Lines changed: 16 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1618,24 +1618,34 @@ SVE language extensions:
16181618
> [The __ARM_FEATURE_SVE_BITS macro](#the-__arm_feature_sve_bits-macro)
16191619
> for details.
16201620

1621-
**`__ARM_FEATURE_SVE_VECTOR_OPERATORS==1`**
1621+
**`__ARM_FEATURE_SVE_VECTOR_OPERATORS==N`**
16221622

1623-
> This indicates that applying the `arm_sve_vector_bits` attribute
1623+
> `N >= 1` indicates that applying the `arm_sve_vector_bits` attribute
16241624
> to an SVE vector type creates a type that supports the GNU vector
1625-
> extensions. The state of this macro is only meaningful when
1625+
> extensions. This condition is only meaningful when
16261626
> `__ARM_FEATURE_SVE_BITS` is nonzero. See [`arm_sve_vector_bits` behavior
16271627
> specific to vectors](#arm_sve_vector_bits-behavior-specific-to-vectors)
16281628
> for details.
16291629

1630+
> `N >= 2` indicates that the operators outlined in the GNU vector
1631+
> extensions additionally work on sizeless SVE vector types like `svint32_t`.
1632+
> The availability of operators on sizeless types is independent of
1633+
> `__ARM_FEATURE_SVE_BITS`.
1634+
16301635
**`__ARM_FEATURE_SVE_PREDICATE_OPERATORS==1`**
16311636

1632-
> This indicates that applying the `arm_sve_vector_bits` attribute to
1637+
> `N >= 1` indicates that applying the `arm_sve_vector_bits` attribute to
16331638
> `svbool_t` creates a type that supports basic built-in vector operations.
16341639
> The state of this macro is only meaningful when `__ARM_FEATURE_SVE_BITS`
16351640
> is nonzero. See [`arm_sve_vector_bits` behavior specific to
16361641
> predicates](#arm_sve_vector_bits-behavior-specific-to-predicates)
16371642
> for details.
16381643

1644+
> `N >= 2` indicates that the built-in vector operations described above
1645+
> additionally work on `svbool_t`.
1646+
> The availability of operators on `svbool_t` is independent of
1647+
> `__ARM_FEATURE_SVE_BITS`.
1648+
16391649
#### SVE2
16401650

16411651
`__ARM_FEATURE_SVE2` is defined to 1 if there is hardware support for
@@ -2144,8 +2154,8 @@ be found in [[BA]](#BA).
21442154
| [`__ARM_FEATURE_SVE_MATMUL_FP32`](#multiplication-of-32-bit-floating-point-matrices) | 32-bit floating-point matrix multiply extension (FEAT_F32MM) | 1 |
21452155
| [`__ARM_FEATURE_SVE_MATMUL_FP64`](#multiplication-of-64-bit-floating-point-matrices) | 64-bit floating-point matrix multiply extension (FEAT_F64MM) | 1 |
21462156
| [`__ARM_FEATURE_SVE_MATMUL_INT8`](#multiplication-of-8-bit-integer-matrices) | SVE support for the integer matrix multiply extension (FEAT_I8MM) | 1 |
2147-
| [`__ARM_FEATURE_SVE_PREDICATE_OPERATORS`](#scalable-vector-extension-sve) | C and C++ operators support fixed-length SVE predicate types | 1 |
2148-
| [`__ARM_FEATURE_SVE_VECTOR_OPERATORS`](#scalable-vector-extension-sve) | C and C++ operators support fixed-length SVE vector types | 1 |
2157+
| [`__ARM_FEATURE_SVE_PREDICATE_OPERATORS`](#scalable-vector-extension-sve) | Level of support for C and C++ operators on SVE vector types | 1 |
2158+
| [`__ARM_FEATURE_SVE_VECTOR_OPERATORS`](#scalable-vector-extension-sve) | Level of support for C and C++ operators on SVE predicate types | 1 |
21492159
| [`__ARM_FEATURE_SVE2`](#sve2) | SVE version 2 (FEAT_SVE2) | 1 |
21502160
| [`__ARM_FEATURE_SVE2_AES`](#aes-extension) | SVE2 support for the AES crytographic extension (FEAT_SVE_AES) | 1 |
21512161
| [`__ARM_FEATURE_SVE2_BITPERM`](#bit-permute-extension) | SVE2 bit permute extension (FEAT_SVE2_BitPerm) | 1 |

0 commit comments

Comments
 (0)