From c0b99f67639956eaadfc8da6a704e0e1edbafc18 Mon Sep 17 00:00:00 2001 From: liuhongt Date: Thu, 4 Jun 2020 13:22:09 +0800 Subject: [PATCH] Fix uppercase in trunc2. 2020-06-04 Hongtao.liu gcc/ChangeLog: * config/i386/sse.md (pmov_dst_3_lower): New mode attribute. (trunc2): Refine from trunc2. 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 "trunc2" +(define_expand "trunc2" [(set (match_operand: 0 "register_operand") (truncate: (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.30.2