Spencer Abson <spencer.ab...@arm.com> writes:
> gcc/testsuite/ChangeLog:
>
>       * lib/gcc-defs.exp (aarch64-arg-dg-options):  Split add_tune
>       into add_tune and add_override, so that specifying -moverride
>       does not change the baseline which it is overriding from the
>       testuite's default (generic).

OK, thanks.

Richard

> ---
>  gcc/testsuite/lib/gcc-defs.exp | 16 +++++++++++-----
>  1 file changed, 11 insertions(+), 5 deletions(-)
>
> diff --git a/gcc/testsuite/lib/gcc-defs.exp b/gcc/testsuite/lib/gcc-defs.exp
> index 2f8b7d48869..d66c833452c 100644
> --- a/gcc/testsuite/lib/gcc-defs.exp
> +++ b/gcc/testsuite/lib/gcc-defs.exp
> @@ -599,15 +599,16 @@ proc aarch64-arch-dg-options { args } {
>  
>      set add_arch 1
>      set add_tune 1
> +    set add_override 1
>      set checks_output [string equal [lindex $do_what 0] "compile"]
>      set options [lindex $args 1]
>  
>      foreach option [split $options] {
>       switch -glob -- $option {
>           -march=* { set add_arch 0 }
> -         -mcpu=* { set add_arch 0; set add_tune 0 }
> -         -mtune=* { set add_tune 0 }
> -         -moverride=* { set add_tune 0 }
> +         -mcpu=* { set add_arch 0; set add_tune 0; set add_override 0}
> +         -mtune=* { set add_tune 0; set add_override 0 }
> +         -moverride=* { set add_override 0 }
>           -save-temps { set checks_output 1 }
>           --save-temps { set checks_output 1 }
>           -fdump* { set checks_output 1 }
> @@ -619,9 +620,14 @@ proc aarch64-arch-dg-options { args } {
>       append options " $aarch64_default_testing_arch"
>      }
>  
> -    if { $add_tune && $checks_output } {
> +    if { $checks_output } {
>       # Turn off any default tuning and codegen tweaks.
> -     append options " -mtune=generic -moverride=tune=none"
> +        if { $add_tune } {
> +            append options " -mtune=generic"
> +        }
> +        if { $add_override } {
> +            append options " -moverride=tune=none"
> +        }
>      }
>  
>      uplevel 1 aarch64-old-dg-options [lreplace $args 1 1 $options]

Reply via email to