public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
* [PATCH, rs6000] whitespace fix for p9-dimode tests
@ 2016-12-08 16:18 Will Schmidt
  2016-12-09  2:55 ` Segher Boessenkool
  0 siblings, 1 reply; 3+ messages in thread
From: Will Schmidt @ 2016-12-08 16:18 UTC (permalink / raw)
  To: GCC Patches; +Cc: dje.gcc, segher

Hi, 

I am seeing some failures in the p9-dimode tests. This appears to
be due to the scan-assembler strings matching comment portions of the
generated assembly, versus the actual generated assembly. In
particular, the dg-final directive  { scan-assembler-not "ld"}
is matching the "ld" as seen in the string
  # 19 "/home/willschm/gcc/gcc-mainline-vec_fold/..."

This is resolved by adding a leading whitespace regex string "\[ \t\]"
as seen in other tests.

OK for trunk?
Thanks,
-Will

2016-12-08  Will Schmidt <will_schmidt@vnet.ibm.com>

gcc/testsuite/
	* gcc.target/powerpc/dimode-1.c: Update syntax on scan-assembler
	strings
	* gcc.target/powerpc/dimode-2.c: Likewise.


diff --git a/gcc/testsuite/gcc.target/powerpc/p9-dimode1.c b/gcc/testsuite/gcc.target/powerpc/p9-dimode1.c
index 6ba610b..c29b69d 100644
--- a/gcc/testsuite/gcc.target/powerpc/p9-dimode1.c
+++ b/gcc/testsuite/gcc.target/powerpc/p9-dimode1.c
@@ -43,8 +43,8 @@ p9_minus_1 (void)
   return ret;
 }
 
-/* { dg-final { scan-assembler     "xxspltib" } } */
-/* { dg-final { scan-assembler-not "mtvsrd"   } } */
-/* { dg-final { scan-assembler-not "lfd"      } } */
-/* { dg-final { scan-assembler-not "ld"       } } */
-/* { dg-final { scan-assembler-not "lxsd"     } } */
+/* { dg-final { scan-assembler     "\[ \t\]xxspltib" } } */
+/* { dg-final { scan-assembler-not "\[ \t\]mtvsrd"   } } */
+/* { dg-final { scan-assembler-not "\[ \t\]lfd"  } } */
+/* { dg-final { scan-assembler-not "\[ \t\]ld"   } } */
+/* { dg-final { scan-assembler-not "\[ \t\]lxsd" } } */
diff --git a/gcc/testsuite/gcc.target/powerpc/p9-dimode2.c b/gcc/testsuite/gcc.target/powerpc/p9-dimode2.c
index 0567a65..f33d18c 100644
--- a/gcc/testsuite/gcc.target/powerpc/p9-dimode2.c
+++ b/gcc/testsuite/gcc.target/powerpc/p9-dimode2.c
@@ -21,7 +21,7 @@ p9_large (void)
   return ret;
 }
 
-/* { dg-final { scan-assembler     "mtvsrd"   } } */
-/* { dg-final { scan-assembler-not "ld"       } } */
-/* { dg-final { scan-assembler-not "lfd"      } } */
-/* { dg-final { scan-assembler-not "lxsd"     } } */
+/* { dg-final { scan-assembler     "\[ \t\]mtvsrd" } } */
+/* { dg-final { scan-assembler-not "\[ \t\]ld"     } } */
+/* { dg-final { scan-assembler-not "\[ \t\]lfd"    } } */
+/* { dg-final { scan-assembler-not "\[ \t\]lxsd"   } } */


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

* Re: [PATCH, rs6000] whitespace fix for p9-dimode tests
  2016-12-08 16:18 [PATCH, rs6000] whitespace fix for p9-dimode tests Will Schmidt
@ 2016-12-09  2:55 ` Segher Boessenkool
  2016-12-09 16:23   ` Will Schmidt
  0 siblings, 1 reply; 3+ messages in thread
From: Segher Boessenkool @ 2016-12-09  2:55 UTC (permalink / raw)
  To: Will Schmidt; +Cc: GCC Patches, dje.gcc

Hello,

On Thu, Dec 08, 2016 at 10:18:42AM -0600, Will Schmidt wrote:
> I am seeing some failures in the p9-dimode tests. This appears to
> be due to the scan-assembler strings matching comment portions of the
> generated assembly, versus the actual generated assembly. In
> particular, the dg-final directive  { scan-assembler-not "ld"}
> is matching the "ld" as seen in the string
>   # 19 "/home/willschm/gcc/gcc-mainline-vec_fold/..."
> 
> This is resolved by adding a leading whitespace regex string "\[ \t\]"
> as seen in other tests.

That works; a more future-proof way is writing it as

/* { dg-final { scan-assembler-not {\mld\M}   } } */

which will also not match a future "ldlol" instruction (\m \M are like
\< \> in some other regular expression dialects; see
https://www.tcl.tk/man/tcl8.4/TclCmd/re_syntax.htm ).

Okay either way.  Thanks,


Segher

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

* Re: [PATCH, rs6000] whitespace fix for p9-dimode tests
  2016-12-09  2:55 ` Segher Boessenkool
@ 2016-12-09 16:23   ` Will Schmidt
  0 siblings, 0 replies; 3+ messages in thread
From: Will Schmidt @ 2016-12-09 16:23 UTC (permalink / raw)
  To: Segher Boessenkool; +Cc: GCC Patches, dje.gcc

On Thu, 2016-12-08 at 20:55 -0600, Segher Boessenkool wrote:
> Hello,
> 
> On Thu, Dec 08, 2016 at 10:18:42AM -0600, Will Schmidt wrote:
> > I am seeing some failures in the p9-dimode tests. This appears to
> > be due to the scan-assembler strings matching comment portions of the
> > generated assembly, versus the actual generated assembly. In
> > particular, the dg-final directive  { scan-assembler-not "ld"}
> > is matching the "ld" as seen in the string
> >   # 19 "/home/willschm/gcc/gcc-mainline-vec_fold/..."
> > 
> > This is resolved by adding a leading whitespace regex string "\[ \t\]"
> > as seen in other tests.
> 
> That works; a more future-proof way is writing it as
> 
> /* { dg-final { scan-assembler-not {\mld\M}   } } */
> 
> which will also not match a future "ldlol" instruction (\m \M are like
> \< \> in some other regular expression dialects; see
> https://www.tcl.tk/man/tcl8.4/TclCmd/re_syntax.htm ).
> 
> Okay either way.  Thanks,

I'll go with what I have for the moment, (commit rev 243493)  but the \m
syntax looks appealing,.. I'll likely use that in the future.
Thanks :-)

-Will

> 
> 
> Segher
> 


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

end of thread, other threads:[~2016-12-09 16:23 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-12-08 16:18 [PATCH, rs6000] whitespace fix for p9-dimode tests Will Schmidt
2016-12-09  2:55 ` Segher Boessenkool
2016-12-09 16:23   ` Will Schmidt

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