Message ID | 1481213922.13393.31.camel@brimstone.rchland.ibm.com |
---|---|
State | New |
Headers | show |
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
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 >
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" } } */