diff mbox series

Fix typo in expander trunc<mode><pmov_dst_3>2 [AVX512]

Message ID CAMZc-bzjhTRMkV9fk+ZR+A33e8oSMw-3brVbuyo7KKjoJ7JqcA@mail.gmail.com
State New
Headers show
Series Fix typo in expander trunc<mode><pmov_dst_3>2 [AVX512] | expand

Commit Message

Hongtao Liu June 4, 2020, 6:08 a.m. UTC
This patch to is fix uppercase of mode in trunc<mode><pmov_dst_3>2, it
should be lowercase for standard pattern name.

  Bootstrap is ok, regression test on i386/x86-64 backend is ok.

gcc/ChangeLog:
        * config/i386/sse.md (pmov_dst_3_lower): New mode attribute.
        (trunc<mode><pmov_dst_3_lower>2): Refine from
        trunc<mode><pmov_dst_3>2.

gcc/testsuite
        * gcc.target/i386/pr92658-avx512bw-trunc.c: Adjust testcase.
---
 gcc/config/i386/sse.md                                 | 4 +++-
 gcc/testsuite/gcc.target/i386/pr92658-avx512bw-trunc.c | 3 +--
 2 files changed, 4 insertions(+), 3 deletions(-)

Comments

Richard Biener June 4, 2020, 6:47 a.m. UTC | #1
On Thu, Jun 4, 2020 at 8:09 AM Hongtao Liu via Gcc-patches
<gcc-patches@gcc.gnu.org> wrote:
>
> This patch to is fix uppercase of mode in trunc<mode><pmov_dst_3>2, it
> should be lowercase for standard pattern name.
>
>   Bootstrap is ok, regression test on i386/x86-64 backend is ok.

OK.

Richard.

> gcc/ChangeLog:
>         * config/i386/sse.md (pmov_dst_3_lower): New mode attribute.
>         (trunc<mode><pmov_dst_3_lower>2): Refine from
>         trunc<mode><pmov_dst_3>2.
>
> gcc/testsuite
>         * gcc.target/i386/pr92658-avx512bw-trunc.c: Adjust testcase.
> ---
>  gcc/config/i386/sse.md                                 | 4 +++-
>  gcc/testsuite/gcc.target/i386/pr92658-avx512bw-trunc.c | 3 +--
>  2 files changed, 4 insertions(+), 3 deletions(-)
>
> diff --git a/gcc/config/i386/sse.md b/gcc/config/i386/sse.md
> index f2a5a34284d..87354451c58 100644
> --- a/gcc/config/i386/sse.md
> +++ b/gcc/config/i386/sse.md
> @@ -10688,6 +10688,8 @@
>    "TARGET_AVX512VL")
>
>  (define_mode_iterator PMOV_SRC_MODE_3 [V4DI V2DI V8SI V4SI (V8HI
> "TARGET_AVX512BW")])
> +(define_mode_attr pmov_dst_3_lower
> +  [(V4DI "v4qi") (V2DI "v2qi") (V8SI "v8qi") (V4SI "v4qi") (V8HI "v8qi")])
>  (define_mode_attr pmov_dst_3
>    [(V4DI "V4QI") (V2DI "V2QI") (V8SI "V8QI") (V4SI "V4QI") (V8HI "V8QI")])
>  (define_mode_attr pmov_dst_zeroed_3
> @@ -10695,7 +10697,7 @@
>  (define_mode_attr pmov_suff_3
>    [(V4DI "qb") (V2DI "qb") (V8SI "db") (V4SI "db") (V8HI "wb")])
>
> -(define_expand "trunc<mode><pmov_dst_3>2"
> +(define_expand "trunc<mode><pmov_dst_3_lower>2"
>    [(set (match_operand:<pmov_dst_3> 0 "register_operand")
>         (truncate:<pmov_dst_3>
>           (match_operand:PMOV_SRC_MODE_3 1 "register_operand")))]
> diff --git a/gcc/testsuite/gcc.target/i386/pr92658-avx512bw-trunc.c
> b/gcc/testsuite/gcc.target/i386/pr92658-avx512bw-trunc.c
> index bdfad7a4d18..1f5ea63b08a 100644
> --- a/gcc/testsuite/gcc.target/i386/pr92658-avx512bw-trunc.c
> +++ b/gcc/testsuite/gcc.target/i386/pr92658-avx512bw-trunc.c
> @@ -87,5 +87,4 @@ truncwb_128 (v16qi * dst, v8hi * __restrict src)
>    dst[0] = *(v16qi *) tem;
>  }
>
> -/* { dg-final { scan-assembler-times "vpmovwb" 2 } } */
> -/* { dg-final { scan-assembler-times "vpmovwb" 3 { xfail *-*-* } } } */
> +/* { dg-final { scan-assembler-times "vpmovwb" 3 } } */
> --
> 2.18.1
>
> --
> BR,
> Hongtao
diff mbox series

Patch

diff --git a/gcc/config/i386/sse.md b/gcc/config/i386/sse.md
index f2a5a34284d..87354451c58 100644
--- a/gcc/config/i386/sse.md
+++ b/gcc/config/i386/sse.md
@@ -10688,6 +10688,8 @@ 
   "TARGET_AVX512VL")

 (define_mode_iterator PMOV_SRC_MODE_3 [V4DI V2DI V8SI V4SI (V8HI
"TARGET_AVX512BW")])
+(define_mode_attr pmov_dst_3_lower
+  [(V4DI "v4qi") (V2DI "v2qi") (V8SI "v8qi") (V4SI "v4qi") (V8HI "v8qi")])
 (define_mode_attr pmov_dst_3
   [(V4DI "V4QI") (V2DI "V2QI") (V8SI "V8QI") (V4SI "V4QI") (V8HI "V8QI")])
 (define_mode_attr pmov_dst_zeroed_3
@@ -10695,7 +10697,7 @@ 
 (define_mode_attr pmov_suff_3
   [(V4DI "qb") (V2DI "qb") (V8SI "db") (V4SI "db") (V8HI "wb")])

-(define_expand "trunc<mode><pmov_dst_3>2"
+(define_expand "trunc<mode><pmov_dst_3_lower>2"
   [(set (match_operand:<pmov_dst_3> 0 "register_operand")
        (truncate:<pmov_dst_3>
          (match_operand:PMOV_SRC_MODE_3 1 "register_operand")))]
diff --git a/gcc/testsuite/gcc.target/i386/pr92658-avx512bw-trunc.c
b/gcc/testsuite/gcc.target/i386/pr92658-avx512bw-trunc.c
index bdfad7a4d18..1f5ea63b08a 100644
--- a/gcc/testsuite/gcc.target/i386/pr92658-avx512bw-trunc.c
+++ b/gcc/testsuite/gcc.target/i386/pr92658-avx512bw-trunc.c
@@ -87,5 +87,4 @@  truncwb_128 (v16qi * dst, v8hi * __restrict src)
   dst[0] = *(v16qi *) tem;
 }

-/* { dg-final { scan-assembler-times "vpmovwb" 2 } } */
-/* { dg-final { scan-assembler-times "vpmovwb" 3 { xfail *-*-* } } } */
+/* { dg-final { scan-assembler-times "vpmovwb" 3 } } */