* [PATCH target/87007]Extend rpad to handle AVX512F vcvtusi2ss/vcvtusi2sd
@ 2019-09-18 3:29 Hongtao Liu
2019-09-18 6:24 ` Uros Bizjak
0 siblings, 1 reply; 2+ messages in thread
From: Hongtao Liu @ 2019-09-18 3:29 UTC (permalink / raw)
To: Uros Bizjak; +Cc: H. J. Lu, GCC Patches
[-- Attachment #1: Type: text/plain, Size: 428 bytes --]
Hi Uros:
This patch extend pass rpad to handle AVX512F vcvtusi2ss/vcvtusi2sd.
538.image_r would be improved by 4% with single copy run on skylake
workstation.
Bootstrap ok. regression test for i386/x86 backend ok.
Ok for trunk?
Changelog
gcc/
* config/i386/i386.md
(*floatuns<SWI48:mode><MODEF:mode>2_avx512):
Add avx_partial_xmm_update.
gcc/testsuie
* gcc.target/i386/pr87007-3.c: New test.
--
BR,
Hongtao
[-- Attachment #2: 0001-Extend-pass-rpad-to-handle-avx512f-vcvtusi2ss-vcvtus.patch --]
[-- Type: text/x-patch, Size: 1718 bytes --]
From 6c759b61c6fd317627791ac7e773465b0b644641 Mon Sep 17 00:00:00 2001
From: liuhongt <hongtao.liu@intel.com>
Date: Thu, 5 Sep 2019 14:00:13 +0800
Subject: [PATCH] Extend pass rpad to handle avx512f vcvtusi2ss vcvtusi2ss
538.imagick_r improved by 4% with single copy run on SKYLAKE workstation.
gcc/
* config/i386/i386.md
("*floatuns<SWI48:mode><MODEF:mode>2_avx512"):
Add avx_partial_xmm_update.
gcc/testsuie
* gcc.target/i386/pr87007-3.c: New test.
---
gcc/config/i386/i386.md | 1 +
gcc/testsuite/gcc.target/i386/pr87007-3.c | 18 ++++++++++++++++++
2 files changed, 19 insertions(+)
create mode 100644 gcc/testsuite/gcc.target/i386/pr87007-3.c
diff --git a/gcc/config/i386/i386.md b/gcc/config/i386/i386.md
index 7ad97882419..b7e7d126da2 100644
--- a/gcc/config/i386/i386.md
+++ b/gcc/config/i386/i386.md
@@ -5196,6 +5196,7 @@
"TARGET_AVX512F && TARGET_SSE_MATH"
"vcvtusi2<MODEF:ssemodesuffix><SWI48:rex64suffix>\t{%1, %0, %0|%0, %0, %1}"
[(set_attr "type" "sseicvt")
+ (set_attr "avx_partial_xmm_update" "true")
(set_attr "prefix" "evex")
(set_attr "mode" "<MODEF:MODE>")])
diff --git a/gcc/testsuite/gcc.target/i386/pr87007-3.c b/gcc/testsuite/gcc.target/i386/pr87007-3.c
new file mode 100644
index 00000000000..59324fd1a45
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/pr87007-3.c
@@ -0,0 +1,18 @@
+/* { dg-do compile } */
+/* { dg-options "-O2 -march=skylake-avx512 -mfpmath=sse" } */
+
+extern float f;
+extern double d;
+extern unsigned char c;
+
+void
+foo (int n, int k)
+{
+ for (int i = 0; i != n; i++)
+ if(i < k)
+ d = c;
+ else
+ f = c;
+}
+
+/* { dg-final { scan-assembler-times "vxorps\[^\n\r\]*xmm\[0-9\]" 1 } } */
--
2.19.1
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [PATCH target/87007]Extend rpad to handle AVX512F vcvtusi2ss/vcvtusi2sd
2019-09-18 3:29 [PATCH target/87007]Extend rpad to handle AVX512F vcvtusi2ss/vcvtusi2sd Hongtao Liu
@ 2019-09-18 6:24 ` Uros Bizjak
0 siblings, 0 replies; 2+ messages in thread
From: Uros Bizjak @ 2019-09-18 6:24 UTC (permalink / raw)
To: Hongtao Liu; +Cc: H. J. Lu, GCC Patches
On Wed, Sep 18, 2019 at 5:29 AM Hongtao Liu <crazylht@gmail.com> wrote:
>
> Hi Uros:
> This patch extend pass rpad to handle AVX512F vcvtusi2ss/vcvtusi2sd.
> 538.image_r would be improved by 4% with single copy run on skylake
> workstation.
>
> Bootstrap ok. regression test for i386/x86 backend ok.
> Ok for trunk?
>
> Changelog
>
> gcc/
> * config/i386/i386.md
> (*floatuns<SWI48:mode><MODEF:mode>2_avx512):
> Add avx_partial_xmm_update.
>
> gcc/testsuie
> * gcc.target/i386/pr87007-3.c: New test.
OK.
Thanks,
Uros.
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2019-09-18 6:24 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-09-18 3:29 [PATCH target/87007]Extend rpad to handle AVX512F vcvtusi2ss/vcvtusi2sd Hongtao Liu
2019-09-18 6:24 ` Uros Bizjak
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).