public inbox for gcc-cvs@sourceware.org
help / color / mirror / Atom feed
* [gcc r14-2894] Adjust testcase for more optimal codegen.
@ 2023-08-01  6:01 hongtao Liu
  0 siblings, 0 replies; only message in thread
From: hongtao Liu @ 2023-08-01  6:01 UTC (permalink / raw)
  To: gcc-cvs

https://gcc.gnu.org/g:01b0c36ba0c3bbe6ce0b0c77297e16d9531aac69

commit r14-2894-g01b0c36ba0c3bbe6ce0b0c77297e16d9531aac69
Author: liuhongt <hongtao.liu@intel.com>
Date:   Tue Aug 1 12:48:21 2023 +0800

    Adjust testcase for more optimal codegen.
    
    After
    b9d7140c80bd3c7355b8291bb46f0895dcd8c3cb is the first bad commit
    commit b9d7140c80bd3c7355b8291bb46f0895dcd8c3cb
    Author: Jan Hubicka <jh@suse.cz>
    Date:   Fri Jul 28 09:16:09 2023 +0200
    
        loop-split improvements, part 1
    
    Now we have
        vpbroadcastd %ecx, %xmm0
        vpaddd .LC3(%rip), %xmm0, %xmm0
        vpextrd $3, %xmm0, %eax
        vmovddup %xmm3, %xmm0
        vrndscalepd $9, %xmm0, %xmm0
        vunpckhpd %xmm0, %xmm0, %xmm3
    
    for vrndscalepd, no need to insert pxor since it reuses input register
    xmm0 to avoid partial sse dependece.
    
    gcc/testsuite/ChangeLog:
    
            * gcc.target/i386/pr87007-4.c: Adjust testcase.
            * gcc.target/i386/pr87007-5.c: Ditto.

Diff:
---
 gcc/testsuite/gcc.target/i386/pr87007-4.c | 6 +++---
 gcc/testsuite/gcc.target/i386/pr87007-5.c | 6 +++---
 2 files changed, 6 insertions(+), 6 deletions(-)

diff --git a/gcc/testsuite/gcc.target/i386/pr87007-4.c b/gcc/testsuite/gcc.target/i386/pr87007-4.c
index e91bdcbac44..23b5c5dcc52 100644
--- a/gcc/testsuite/gcc.target/i386/pr87007-4.c
+++ b/gcc/testsuite/gcc.target/i386/pr87007-4.c
@@ -1,6 +1,6 @@
 /* { dg-do compile } */
-/* { dg-options "-Ofast -march=skylake-avx512 -mfpmath=sse" } */
-
+/* { dg-options "-O2 -march=skylake-avx512 -mfpmath=sse" } */
+/* Load of d2/d3 is hoisted out, vrndscalesd will reuse loades register to avoid partial dependence.  */
 
 #include<math.h>
 
@@ -15,4 +15,4 @@ foo (int n, int k)
       d1 = ceil (d3);
 }
 
-/* { dg-final { scan-assembler-times "vxorps\[^\n\r\]*xmm\[0-9\]" 1 } } */
+/* { dg-final { scan-assembler-times "vxorps\[^\n\r\]*xmm\[0-9\]" 0 } } */
diff --git a/gcc/testsuite/gcc.target/i386/pr87007-5.c b/gcc/testsuite/gcc.target/i386/pr87007-5.c
index 20d13cf650b..b36e81c270c 100644
--- a/gcc/testsuite/gcc.target/i386/pr87007-5.c
+++ b/gcc/testsuite/gcc.target/i386/pr87007-5.c
@@ -1,6 +1,6 @@
 /* { dg-do compile } */
-/* { dg-options "-Ofast -march=skylake-avx512 -mfpmath=sse" } */
-
+/* { dg-options "-Ofast -march=skylake-avx512 -mfpmath=sse -fno-tree-vectorize" } */
+/* Load of d2/d3 is hoisted out, vrndscalesd will reuse loades register to avoid partial dependence.  */
 
 #include<math.h>
 
@@ -15,4 +15,4 @@ foo (int n, int k)
       d1 = sqrt (d3);
 }
 
-/* { dg-final { scan-assembler-times "vxorps\[^\n\r\]*xmm\[0-9\]" 1 } } */
+/* { dg-final { scan-assembler-times "vxorps\[^\n\r\]*xmm\[0-9\]" 0 } } */

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2023-08-01  6:01 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-08-01  6:01 [gcc r14-2894] Adjust testcase for more optimal codegen hongtao Liu

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).