aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorRichard Sandiford <richard.sandiford@arm.com>2020-01-09 15:21:47 +0000
committerRichard Sandiford <rsandifo@gcc.gnu.org>2020-01-09 15:21:47 +0000
commit5b052959dcd2e9c390c7de34f806c4b22a66d8f7 (patch)
tree3da22bd78206d5bba8e8adafbe56383561c1e29c /gcc
parent99a3b91535cb41807d62478cd769bc1bed0db5df (diff)
downloadgcc-5b052959dcd2e9c390c7de34f806c4b22a66d8f7.zip
gcc-5b052959dcd2e9c390c7de34f806c4b22a66d8f7.tar.gz
gcc-5b052959dcd2e9c390c7de34f806c4b22a66d8f7.tar.bz2
[AArch64] Rename SVE shape "unary_count" to "unary_to_uint"
The SVE ACLE shape names use "_int" and "_uint" for arguments that are signed-integer or unsigned-integer variants of the main vector type. With SVE2 this variation also becomes common for return values, which the main SVE2 patch handles using "_to_int" and "_to_uint". This patch renames the existing unary_count shape to match the new scheme. 2020-01-09 Richard Sandiford <richard.sandiford@arm.com> gcc/ * config/aarch64/aarch64-sve-builtins-shapes.h (unary_count): Delete. (unary_to_uint): Define. * config/aarch64/aarch64-sve-builtins-shapes.cc (unary_count_def) (unary_count): Rename to... (unary_to_uint_def, unary_to_uint): ...this. * config/aarch64/aarch64-sve-builtins-base.def: Update accordingly. gcc/testsuite/ * gcc.target/aarch64/sve/acle/general-c/unary_count_1.c: Rename to... * gcc.target/aarch64/sve/acle/general-c/unary_to_uint_1.c: ...this. * gcc.target/aarch64/sve/acle/general-c/unary_count_2.c: Rename to... * gcc.target/aarch64/sve/acle/general-c/unary_to_uint_2.c: ...this. * gcc.target/aarch64/sve/acle/general-c/unary_count_3.c: Rename to... * gcc.target/aarch64/sve/acle/general-c/unary_to_uint_3.c: ...this. From-SVN: r280052
Diffstat (limited to 'gcc')
-rw-r--r--gcc/ChangeLog9
-rw-r--r--gcc/config/aarch64/aarch64-sve-builtins-base.def6
-rw-r--r--gcc/config/aarch64/aarch64-sve-builtins-shapes.cc42
-rw-r--r--gcc/config/aarch64/aarch64-sve-builtins-shapes.h2
-rw-r--r--gcc/testsuite/ChangeLog9
-rw-r--r--gcc/testsuite/gcc.target/aarch64/sve/acle/general-c/unary_to_uint_1.c (renamed from gcc/testsuite/gcc.target/aarch64/sve/acle/general-c/unary_count_1.c)0
-rw-r--r--gcc/testsuite/gcc.target/aarch64/sve/acle/general-c/unary_to_uint_2.c (renamed from gcc/testsuite/gcc.target/aarch64/sve/acle/general-c/unary_count_2.c)0
-rw-r--r--gcc/testsuite/gcc.target/aarch64/sve/acle/general-c/unary_to_uint_3.c (renamed from gcc/testsuite/gcc.target/aarch64/sve/acle/general-c/unary_count_3.c)0
8 files changed, 43 insertions, 25 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index 1c2a4a9..ad7f519 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,5 +1,14 @@
2020-01-09 Richard Sandiford <richard.sandiford@arm.com>
+ * config/aarch64/aarch64-sve-builtins-shapes.h (unary_count): Delete.
+ (unary_to_uint): Define.
+ * config/aarch64/aarch64-sve-builtins-shapes.cc (unary_count_def)
+ (unary_count): Rename to...
+ (unary_to_uint_def, unary_to_uint): ...this.
+ * config/aarch64/aarch64-sve-builtins-base.def: Update accordingly.
+
+2020-01-09 Richard Sandiford <richard.sandiford@arm.com>
+
* config/aarch64/aarch64-sve-builtins-functions.h
(code_for_mode_function): New class.
(CODE_FOR_MODE0, QUIET_CODE_FOR_MODE0): New macros.
diff --git a/gcc/config/aarch64/aarch64-sve-builtins-base.def b/gcc/config/aarch64/aarch64-sve-builtins-base.def
index 4cb7da7..cd0a9be 100644
--- a/gcc/config/aarch64/aarch64-sve-builtins-base.def
+++ b/gcc/config/aarch64/aarch64-sve-builtins-base.def
@@ -47,8 +47,8 @@ DEF_SVE_FUNCTION (svbrkpb, binary, b, z)
DEF_SVE_FUNCTION (svcadd, binary_rotate, all_float, mxz)
DEF_SVE_FUNCTION (svclasta, clast, all_data, implicit)
DEF_SVE_FUNCTION (svclastb, clast, all_data, implicit)
-DEF_SVE_FUNCTION (svcls, unary_count, all_signed, mxz)
-DEF_SVE_FUNCTION (svclz, unary_count, all_integer, mxz)
+DEF_SVE_FUNCTION (svcls, unary_to_uint, all_signed, mxz)
+DEF_SVE_FUNCTION (svclz, unary_to_uint, all_integer, mxz)
DEF_SVE_FUNCTION (svcmla, ternary_rotate, all_float, mxz)
DEF_SVE_FUNCTION (svcmla_lane, ternary_lane_rotate, hs_float, none)
DEF_SVE_FUNCTION (svcmpeq, compare_opt_n, all_data, implicit)
@@ -65,7 +65,7 @@ DEF_SVE_FUNCTION (svcmpne, compare_opt_n, all_data, implicit)
DEF_SVE_FUNCTION (svcmpne_wide, compare_wide_opt_n, bhs_signed, implicit)
DEF_SVE_FUNCTION (svcmpuo, compare_opt_n, all_float, implicit)
DEF_SVE_FUNCTION (svcnot, unary, all_integer, mxz)
-DEF_SVE_FUNCTION (svcnt, unary_count, all_data, mxz)
+DEF_SVE_FUNCTION (svcnt, unary_to_uint, all_data, mxz)
DEF_SVE_FUNCTION (svcntb, count_inherent, none, none)
DEF_SVE_FUNCTION (svcntb_pat, count_pat, none, none)
DEF_SVE_FUNCTION (svcntd, count_inherent, none, none)
diff --git a/gcc/config/aarch64/aarch64-sve-builtins-shapes.cc b/gcc/config/aarch64/aarch64-sve-builtins-shapes.cc
index 6da093c..69a0621 100644
--- a/gcc/config/aarch64/aarch64-sve-builtins-shapes.cc
+++ b/gcc/config/aarch64/aarch64-sve-builtins-shapes.cc
@@ -2104,27 +2104,6 @@ struct unary_convert_def : public overloaded_base<1>
};
SHAPE (unary_convert)
-/* sv<t0:uint>_t svfoo[_t0](sv<t0>_t)
-
- i.e. a version of "unary" in which the returned vector contains
- unsigned integers. */
-struct unary_count_def : public overloaded_base<0>
-{
- void
- build (function_builder &b, const function_group_info &group) const OVERRIDE
- {
- b.add_overloaded_functions (group, MODE_none);
- build_all (b, "vu0,v0", group, MODE_none);
- }
-
- tree
- resolve (function_resolver &r) const OVERRIDE
- {
- return r.resolve_unary (TYPE_unsigned);
- }
-};
-SHAPE (unary_count)
-
/* sv<t0>_t svfoo[_n]_t0(<t0>_t). */
struct unary_n_def : public overloaded_base<1>
{
@@ -2156,6 +2135,27 @@ struct unary_pred_def : public nonoverloaded_base
};
SHAPE (unary_pred)
+/* sv<t0:uint>_t svfoo[_t0](sv<t0>_t)
+
+ i.e. a version of "unary" in which the returned vector contains
+ unsigned integers. */
+struct unary_to_uint_def : public overloaded_base<0>
+{
+ void
+ build (function_builder &b, const function_group_info &group) const OVERRIDE
+ {
+ b.add_overloaded_functions (group, MODE_none);
+ build_all (b, "vu0,v0", group, MODE_none);
+ }
+
+ tree
+ resolve (function_resolver &r) const OVERRIDE
+ {
+ return r.resolve_unary (TYPE_unsigned);
+ }
+};
+SHAPE (unary_to_uint)
+
/* sv<t0>_t svfoo[_t0](sv<t0:uint>_t)
where <t0> always belongs a certain type class, and where <t0:uint>
diff --git a/gcc/config/aarch64/aarch64-sve-builtins-shapes.h b/gcc/config/aarch64/aarch64-sve-builtins-shapes.h
index e9a429b..15137128 100644
--- a/gcc/config/aarch64/aarch64-sve-builtins-shapes.h
+++ b/gcc/config/aarch64/aarch64-sve-builtins-shapes.h
@@ -135,9 +135,9 @@ namespace aarch64_sve
extern const function_shape *const tmad;
extern const function_shape *const unary;
extern const function_shape *const unary_convert;
- extern const function_shape *const unary_count;
extern const function_shape *const unary_n;
extern const function_shape *const unary_pred;
+ extern const function_shape *const unary_to_uint;
extern const function_shape *const unary_uint;
extern const function_shape *const unary_widen;
}
diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog
index cdb8e0d..943b632 100644
--- a/gcc/testsuite/ChangeLog
+++ b/gcc/testsuite/ChangeLog
@@ -1,5 +1,14 @@
2020-01-09 Richard Sandiford <richard.sandiford@arm.com>
+ * gcc.target/aarch64/sve/acle/general-c/unary_count_1.c: Rename to...
+ * gcc.target/aarch64/sve/acle/general-c/unary_to_uint_1.c: ...this.
+ * gcc.target/aarch64/sve/acle/general-c/unary_count_2.c: Rename to...
+ * gcc.target/aarch64/sve/acle/general-c/unary_to_uint_2.c: ...this.
+ * gcc.target/aarch64/sve/acle/general-c/unary_count_3.c: Rename to...
+ * gcc.target/aarch64/sve/acle/general-c/unary_to_uint_3.c: ...this.
+
+2020-01-09 Richard Sandiford <richard.sandiford@arm.com>
+
* gcc.target/aarch64/sve/acle/general/nrv_1.c: New test.
2020-01-09 Richard Sandiford <richard.sandiford@arm.com>
diff --git a/gcc/testsuite/gcc.target/aarch64/sve/acle/general-c/unary_count_1.c b/gcc/testsuite/gcc.target/aarch64/sve/acle/general-c/unary_to_uint_1.c
index 888b525..888b525 100644
--- a/gcc/testsuite/gcc.target/aarch64/sve/acle/general-c/unary_count_1.c
+++ b/gcc/testsuite/gcc.target/aarch64/sve/acle/general-c/unary_to_uint_1.c
diff --git a/gcc/testsuite/gcc.target/aarch64/sve/acle/general-c/unary_count_2.c b/gcc/testsuite/gcc.target/aarch64/sve/acle/general-c/unary_to_uint_2.c
index 233e847..233e847 100644
--- a/gcc/testsuite/gcc.target/aarch64/sve/acle/general-c/unary_count_2.c
+++ b/gcc/testsuite/gcc.target/aarch64/sve/acle/general-c/unary_to_uint_2.c
diff --git a/gcc/testsuite/gcc.target/aarch64/sve/acle/general-c/unary_count_3.c b/gcc/testsuite/gcc.target/aarch64/sve/acle/general-c/unary_to_uint_3.c
index da57b07..da57b07 100644
--- a/gcc/testsuite/gcc.target/aarch64/sve/acle/general-c/unary_count_3.c
+++ b/gcc/testsuite/gcc.target/aarch64/sve/acle/general-c/unary_to_uint_3.c