On Thu, 24 Sep 2020, Tom de Vries wrote: > Hi, > > With the nvptx target, we run into: > ... > FAIL: gcc.dg/pr94600-1.c scan-rtl-dump-times final "\\(mem/v" 6 > FAIL: gcc.dg/pr94600-1.c scan-rtl-dump-times final "\\(set \\(mem/v" 6 > FAIL: gcc.dg/pr94600-3.c scan-rtl-dump-times final "\\(mem/v" 1 > FAIL: gcc.dg/pr94600-3.c scan-rtl-dump-times final "\\(set \\(mem/v" 1 > ... > The scans attempt to check for volatile stores, but on nvptx we have memcpy > instead. > > This is due to nvptx being a STRICT_ALIGNMENT target, which has the effect > that the TYPE_MODE for the store target is set to BKLmode in > compute_record_mode. > > Fix the FAILs by requiring effective target non_strict_align.
No, that's wrong. There's more than that at play; it worked for the strict-alignment targets where it was tested at the time. The test is a valuable canary for this kind of bug. You now disabled it for strict-alignment targets. Please revert and add your target specifier instead, if you don't feel like investigating further. brgds, H-P > Tested on nvptx. > > Committed to trunk. > > Thanks, > - Tom > > [testsuite] Require non_strict_align in pr94600-{1,3}.c > > gcc/testsuite/ChangeLog: > > 2020-09-24 Tom de Vries <tdevr...@suse.de> > > * gcc.dg/pr94600-1.c: Require effective target non_strict_align for > scan-rtl-dump-times. > * gcc.dg/pr94600-3.c: Same. > > --- > gcc/testsuite/gcc.dg/pr94600-1.c | 4 ++-- > gcc/testsuite/gcc.dg/pr94600-3.c | 4 ++-- > 2 files changed, 4 insertions(+), 4 deletions(-) > > diff --git a/gcc/testsuite/gcc.dg/pr94600-1.c > b/gcc/testsuite/gcc.dg/pr94600-1.c > index b5913a0939c..38f939a98cb 100644 > --- a/gcc/testsuite/gcc.dg/pr94600-1.c > +++ b/gcc/testsuite/gcc.dg/pr94600-1.c > @@ -32,5 +32,5 @@ foo(void) > } > > /* The only volatile accesses should be the obvious writes. */ > -/* { dg-final { scan-rtl-dump-times {\(mem/v} 6 "final" } } */ > -/* { dg-final { scan-rtl-dump-times {\(set \(mem/v} 6 "final" } } */ > +/* { dg-final { scan-rtl-dump-times {\(mem/v} 6 "final" { target { > non_strict_align } } } } */ > +/* { dg-final { scan-rtl-dump-times {\(set \(mem/v} 6 "final" { target { > non_strict_align } } } } */ > diff --git a/gcc/testsuite/gcc.dg/pr94600-3.c > b/gcc/testsuite/gcc.dg/pr94600-3.c > index 7537f6cb797..e8776fbdb28 100644 > --- a/gcc/testsuite/gcc.dg/pr94600-3.c > +++ b/gcc/testsuite/gcc.dg/pr94600-3.c > @@ -31,5 +31,5 @@ foo(void) > } > > /* The loop isn't unrolled. */ > -/* { dg-final { scan-rtl-dump-times {\(mem/v} 1 "final" } } */ > -/* { dg-final { scan-rtl-dump-times {\(set \(mem/v} 1 "final" } } */ > +/* { dg-final { scan-rtl-dump-times {\(mem/v} 1 "final" { target { > non_strict_align } } } } */ > +/* { dg-final { scan-rtl-dump-times {\(set \(mem/v} 1 "final" { target { > non_strict_align } } } } */ >