Extend pass rpad to handle avx512f vcvtusi2ss vcvtusi2ss 538.imagick_r improved...
authorHongtao Liu <hongtao.liu@intel.com>
Thu, 19 Sep 2019 01:21:39 +0000 (01:21 +0000)
committerHongtao Liu <liuhongt@gcc.gnu.org>
Thu, 19 Sep 2019 01:21:39 +0000 (01:21 +0000)
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.

From-SVN: r275926

gcc/ChangeLog
gcc/config/i386/i386.md
gcc/testsuite/ChangeLog
gcc/testsuite/gcc.target/i386/pr87007-3.c [new file with mode: 0644]

index 051093341ec9a14c5daca4edbbe7d1b8b052ef5c..965d78873cdeecd9125fec908c62bc1560ddb0ed 100644 (file)
@@ -1,3 +1,9 @@
+2019-09-19  Hongtao Liu <hongtao.liu@intel.com>
+
+       PR target/87007
+       * config/i386.md (*floatuns<SWI48:mode><MODEF:mode>2_avx512):
+       Add avx_partial_xmm_update.
+
 2019-09-18  Jim Wilson  <jimw@sifive.com>
 
        PR target/91683
index 7ad9788241988e1949bcd243ae7853ec906f9f57..b7e7d126da29d6ab569ddd7677318e471acd7426 100644 (file)
   "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>")])
 
index 48e91d9f8ca7a51c8dbc92d1073bc39d488aece8..20d22de9a943ac711a1f23fea2a34d12a3dc2274 100644 (file)
@@ -1,3 +1,8 @@
+2019-09-19  Hongtao Liu <hongtao.liu@intel.com>
+
+       PR target/87007
+       * gcc.target/i386/pr87007-3.c: New test.
+
 2019-09-18  H.J. Lu  <hongjiu.lu@intel.com>
 
        PR target/90878
diff --git a/gcc/testsuite/gcc.target/i386/pr87007-3.c b/gcc/testsuite/gcc.target/i386/pr87007-3.c
new file mode 100644 (file)
index 0000000..59324fd
--- /dev/null
@@ -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 } } */