Hi!

On Tue, Feb 25, 2020 at 05:02:06PM -0600, will schmidt wrote:
>    This adds some procs to target-supports.exp that will allow
> our testcases to accurately determine which -mcpu= option
> is enabled at the time of our testcase compile.

Thanks!  I had to think about the names a bit (this will be
*everywhere*), but I think I like it quite well (it is clear, it is
short, other names that do not refer to the somewhat weird macro names
are not as clear what they actually mean; importantly, these effective
target names are clear they mean "at least this version", not "exactly
this version" (to people who know the _ARCH_PWRn macros, at least).

> -/* { dg-final { scan-tree-dump-times "LOOP VECTORIZED" 14 "vect" } } */
> +/* { dg-final { scan-tree-dump-times "LOOP VECTORIZED" 14 "vect" { target 
> has_arch_pwr8 } } } */

Yeah, I like this :-)

> +# return 1 if our compiler returns the ARCH_PWR defines with the options
> +# as provided by the test.
> +proc check_effective_target_has_arch_pwr5 { } {
> +     return [check_no_compiler_messages arch_pwr5 assembly {
> +             #ifndef _ARCH_PWR5
> +             #error does not have power5 support.
> +             #else
> +             /* "has power5 support" */
> +             #endif
> +     }]
> +}
> +proc check_effective_target_has_arch_pwr6 { } {

Please put empty lines between the functions.

With that, okay for trunk.  Thanks!


Segher

Reply via email to