diff mbox series

[RS6000] dg-do !compile and scan-assembler

Message ID 20201027105610.GP15956@bubble.grove.modra.org
State New
Headers show
Series [RS6000] dg-do !compile and scan-assembler | expand

Commit Message

Alan Modra Oct. 27, 2020, 10:56 a.m. UTC
From 6c1817cece47ce2cb36df1f57b533b9d2385f0a5 Mon Sep 17 00:00:00 2001
From: Alan Modra <amodra@gmail.com>
Date: Tue, 27 Oct 2020 17:32:13 +1030
Subject: 

These tests never checked assembly, because .s files were not
produced.  One test was looking for the wrong instructions.

A typical error log
PASS: gcc.target/powerpc/vec-permute-ext-runnable.c (test for excess errors)
gcc.target/powerpc/vec-permute-ext-runnable.c output file does not exist
UNRESOLVED: gcc.target/powerpc/vec-permute-ext-runnable.c scan-assembler-times \\mpermx\\M 10

Bootstrapped and regression tested powerpc64le-linux power8.
powerpc64le-linux power10 and powerpc64-linux power7 biarch regtest
still in progress.  OK?

	* gcc.target/powerpc/vec-blend-runnable.c: Add save-temps.
	* gcc.target/powerpc/vec-insert-word-runnable.c: Likewise.
	* gcc.target/powerpc/vec-permute-ext-runnable.c: Likewise.
	* gcc.target/powerpc/vec-replace-word-runnable.c: Likewise.
	* gcc.target/powerpc/vec-splati-runnable.c: Likewise.
	* gcc.target/powerpc/vec-ternarylogic-3.c: Likewise.
	* gcc.target/powerpc/vec-ternarylogic-9.c: Likewise.
	* gcc.target/powerpc/vsx_mask-count-runnable.c: Likewise.
	* gcc.target/powerpc/vsx_mask-expand-runnable.c: Likewise.
	* gcc.target/powerpc/vsx_mask-extract-runnable.c: Likewise.
	* gcc.target/powerpc/vsx_mask-move-runnable.c: Likewise.
	* gcc.target/powerpc/vec-shift-double-runnable.c: Likewise,
	and correct assembly match.

Comments

Segher Boessenkool Oct. 27, 2020, 10:34 p.m. UTC | #1
Hi!

On Tue, Oct 27, 2020 at 09:26:10PM +1030, Alan Modra wrote:
> These tests never checked assembly, because .s files were not
> produced.  One test was looking for the wrong instructions.

 -/* { dg-final { scan-assembler-times {\msldbi\M} 6 } } */
> -/* { dg-final { scan-assembler-times {\msrdbi\M} 6 } } */
> -
> -
> +/* { dg-final { scan-assembler-times {\mvsldbi\M} 8 } } */
> +/* { dg-final { scan-assembler-times {\mvsrdbi\M} 8 } } */

You also changed the instruction count here; did you check 8 is actually
what is expected here, or is that just what you saw come out?

Okay for trunk if so.  Thanks!


Segher
Alan Modra Oct. 27, 2020, 11:17 p.m. UTC | #2
On Tue, Oct 27, 2020 at 05:34:45PM -0500, Segher Boessenkool wrote:
> Hi!
> 
> On Tue, Oct 27, 2020 at 09:26:10PM +1030, Alan Modra wrote:
> > These tests never checked assembly, because .s files were not
> > produced.  One test was looking for the wrong instructions.
> 
>  -/* { dg-final { scan-assembler-times {\msldbi\M} 6 } } */
> > -/* { dg-final { scan-assembler-times {\msrdbi\M} 6 } } */
> > -
> > -
> > +/* { dg-final { scan-assembler-times {\mvsldbi\M} 8 } } */
> > +/* { dg-final { scan-assembler-times {\mvsrdbi\M} 8 } } */
> 
> You also changed the instruction count here; did you check 8 is actually
> what is expected here, or is that just what you saw come out?

Yes, 8 is the correct count.  And in this instance I amazingly changed
the count before running the test and finding it "wrong".  :-)
diff mbox series

Patch

diff --git a/gcc/testsuite/gcc.target/powerpc/vec-blend-runnable.c b/gcc/testsuite/gcc.target/powerpc/vec-blend-runnable.c
index 774960bbcd3..0f4b2130351 100644
--- a/gcc/testsuite/gcc.target/powerpc/vec-blend-runnable.c
+++ b/gcc/testsuite/gcc.target/powerpc/vec-blend-runnable.c
@@ -1,7 +1,7 @@ 
 /* { dg-do run { target { power10_hw } } } */
 /* { dg-do link { target { ! power10_hw } } } */
 /* { dg-require-effective-target power10_ok } */
-/* { dg-options "-mdejagnu-cpu=power10" } */
+/* { dg-options "-mdejagnu-cpu=power10 -save-temps" } */
 #include <altivec.h>
 
 #define DEBUG 0
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 55ca1c4b35d..be45182a6be 100644
--- a/gcc/testsuite/gcc.target/powerpc/vec-insert-word-runnable.c
+++ b/gcc/testsuite/gcc.target/powerpc/vec-insert-word-runnable.c
@@ -1,7 +1,7 @@ 
 /* { dg-do run { target { power10_hw } } } */
 /* { dg-do link { target { ! power10_hw } } } */
 /* { dg-require-effective-target power10_ok } */
-/* { dg-options "-mdejagnu-cpu=power10" } */
+/* { dg-options "-mdejagnu-cpu=power10 -save-temps" } */
 #include <altivec.h>
 
 #define DEBUG 0
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 2626d876d3d..3e3f9a77ecb 100644
--- a/gcc/testsuite/gcc.target/powerpc/vec-permute-ext-runnable.c
+++ b/gcc/testsuite/gcc.target/powerpc/vec-permute-ext-runnable.c
@@ -1,7 +1,7 @@ 
 /* { dg-do run { target { power10_hw } } } */
 /* { dg-do link { target { ! power10_hw } } } */
 /* { dg-require-effective-target power10_ok } */
-/* { dg-options "-mdejagnu-cpu=power10" } */
+/* { dg-options "-mdejagnu-cpu=power10 -save-temps" } */
 #include <altivec.h>
 
 #define DEBUG 0
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 413b9048eca..162968316bc 100644
--- a/gcc/testsuite/gcc.target/powerpc/vec-replace-word-runnable.c
+++ b/gcc/testsuite/gcc.target/powerpc/vec-replace-word-runnable.c
@@ -1,7 +1,7 @@ 
 /* { dg-do run { target { power10_hw } } } */
 /* { dg-do link { target { ! power10_hw } } } */
 /* { dg-require-effective-target power10_ok } */
-/* { dg-options "-mdejagnu-cpu=power10" } */
+/* { dg-options "-mdejagnu-cpu=power10 -save-temps" } */
 
 #include <altivec.h>
 
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 b8478f5c32d..128da2ad42b 100644
--- a/gcc/testsuite/gcc.target/powerpc/vec-shift-double-runnable.c
+++ b/gcc/testsuite/gcc.target/powerpc/vec-shift-double-runnable.c
@@ -1,7 +1,7 @@ 
 /* { dg-do run { target { power10_hw } } } */
 /* { dg-do link { target { ! power10_hw } } } */
 /* { dg-require-effective-target power10_ok } */
-/* { dg-options "-mdejagnu-cpu=power10" } */
+/* { dg-options "-mdejagnu-cpu=power10 -save-temps" } */
 #include <altivec.h>
 
 #define DEBUG 0
@@ -379,7 +379,5 @@  main (int argc, char *argv [])
   return 0;
 }
 
-/* { dg-final { scan-assembler-times {\msldbi\M} 6 } } */
-/* { dg-final { scan-assembler-times {\msrdbi\M} 6 } } */
-
-
+/* { dg-final { scan-assembler-times {\mvsldbi\M} 8 } } */
+/* { dg-final { scan-assembler-times {\mvsrdbi\M} 8 } } */
diff --git a/gcc/testsuite/gcc.target/powerpc/vec-splati-runnable.c b/gcc/testsuite/gcc.target/powerpc/vec-splati-runnable.c
index 1c8fdc5a3df..e84ce77a21d 100644
--- a/gcc/testsuite/gcc.target/powerpc/vec-splati-runnable.c
+++ b/gcc/testsuite/gcc.target/powerpc/vec-splati-runnable.c
@@ -1,7 +1,7 @@ 
 /* { dg-do run { target { power10_hw } } } */
 /* { dg-do link { target { ! power10_hw } } } */
 /* { dg-require-effective-target power10_ok } */
-/* { dg-options "-mdejagnu-cpu=power10" } */
+/* { dg-options "-mdejagnu-cpu=power10 -save-temps" } */
 #include <altivec.h>
 
 #define DEBUG 0
diff --git a/gcc/testsuite/gcc.target/powerpc/vec-ternarylogic-3.c b/gcc/testsuite/gcc.target/powerpc/vec-ternarylogic-3.c
index 47bca10fa58..9697068e235 100644
--- a/gcc/testsuite/gcc.target/powerpc/vec-ternarylogic-3.c
+++ b/gcc/testsuite/gcc.target/powerpc/vec-ternarylogic-3.c
@@ -1,7 +1,7 @@ 
 /* { dg-do run { target { power10_hw } } } */
 /* { dg-do link { target { ! power10_hw } } } */
 /* { dg-require-effective-target power10_ok } */
-/* { dg-options "-mdejagnu-cpu=power10" } */
+/* { dg-options "-mdejagnu-cpu=power10 -save-temps" } */
 
 #include <altivec.h>
 
diff --git a/gcc/testsuite/gcc.target/powerpc/vec-ternarylogic-9.c b/gcc/testsuite/gcc.target/powerpc/vec-ternarylogic-9.c
index 71e52ee880b..bcf4a352266 100644
--- a/gcc/testsuite/gcc.target/powerpc/vec-ternarylogic-9.c
+++ b/gcc/testsuite/gcc.target/powerpc/vec-ternarylogic-9.c
@@ -2,7 +2,7 @@ 
 /* { dg-do link { target { ! power10_hw } } } */
 /* { dg-require-effective-target power10_ok } */
 /* { dg-require-effective-target int128 } */
-/* { dg-options "-mdejagnu-cpu=power10" } */
+/* { dg-options "-mdejagnu-cpu=power10 -save-temps" } */
 
 #include <altivec.h>
 
diff --git a/gcc/testsuite/gcc.target/powerpc/vsx_mask-count-runnable.c b/gcc/testsuite/gcc.target/powerpc/vsx_mask-count-runnable.c
index 28aa7da9d1f..1ea2d65abf9 100644
--- a/gcc/testsuite/gcc.target/powerpc/vsx_mask-count-runnable.c
+++ b/gcc/testsuite/gcc.target/powerpc/vsx_mask-count-runnable.c
@@ -1,6 +1,6 @@ 
 /* { dg-do run { target { power10_hw } } } */
 /* { dg-do link { target { ! power10_hw } } } */
-/* { dg-options "-mdejagnu-cpu=power10 -O2" } */
+/* { dg-options "-mdejagnu-cpu=power10 -O2 -save-temps" } */
 /* { dg-require-effective-target power10_ok } */
 /* { dg-require-effective-target int128 } */
 
diff --git a/gcc/testsuite/gcc.target/powerpc/vsx_mask-expand-runnable.c b/gcc/testsuite/gcc.target/powerpc/vsx_mask-expand-runnable.c
index 68c1c3f1c9a..2c49814e0f7 100644
--- a/gcc/testsuite/gcc.target/powerpc/vsx_mask-expand-runnable.c
+++ b/gcc/testsuite/gcc.target/powerpc/vsx_mask-expand-runnable.c
@@ -1,6 +1,6 @@ 
 /* { dg-do run { target { power10_hw } } } */
 /* { dg-do link { target { ! power10_hw } } } */
-/* { dg-options "-mdejagnu-cpu=power10 -O2" } */
+/* { dg-options "-mdejagnu-cpu=power10 -O2 -save-temps" } */
 /* { dg-require-effective-target power10_ok } */
 /* { dg-require-effective-target int128 } */
 
diff --git a/gcc/testsuite/gcc.target/powerpc/vsx_mask-extract-runnable.c b/gcc/testsuite/gcc.target/powerpc/vsx_mask-extract-runnable.c
index 4664807a69e..9e257f5de7b 100644
--- a/gcc/testsuite/gcc.target/powerpc/vsx_mask-extract-runnable.c
+++ b/gcc/testsuite/gcc.target/powerpc/vsx_mask-extract-runnable.c
@@ -1,6 +1,6 @@ 
 /* { dg-do run { target { power10_hw } } } */
 /* { dg-do link { target { ! power10_hw } } } */
-/* { dg-options "-mdejagnu-cpu=power10 -O2" } */
+/* { dg-options "-mdejagnu-cpu=power10 -O2 -save-temps" } */
 /* { dg-require-effective-target power10_ok } */
 /* { dg-require-effective-target int128 } */
 
diff --git a/gcc/testsuite/gcc.target/powerpc/vsx_mask-move-runnable.c b/gcc/testsuite/gcc.target/powerpc/vsx_mask-move-runnable.c
index 58954dc5fc9..53fd99ed299 100644
--- a/gcc/testsuite/gcc.target/powerpc/vsx_mask-move-runnable.c
+++ b/gcc/testsuite/gcc.target/powerpc/vsx_mask-move-runnable.c
@@ -1,6 +1,6 @@ 
 /* { dg-do run { target { power10_hw } } } */
 /* { dg-do link { target { ! power10_hw } } } */
-/* { dg-options "-mdejagnu-cpu=power10 -O2" } */
+/* { dg-options "-mdejagnu-cpu=power10 -O2 -save-temps" } */
 /* { dg-require-effective-target power10_ok } */
 /* { dg-require-effective-target int128 } */