public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
* [PATCH] testsuite/92177 fix for SLP build changes
@ 2020-02-05 13:10 Richard Biener
  0 siblings, 0 replies; only message in thread
From: Richard Biener @ 2020-02-05 13:10 UTC (permalink / raw)
  To: gcc-patches

We're now consistently building SLP operations with only
scalar defs from scalars which makes the testcase no longer
testing multiplication vectorization.  The following smuggles
in a constant making the vector variant profitable for SLP build.

Tested on x86_64-linux, pushed.

2020-02-05  Richard Biener  <rguenther@suse.de>

	PR testsuite/92177
	* gcc.dg/vect/bb-slp-22.c: Adjust.
---
 gcc/testsuite/gcc.dg/vect/bb-slp-22.c | 16 ++++++++--------
 1 file changed, 8 insertions(+), 8 deletions(-)

diff --git a/gcc/testsuite/gcc.dg/vect/bb-slp-22.c b/gcc/testsuite/gcc.dg/vect/bb-slp-22.c
index 992f5898409..6dc2375f5d1 100644
--- a/gcc/testsuite/gcc.dg/vect/bb-slp-22.c
+++ b/gcc/testsuite/gcc.dg/vect/bb-slp-22.c
@@ -29,10 +29,10 @@ main1 (unsigned int x, unsigned int y)
     }
   else
     {
-      out[0] = a0 * x;
-      out[1] = a1 * y;
-      out[2] = a2 * x;
-      out[3] = a3 * y;
+      out[0] = a0 * (x + 1);
+      out[1] = a1 * (y + 1);
+      out[2] = a2 * (x + 1);
+      out[3] = a3 * (y + 1);
     }
 
   if (x)
@@ -40,10 +40,10 @@ main1 (unsigned int x, unsigned int y)
 
   /* Check results.  */
   if ((x <= y 
-       && (out[0] != (in[0] + 23) * x
-           || out[1] != (in[1] + 142) * y
-           || out[2] != (in[2] + 2) * x
-           || out[3] != (in[3] + 31) * y))
+       && (out[0] != (in[0] + 23) * (x + 1)
+           || out[1] != (in[1] + 142) * (y + 1)
+           || out[2] != (in[2] + 2) * (x + 1)
+           || out[3] != (in[3] + 31) * (y + 1)))
        || (x > y
            && (b[0] != (in[0] + 23)
                || b[1] != (in[1] + 142)
-- 
2.16.4

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

only message in thread, other threads:[~2020-02-05 13:10 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-02-05 13:10 [PATCH] testsuite/92177 fix for SLP build changes Richard Biener

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