public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
* Minor testsuite improvement
@ 1999-08-31 17:01 Jeffrey A Law
  1999-08-31 22:41 ` Jeffrey A Law
  0 siblings, 1 reply; 8+ messages in thread
From: Jeffrey A Law @ 1999-08-31 17:01 UTC (permalink / raw)
  To: gcc-patches

This speeds up native testing of the c-torture execute tests by a few
percent for native tests.

Basically there's an optimization in the test path which greatly helps
embedded or simulated targets, but loses for native targets because the
costs of the various steps is radically different.

        * lib/c-torture.exp: Avoid the "compare executables" optimization
        when testing native.

Index: c-torture.exp
===================================================================
RCS file: /egcs/carton/cvsfiles/egcs/gcc/testsuite/lib/c-torture.exp,v
retrieving revision 1.11
diff -c -3 -p -r1.11 c-torture.exp
*** c-torture.exp	1999/06/30 01:36:43	1.11
--- c-torture.exp	1999/08/31 23:58:48
*************** proc c-torture-execute { src args } {
*** 189,196 ****
              set ignore_me [eval $torture_eval_before_execute]
  	}
  	
  	set skip 0;
! 	if [info exists oldexec] {
  	    if { [remote_file build cmp $oldexec $execname] == 0 } {
  		set skip 1;
  	    }
--- 189,210 ----
              set ignore_me [eval $torture_eval_before_execute]
  	}
  	
+ 
+ 	# Sometimes we end up creating identical executables for two
+ 	# consecutive sets of different of compiler options.
+ 	#
+ 	# In such cases we know the result of this test will be identical
+ 	# to the result of the last test.
+ 	#
+ 	# So in cases where the time to load and run/simulate the test
+ 	# is relatively high, compare the two binaries and avoid rerunning
+ 	# tests if the executables are identical.
+ 	#
+ 	# Do not do this for native testing since the cost to load/execute
+ 	# the test is fairly small and the comparison step actually slows
+ 	# the entire process down because it usually does not "hit".
  	set skip 0;
! 	if { ![isnative] && [info exists oldexec] } {
  	    if { [remote_file build cmp $oldexec $execname] == 0 } {
  		set skip 1;
  	    }



^ permalink raw reply	[flat|nested] 8+ messages in thread
* Minor testsuite improvement
@ 2013-01-10  5:15 Jeff Law
  2013-01-10 10:13 ` Richard Biener
  0 siblings, 1 reply; 8+ messages in thread
From: Jeff Law @ 2013-01-10  5:15 UTC (permalink / raw)
  To: gcc-patches

[-- Attachment #1: Type: text/plain, Size: 404 bytes --]


Gary Funck noted that vrp06.c has two tests with the same output.  After 
further investigation it was clear that expected output strings were too 
lenient and were in fact masking a missed optimization.

This patch tightens the expected output from the vrp dump which has the 
side effect of making each test's string unique.  Obviously the masked 
failure is xfailed.

OK for the trunk?

Thanks,
Jeff

[-- Attachment #2: patch --]
[-- Type: text/plain, Size: 943 bytes --]

	* gcc/dg/tree-ssa/vrp06.c: Tighten expected output.  Make each
	pass/fail message unique.

diff --git a/gcc/testsuite/gcc.dg/tree-ssa/vrp06.c b/gcc/testsuite/gcc.dg/tree-ssa/vrp06.c
index 1ef6c92..4edca36 100644
--- a/gcc/testsuite/gcc.dg/tree-ssa/vrp06.c
+++ b/gcc/testsuite/gcc.dg/tree-ssa/vrp06.c
@@ -25,7 +25,7 @@ foo (int i, int j, int a)
   return i + a + j;
 }
 
-/* { dg-final { scan-tree-dump-times "Folding predicate i_.*to 0" 1 "vrp1" } } */
-/* { dg-final { scan-tree-dump-times "Folding predicate j_.*to 1" 1 "vrp1" } } */
-/* { dg-final { scan-tree-dump-times "Folding predicate i_.*to 0" 1 "vrp1" } } */
+/* { dg-final { scan-tree-dump-times "Folding predicate i_.*0 to 0" 1 "vrp1" } } */
+/* { dg-final { scan-tree-dump-times "Folding predicate j_.*0 to 1" 1 "vrp1" } } */
+/* { dg-final { scan-tree-dump-times "Folding predicate i_.*j_.* to 0" 1 "vrp1" { xfail *-*-* } } } */
 /* { dg-final { cleanup-tree-dump "vrp1" } } */

^ permalink raw reply	[flat|nested] 8+ messages in thread
* Re: Minor testsuite improvement
@ 2013-01-10 10:31 Uros Bizjak
  2013-01-10 16:18 ` Jeff Law
  0 siblings, 1 reply; 8+ messages in thread
From: Uros Bizjak @ 2013-01-10 10:31 UTC (permalink / raw)
  To: gcc-patches; +Cc: Richard Biener, Jeff Law

Hello!

>> This patch tightens the expected output from the vrp dump which has the side
>> effect of making each test's string unique.  Obviously the masked failure is
>> xfailed.
>>
>> OK for the trunk?
>
> Hmm, but if the SSA versions are simply i_10 then i_.*0 will still match it
> the same?  I think you want the more elaborate 'i_\[0-9\]* . 0' here?

IMO 'i_\[0-9\]+' would be better, we need at least one digit here.

Uros.

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

end of thread, other threads:[~2013-01-10 19:18 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
1999-08-31 17:01 Minor testsuite improvement Jeffrey A Law
1999-08-31 22:41 ` Jeffrey A Law
2013-01-10  5:15 Jeff Law
2013-01-10 10:13 ` Richard Biener
2013-01-10 16:54   ` Jeff Law
2013-01-10 19:18   ` Jeff Law
2013-01-10 10:31 Uros Bizjak
2013-01-10 16:18 ` Jeff Law

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