On Wed, Sep 25, 2024 at 8:29 AM Richard Earnshaw <[email protected]> wrote:
>
> Configuring the compiler with, for example,
>
>   --with-standard-branch-protection
>
> can permute the generated code in a way that a very large number of
> scan-assembler tests will fail.  Rather than add a large number of
> alternatives to each test, it's better to just disable this feature
> when scanning for a specific sequence.  This patch does not fix
> everything, but it does fix some low-hanging fruit and allows about
> 18k more tests to pass with branch protection enabled.

I noticed this was never committed (nor commented on). This patch does
not apply directly either due to other patches for a similar issue.
But a rebased patch for this is ok.
Note we might want to disable ssp too for a similar reason (that is
-fno-stack-protector).

Thanks,
Andrew

>
> gcc/testsuite/ChangeLog:
>
>         * gcc.target/aarch64/sve2/acle/aarch64-sve2-acle-asm.exp: Disable
>         any branch-protection from the compiler configuration.
> ---
>  .../gcc.target/aarch64/sve2/acle/aarch64-sve2-acle-asm.exp      | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git 
> a/gcc/testsuite/gcc.target/aarch64/sve2/acle/aarch64-sve2-acle-asm.exp 
> b/gcc/testsuite/gcc.target/aarch64/sve2/acle/aarch64-sve2-acle-asm.exp
> index 291ed71800f..0f8e907e3dd 100644
> --- a/gcc/testsuite/gcc.target/aarch64/sve2/acle/aarch64-sve2-acle-asm.exp
> +++ b/gcc/testsuite/gcc.target/aarch64/sve2/acle/aarch64-sve2-acle-asm.exp
> @@ -73,7 +73,7 @@ if { [check_effective_target_aarch64_asm_sve2_ok]
>  } else {
>      set dg-do-what-default compile
>  }
> -gcc-dg-runtest [lsort $files] "" "$sve2_flags $extra_flags"
> +gcc-dg-runtest [lsort $files] "" "$sve2_flags -mbranch-protection=none 
> $extra_flags"
>  set dg-do-what-default ${save-dg-do-what-default}
>
>  torture-finish
> --
> 2.34.1
>

Reply via email to