public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
* [PATCH] rs6000, Power 10 testsuite fixes
@ 2020-10-23 21:43 Carl Love
  2020-10-26 19:49 ` Segher Boessenkool
  0 siblings, 1 reply; 2+ messages in thread
From: Carl Love @ 2020-10-23 21:43 UTC (permalink / raw)
  To: segher, dje.gcc, gcc-patches, Will Schmidt

GCC maintainers:

The following patch fixes a few issues with the tests.  The DEBUG is
defined in each of the files thus the #ifdef DEBUG should just be #if
DEBUG.  The other issue is a some of the line lengths for the error
prints exceed 80 characters.  The patch fixes the prints.

The patch was compiled and tested on:

  powerpc64le-unknown-linux-gnu (Power 9 LE)

with no regressions.  Additionally, the test cases were manually
compiled with -mcpu=power10 and run on mambo.  The expected results
were changed for the cases where the print statements were changed to
verify the prints still work correctly.

Please let me know if this patch is acceptable for mainline.  Thanks.

                Carl Love
 

-----------------------------------------------------------------------

gcc/ChangeLog

2020-10-22  Carl Love  <cel@us.ibm.com>

	* config/testsuite/gcc.targetpc/vec-blend-runnable.c: Change
	#ifdef DEBUG to #if DEBUG.
	Fix printf line so it is less then 80 characters long.
	* config/testsuite/gcc.targetpc/vec-insert-word-runnable.c: Change
	#ifdef DEBUG to #if DEBUG.
	* config/testsuite/gcc.targetpc/vec-permute-ext-runnable.c: Change
	#ifdef DEBUG to #if DEBUG.
	* config/testsuite/gcc.targetpc/vec-replace-word-runnable.c: Change
	#ifdef DEBUG to #if DEBUG.
	Fix printf lines so they are less then 80 characters long.
	* config/testsuite/gcc.targetpc/vec-shift-double-runnable.c: Change
	#ifdef DEBUG to #if DEBUG.
---
 .../gcc.target/powerpc/vec-blend-runnable.c        |  5 +++--
 .../gcc.target/powerpc/vec-insert-word-runnable.c  |  2 +-
 .../gcc.target/powerpc/vec-permute-ext-runnable.c  |  2 +-
 .../gcc.target/powerpc/vec-replace-word-runnable.c | 14 +++++++++-----
 .../gcc.target/powerpc/vec-shift-double-runnable.c |  2 +-
 5 files changed, 15 insertions(+), 10 deletions(-)

diff --git a/gcc/testsuite/gcc.target/powerpc/vec-blend-runnable.c b/gcc/testsuite/gcc.target/powerpc/vec-blend-runnable.c
index 0c3d47234ed..d7baf16955b 100644
--- a/gcc/testsuite/gcc.target/powerpc/vec-blend-runnable.c
+++ b/gcc/testsuite/gcc.target/powerpc/vec-blend-runnable.c
@@ -5,7 +5,7 @@
 
 #define DEBUG 0
 
-#ifdef DEBUG
+#if DEBUG
 #include <stdio.h>
 #endif
 
@@ -144,7 +144,8 @@ main (int argc, char *argv [])
 
   if (!vec_all_eq (vresult_ushort,  expected_vresult_ushort)) {
 #if DEBUG
-    printf("ERROR, vec_blendv (vsrc_a_ushort, vsrc_b_ushort, vsrc_c_ushort)\n");
+    printf("ERROR, vec_blendv (vsrc_a_ushort, vsrc_b_ushort, "
+	   "vsrc_c_ushort)\n");
     for(i = 0; i < 8; i++)
       printf(" vresult_ushort[%d] = %d, expected_vresult_ushort[%d] = %d\n",
 	     i, vresult_ushort[i], i, expected_vresult_ushort[i]);
diff --git a/gcc/testsuite/gcc.target/powerpc/vec-insert-word-runnable.c b/gcc/testsuite/gcc.target/powerpc/vec-insert-word-runnable.c
index 8c2721aedfc..e0224cc3d38 100644
--- a/gcc/testsuite/gcc.target/powerpc/vec-insert-word-runnable.c
+++ b/gcc/testsuite/gcc.target/powerpc/vec-insert-word-runnable.c
@@ -5,7 +5,7 @@
 
 #define DEBUG 0
 
-#ifdef DEBUG
+#if DEBUG
 #include <stdio.h>
 #endif
 
diff --git a/gcc/testsuite/gcc.target/powerpc/vec-permute-ext-runnable.c b/gcc/testsuite/gcc.target/powerpc/vec-permute-ext-runnable.c
index c2dcd48b4c5..90fb7979ca2 100644
--- a/gcc/testsuite/gcc.target/powerpc/vec-permute-ext-runnable.c
+++ b/gcc/testsuite/gcc.target/powerpc/vec-permute-ext-runnable.c
@@ -5,7 +5,7 @@
 
 #define DEBUG 0
 
-#ifdef DEBUG
+#if DEBUG
 #include <stdio.h>
 #endif
 
diff --git a/gcc/testsuite/gcc.target/powerpc/vec-replace-word-runnable.c b/gcc/testsuite/gcc.target/powerpc/vec-replace-word-runnable.c
index 94af2106482..c75a87d028a 100644
--- a/gcc/testsuite/gcc.target/powerpc/vec-replace-word-runnable.c
+++ b/gcc/testsuite/gcc.target/powerpc/vec-replace-word-runnable.c
@@ -6,7 +6,7 @@
 
 #define DEBUG 0
 
-#ifdef DEBUG
+#if DEBUG
 #include <stdio.h>
 #endif
 
@@ -212,7 +212,8 @@ main (int argc, char *argv [])
 
   if (!vec_all_eq (vresult_float,  expected_vresult_float)) {
 #if DEBUG
-    printf("ERROR, vec_replace_unaligned (src_vb_float, src_va_float, index)\n");
+    printf("ERROR, vec_replace_unaligned (src_vb_float, src_va_float, "
+	   "index)\n");
     for(i = 0; i < 4; i++)
       printf(" vresult_float[%d] = %f, expected_vresult_float[%d] = %f\n",
 	     i, vresult_float[i], i, expected_vresult_float[i]);
@@ -233,7 +234,8 @@ main (int argc, char *argv [])
 
   if (!vec_all_eq (vresult_ullint,  expected_vresult_ullint)) {
 #if DEBUG
-    printf("ERROR, vec_replace_unaligned (src_vb_ullint, src_va_ullint, index)\n");
+    printf("ERROR, vec_replace_unaligned (src_vb_ullint, src_va_ullint, "
+	   "index)\n");
     for(i = 0; i < 2; i++)
       printf(" vresult_ullint[%d] = %d, expected_vresult_ullint[%d] = %d\n",
 	     i, vresult_ullint[i], i, expected_vresult_ullint[i]);
@@ -252,7 +254,8 @@ main (int argc, char *argv [])
 
   if (!vec_all_eq (vresult_llint,  expected_vresult_llint)) {
 #if DEBUG
-    printf("ERROR, vec_replace_unaligned (src_vb_llint, src_va_llint, index)\n");
+    printf("ERROR, vec_replace_unaligned (src_vb_llint, src_va_llint, "
+	   "index)\n");
     for(i = 0; i < 2; i++)
       printf(" vresult_llint[%d] = %d, expected_vresult_llint[%d] = %d\n",
 	     i, vresult_llint[i], i, expected_vresult_llint[i]);
@@ -270,7 +273,8 @@ main (int argc, char *argv [])
 
   if (!vec_all_eq (vresult_double,  expected_vresult_double)) {
 #if DEBUG
-    printf("ERROR, vec_replace_unaligned (src_vb_double, src_va_double, index)\
+    printf("ERROR, vec_replace_unaligned (src_vb_double, src_va_double, "
+	   "index)				\
 n");
     for(i = 0; i < 2; i++)
       printf(" vresult_double[%d] = %f, expected_vresult_double[%d] = %f\n",
diff --git a/gcc/testsuite/gcc.target/powerpc/vec-shift-double-runnable.c b/gcc/testsuite/gcc.target/powerpc/vec-shift-double-runnable.c
index 13213bd22ee..a1208ef2b92 100644
--- a/gcc/testsuite/gcc.target/powerpc/vec-shift-double-runnable.c
+++ b/gcc/testsuite/gcc.target/powerpc/vec-shift-double-runnable.c
@@ -5,7 +5,7 @@
 
 #define DEBUG 0
 
-#ifdef DEBUG
+#if DEBUG
 #include <stdio.h>
 #endif
 
-- 
2.17.1



^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [PATCH] rs6000, Power 10 testsuite fixes
  2020-10-23 21:43 [PATCH] rs6000, Power 10 testsuite fixes Carl Love
@ 2020-10-26 19:49 ` Segher Boessenkool
  0 siblings, 0 replies; 2+ messages in thread
From: Segher Boessenkool @ 2020-10-26 19:49 UTC (permalink / raw)
  To: Carl Love; +Cc: dje.gcc, gcc-patches, Will Schmidt, Bill Schmidt, Peter Bergner

Hi!

On Fri, Oct 23, 2020 at 02:43:40PM -0700, Carl Love wrote:
> The following patch fixes a few issues with the tests.  The DEBUG is
> defined in each of the files thus the #ifdef DEBUG should just be #if
> DEBUG.  The other issue is a some of the line lengths for the error
> prints exceed 80 characters.  The patch fixes the prints.

Testcases can use whatever formatting they want (but readability is good
of course).

> --- a/gcc/testsuite/gcc.target/powerpc/vec-replace-word-runnable.c
> +++ b/gcc/testsuite/gcc.target/powerpc/vec-replace-word-runnable.c

> -    printf("ERROR, vec_replace_unaligned (src_vb_double, src_va_double, index)\
> +    printf("ERROR, vec_replace_unaligned (src_vb_double, src_va_double, "
> +	   "index)				\
>  n");

This is wrong (was wrong already :-) -- it should be  "index)\n");

Okay for trunk with that fixed as well.  Thanks!


Segher

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2020-10-26 19:50 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-10-23 21:43 [PATCH] rs6000, Power 10 testsuite fixes Carl Love
2020-10-26 19:49 ` Segher Boessenkool

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