[Bug testsuite/53664] neon-testgen.ml generates duplicate scan-assembler directives

2017-06-19 Thread rearnsha at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=53664

Richard Earnshaw  changed:

   What|Removed |Added

 Status|NEW |RESOLVED
 Resolution|--- |FIXED

--- Comment #16 from Richard Earnshaw  ---
neon-testgen.ml has now been deleted.

[Bug testsuite/53664] neon-testgen.ml generates duplicate scan-assembler directives

2012-08-02 Thread ramrad01 at arm dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=53664

--- Comment #15 from ramrad01 at arm dot com 2012-08-02 10:10:47 UTC ---
On 08/02/12 00:35, janis at gcc dot gnu.org wrote:
 http://gcc.gnu.org/bugzilla/show_bug.cgi?id=53664

 --- Comment #14 from Janis Johnson janis at gcc dot gnu.org 2012-08-01 
 23:35:12 UTC ---
 Ramana, chunks of regular expressions within parentheses are matched and added
 to the returned expression that is used in scan-assembler-times.  To avoid
 returning parenthesized bits you need to replace (regexp) with (?:regexp).
 Here's what works in vst4Qu8.c (cut and pasted, so tabs are wrong):

 /* { dg-final { scan-assembler-times vst4\.8\[
 \]+\\\{(?:(?:\[dD\]\[0-9\]+-\[dD\]\[0-9\]+)|(?:\[dD\]\[0-9\]+, \[dD\]\[0-9\]+,
 \[dD\]\[0-9\]+, \[dD\]\[0-9\]+))\\\},
 \\\[\[rR\]\[0-9\]+\(?::\[0-9\]+\)?\\\]!?\(?:\[ \]+@\[a-zA-Z0-9 \]+\)?\n 2
 } } */


Thanks for digging further. I assume this will work the same regardless 
of whether it used in scan-assembler and scan-assembler-times. I'll try 
to change the generator later today if you think that to be the case or 
muck about with a couple of the vld2Q tests to check if this works there 
as well.


Ramana

 I haven't tried modifying the test generator.



[Bug testsuite/53664] neon-testgen.ml generates duplicate scan-assembler directives

2012-08-01 Thread janis at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=53664

--- Comment #14 from Janis Johnson janis at gcc dot gnu.org 2012-08-01 
23:35:12 UTC ---
Ramana, chunks of regular expressions within parentheses are matched and added
to the returned expression that is used in scan-assembler-times.  To avoid
returning parenthesized bits you need to replace (regexp) with (?:regexp). 
Here's what works in vst4Qu8.c (cut and pasted, so tabs are wrong):

/* { dg-final { scan-assembler-times vst4\.8\[
\]+\\\{(?:(?:\[dD\]\[0-9\]+-\[dD\]\[0-9\]+)|(?:\[dD\]\[0-9\]+, \[dD\]\[0-9\]+,
\[dD\]\[0-9\]+, \[dD\]\[0-9\]+))\\\},
\\\[\[rR\]\[0-9\]+\(?::\[0-9\]+\)?\\\]!?\(?:\[ \]+@\[a-zA-Z0-9 \]+\)?\n 2
} } */

I haven't tried modifying the test generator.


[Bug testsuite/53664] neon-testgen.ml generates duplicate scan-assembler directives

2012-07-31 Thread janis at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=53664

--- Comment #8 from Janis Johnson janis at gcc dot gnu.org 2012-07-31 
15:56:12 UTC ---
For some reason I couldn't apply the patch, but manually changed the tests to
use { scan-assembler-times regexp 2 } instead of { scan assembler regexp }.

Ramana, have you tried running the tests?  They should pass but don't.  I'll
take a closer look at what scan-assembler-times and Tcl's regexp are doing.


[Bug testsuite/53664] neon-testgen.ml generates duplicate scan-assembler directives

2012-07-31 Thread ramana at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=53664

--- Comment #9 from Ramana Radhakrishnan ramana at gcc dot gnu.org 2012-07-31 
16:16:11 UTC ---
(In reply to comment #8)
 For some reason I couldn't apply the patch, but manually changed the tests to
 use { scan-assembler-times regexp 2 } instead of { scan assembler regexp }.

That is interesting . I did create the patch with git diff and just attached it 


 
 Ramana, have you tried running the tests?  They should pass but don't.  I'll
 take a closer look at what scan-assembler-times and Tcl's regexp are doing.

I wasn't able to run them late last night as I was playing on a machine which
just had ocaml but wasn't set up for testing.

ramana


[Bug testsuite/53664] neon-testgen.ml generates duplicate scan-assembler directives

2012-07-31 Thread janis at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=53664

--- Comment #10 from Janis Johnson janis at gcc dot gnu.org 2012-07-31 
16:49:23 UTC ---
The problem is the regular expression, which matches far too much text and ends
up with a length of 5 instead of 2.


[Bug testsuite/53664] neon-testgen.ml generates duplicate scan-assembler directives

2012-07-31 Thread janis at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=53664

--- Comment #11 from Janis Johnson janis at gcc dot gnu.org 2012-07-31 
17:30:15 UTC ---
Sorry, I had been assuming that the tests in our tree match what's upstream but
the expressions to match are slightly different.  I'll keep investigating.


[Bug testsuite/53664] neon-testgen.ml generates duplicate scan-assembler directives

2012-07-31 Thread ramana at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=53664

--- Comment #12 from Ramana Radhakrishnan ramana at gcc dot gnu.org 
2012-07-31 17:56:29 UTC ---

(In reply to comment #8)
 For some reason I couldn't apply the patch, but manually changed the tests to
 use { scan-assembler-times regexp 2 } instead of { scan assembler regexp }.
 
 Ramana, have you tried running the tests?  They should pass but don't.  I'll
 take a closer look at what scan-assembler-times and Tcl's regexp are doing.

I finally tried this on fsf trunk and it applied cleanly for me here and ran
the tests. The tests for vld2Q intrinsics appear to pass fine for me here. 

The changes related to vld2Q appear to be doing fine, there we've actually
removed the redundant duplication and what appears to be a bug in the test
generator. 



(In reply to comment #11)
 Sorry, I had been assuming that the tests in our tree match what's upstream 
 but
 the expressions to match are slightly different.  I'll keep investigating.


Thanks for digging further - What I don't follow is why the
scan-assembler-times appears to fail while the scan-assembler doesn't. 

FTR, the vld3Q and vld4Q intrinsics should indeed produce 2 vld3 and vld4
instructions. 

regards,
ramana


[Bug testsuite/53664] neon-testgen.ml generates duplicate scan-assembler directives

2012-07-31 Thread janis at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=53664

--- Comment #13 from Janis Johnson janis at gcc dot gnu.org 2012-07-31 
18:01:55 UTC ---
The scan-assembler finds the expression at least once and passes.  The
scan-assembler-times directive expects to find the expression twice, but the
returned match is 5 lines, not 2.  I'm building a version whose tests match
those upstream and will report what's happening there.  I'm not set up to run
neon tests with an upstream tree.


[Bug testsuite/53664] neon-testgen.ml generates duplicate scan-assembler directives

2012-07-30 Thread ramana at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=53664

--- Comment #4 from Ramana Radhakrishnan ramana at gcc dot gnu.org 2012-07-30 
18:30:40 UTC ---


(In reply to comment #0)
 Tests gcc/testsuite/gcc.target/arm/neon/v*.c are generated by the script
 gcc/config/arm/neon-testgen.ml.  54 of these tests have duplicate
 scan-assembler test directives, leading to duplicate lines in the test summary
 file.  The test generator is an O'Caml program.
 
 I'm hoping that someone who knows that language will kindly take a look at 
 this
 bug, fix it, and regenerate the tests.

I took a quick peek , it's a bit of work to get this done - the problem really
is in the way in which we are generating with emit_epilogue - would be nice if
one could get a hold of VecArray at this point of time and generate
scan-assembler-times the arity  

I don't do enough ML to deal with it right now.


Ramana


[Bug testsuite/53664] neon-testgen.ml generates duplicate scan-assembler directives

2012-07-30 Thread janis at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=53664

--- Comment #5 from Janis Johnson janis at gcc dot gnu.org 2012-07-30 
18:34:50 UTC ---
Thanks for looking, Ramana.  I noticed in my investigation that the search
string needs to be different for scan-assembler-times than for scan-assembler,
since the regular expression handling seems to be different.


[Bug testsuite/53664] neon-testgen.ml generates duplicate scan-assembler directives

2012-07-30 Thread ramana at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=53664

--- Comment #6 from Ramana Radhakrishnan ramana at gcc dot gnu.org 2012-07-31 
00:00:36 UTC ---
Created attachment 27901
  -- http://gcc.gnu.org/bugzilla/attachment.cgi?id=27901
Tentative patch.

Tentative patch - has a few unneeded whitespace changes but probably fixes the
issue. I need to see how this does also with my current changes to the neon
testsuite here but this really should be orthogonal to the other patch.

http://gcc.gnu.org/ml/gcc-patches/2012-07/msg01472.html

Ramana


[Bug testsuite/53664] neon-testgen.ml generates duplicate scan-assembler directives

2012-07-30 Thread ramana at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=53664

--- Comment #7 from Ramana Radhakrishnan ramana at gcc dot gnu.org 2012-07-31 
00:04:58 UTC ---
(In reply to comment #5)
 Thanks for looking, Ramana.  I noticed in my investigation that the search
 string needs to be different for scan-assembler-times than for scan-assembler,
 since the regular expression handling seems to be different.

Could you take a look at the output of the tentative-patch I've attached here ?
I'll clean it up and submit it properly sometime tomorrow.

Ramana


[Bug testsuite/53664] neon-testgen.ml generates duplicate scan-assembler directives

2012-06-20 Thread ramana at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=53664

Ramana Radhakrishnan ramana at gcc dot gnu.org changed:

   What|Removed |Added

 Status|UNCONFIRMED |NEW
   Last reconfirmed||2012-06-20
 CC||jules at gcc dot gnu.org,
   ||ramana at gcc dot gnu.org
 Ever Confirmed|0   |1

--- Comment #1 from Ramana Radhakrishnan ramana at gcc dot gnu.org 2012-06-20 
10:16:28 UTC ---
The 54 duplicates are with a quick use of sed, awk and grep.

vld2Qf32.c vld2Qp16.c vld2Qp8.c vld2Qs16.c vld2Qs32.c vld2Qs8.c vld2Qu16.c
vld2Qu32.c vld2Qu8.c 

vld3Qf32.c vld3Qp16.c vld3Qp8.c vld3Qs16.c vld3Qs32.c vld3Qs8.c vld3Qu16.c
vld3Qu32.c vld3Qu8.c vld4Qf32.c vld4Qp16.c vld4Qp8.c vld4Qs16.c vld4Qs32.c
vld4Qs8.c vld4Qu16.c vld4Qu32.c vld4Qu8.c vst2Qf32.c vst2Qp16.c vst2Qp8.c
vst2Qs16.c vst2Qs32.c vst2Qs8.c vst2Qu16.c vst2Qu32.c vst2Qu8.c vst3Qf32.c
vst3Qp16.c vst3Qp8.c vst3Qs16.c vst3Qs32.c vst3Qs8.c vst3Qu16.c vst3Qu32.c
vst3Qu8.c vst4Qf32.c vst4Qp16.c vst4Qp8.c vst4Qs16.c vst4Qs32.c vst4Qs8.c
vst4Qu16.c vst4Qu32.c vst4Qu8.c

However these really are not duplicates of scan-assembler directives. The
vld{3,4} instructions with 128 bit vector types should generate 2 vld{3,4}
instructions. 

However there is a bug in the v{ld/st}2Q{type}.c tests where there should be
just one single vld2 instruction generated as these can deal with 4 registers.

Ramana


[Bug testsuite/53664] neon-testgen.ml generates duplicate scan-assembler directives

2012-06-20 Thread janis at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=53664

--- Comment #2 from Janis Johnson janis at gcc dot gnu.org 2012-06-20 
14:15:52 UTC ---
Two scan-assembler directives with the same search string don't look for two
instances of the same string, they just look for the same thing twice and pass
if that string only occurs once.  To look for two of them you'd need
scan-assembler-times, with 2 as the expected number.


[Bug testsuite/53664] neon-testgen.ml generates duplicate scan-assembler directives

2012-06-20 Thread ramana at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=53664

--- Comment #3 from Ramana Radhakrishnan ramana at gcc dot gnu.org 2012-06-20 
14:59:33 UTC ---
(In reply to comment #2)
 Two scan-assembler directives with the same search string don't look for two
 instances of the same string, they just look for the same thing twice and pass
 if that string only occurs once.  To look for two of them you'd need
 scan-assembler-times, with 2 as the expected number.

Agreed - Aargh .That bit of my post appears to have disappeared. 

Ramana