On Fri, 24 Feb 2023, YunQiang Su via Gcc-cvs wrote:

> https://gcc.gnu.org/g:19aa3900bca808b49417a7aef295b5f1a583c298
> 
> commit r13-6315-g19aa3900bca808b49417a7aef295b5f1a583c298
> Author: Junxian Zhu <zhujunx...@oss.cipunited.com>
> Date:   Fri Feb 17 16:35:56 2023 +0800
> 
>     MIPS: Add pattern for clo

 We are in Stage 4, regression and documentation fixes only, no new 
features.  This should have waited for general development to reopen with 
Stage 1.

 Also formatting issues...

> diff --git a/gcc/testsuite/gcc.target/mips/clo.c 
> b/gcc/testsuite/gcc.target/mips/clo.c
> new file mode 100644
> index 00000000000..91f29a1322a
> --- /dev/null
> +++ b/gcc/testsuite/gcc.target/mips/clo.c
> @@ -0,0 +1,11 @@
> +/* { dg-do compile } */
> +/* { dg-options "(HAS_CLZ)" } */
> +/* { dg-skip-if "code quality test" { *-*-* } { "-O0" } { "" } } */
> +
> +NOMIPS16 unsigned int foo(unsigned int x)
> +{
> +  return  __builtin_clz (~x);

... here, ...

> diff --git a/gcc/testsuite/gcc.target/mips/clz.c 
> b/gcc/testsuite/gcc.target/mips/clz.c
> new file mode 100644
> index 00000000000..74e6edb90aa
> --- /dev/null
> +++ b/gcc/testsuite/gcc.target/mips/clz.c
> @@ -0,0 +1,10 @@
> +/* { dg-do compile } */
> +/* { dg-options "(HAS_CLZ)" } */
> +/* { dg-skip-if "code quality test" { *-*-* } { "-O0" } { "" } } */
> +
> +NOMIPS16 unsigned int foo(unsigned int x)
> +{
> +  return  __builtin_clz (x);

... here, ...

> diff --git a/gcc/testsuite/gcc.target/mips/mips.exp 
> b/gcc/testsuite/gcc.target/mips/mips.exp
> index 025fbe78359..ac3ab129541 100644
> --- a/gcc/testsuite/gcc.target/mips/mips.exp
> +++ b/gcc/testsuite/gcc.target/mips/mips.exp
> @@ -252,6 +252,7 @@ set mips_option_groups {
>      warnings "-w"
>      dump "-fdump-.*"
>      ins "HAS_INS"
> +     clz "HAS_CLZ"
>      dmul "NOT_HAS_DMUL"
>      ldc "HAS_LDC"
>      movn "HAS_MOVN"
> @@ -1198,11 +1199,13 @@ proc mips-dg-options { args } {
>       #
>          #   - paired-single instructions(*)
>          #   - odd numbered single precision registers
> +             #   - clz clo instructions
>          #

... and here.

  Maciej

Reply via email to