On Mon, Aug 10, 2026 at 02:56:02PM +0000, Julio Sotoriva De Bastiani wrote:
Thanks. The code changes look good to me. However, there's a small issue in
the new tests, and there are various formatting and spelling issues in the
commit message.
> Add folding for predicate as counter builtins [PR target/126096]
I think "Fix ..." would be more accurate, and perhaps more precise and concise
would be "Fix folding for svwhilel*_c* builtins".
"Predicate-as-counter" should be hyphenated.
> This fixes a compiler error that occurred when trying to fold whilelt
> and whilele predicate as counter builtins as if they were regular
> predicated builtins.
"predicate-as-mask", not "regular predicated".
This isn't intended to dictate a precise wording - reread the message yourself
once you've made these fixes and see if you want to make any other editorial
changes.
>
> PR target/126096
This PR line goes into each changelog section separately, immediately above the
first file name in each log.
Changelog entries should be indented with tabs, not spaces.
>
> gcc/ChangeLog:
>
> * config/aarch64/aarch64-acle-builtins.cc
> (gimple_folder::fold_to_pfalse): handle svcount_t when folding
> to pfalse.
Capital 'H' at start of the sentence. This could also be shortened to just
"Handle svcount_t".
> * config/aarch64/aarch64-sve-builtins-base.cc: Punt in cases
> where we can't fold predicate as counter builtins
This should specify the methods involved (I think the mklog script doesn't know
how to handle this properly). For example:
* config/aarch64/aarch64-sve-builtins-base.cc
(svpfalse_impl::fold): Handle svcount_t.
(svwhilelx_impl::fold): Punt for non-pfalse svcount_t.
>
> gcc/testsuite/ChangeLog:
>
> * gcc.target/aarch64/sve2/acle/general/whilele_1.c: New test.
> * gcc.target/aarch64/sve2/acle/general/whilelt_1.c: New test.
> ---
...
> diff --git a/gcc/testsuite/gcc.target/aarch64/sve2/acle/general/whilele_1.c
> b/gcc/testsuite/gcc.target/aarch64/sve2/acle/general/whilele_1.c
> new file mode 100644
> index 00000000000..a0b8c42244b
> --- /dev/null
> +++ b/gcc/testsuite/gcc.target/aarch64/sve2/acle/general/whilele_1.c
> @@ -0,0 +1,60 @@
> +/* { dg-do compile { target { ! aarch64_asm_sve2p1_ok } } } */
This overrides the default dg-do action, so you also need:
/* { dg-do assemble { target { aarch64_asm_sve2p1_ok } } } */
Otherwise the test will be skipped entirely when gcc is configured with a newer
assembler.
> +/* { dg-options "-O2" } */
> +
> +#include <arm_sve.h>
...
> +/* { dg-final { scan-assembler-times {\tpfalse\tp[0-9]+\.b\n} 8 } } */
> diff --git a/gcc/testsuite/gcc.target/aarch64/sve2/acle/general/whilelt_1.c
> b/gcc/testsuite/gcc.target/aarch64/sve2/acle/general/whilelt_1.c
> new file mode 100644
> index 00000000000..9201d216fe7
> --- /dev/null
> +++ b/gcc/testsuite/gcc.target/aarch64/sve2/acle/general/whilelt_1.c
> @@ -0,0 +1,60 @@
> +/* { dg-do compile { target { ! aarch64_asm_sve2p1_ok } } } */
Ditto.
> +/* { dg-options "-O2" } */
> +
> +#include <arm_sve.h>
...
Thanks,
Alice