diff mbox

Committed: skip gcc.dg/pr46309.c for CRIS

Message ID 201401101926.s0AJQtBw013628@ignucius.se.axis.com
State New
Headers show

Commit Message

Hans-Peter Nilsson Jan. 10, 2014, 7:26 p.m. UTC
This patch "fixes" a regression on trunk and the 4.8 branch:

Running /tmp/hpautotest-gcc48/gcc/gcc/testsuite/gcc.dg/dg.exp ...
...
FAIL: gcc.dg/pr46309.c scan-tree-dump-times reassoc2 "Optimizing range tests [^\r\n]*_[0-9]* -.0, 31. and -.128, 159.[\n\r]* into" 1

The comment in the test seen in the context indicates that it
depends on BRANCH_COST > 1.  As all cris*-*-* have BRANCH_COST 1
(with no option that set it higher), the only reasonable option
seems to skip the test.  A FAIL for this test seems only also
noticed for MIPS, AVR and s390; the test sets options to change
branch-cost to 2 for those targets (IMHO unconventional to have
an option exactly for this purpose) in the lines below the patch
context.

That the test has ever PASSed thus seemed weird so I looked in
my logs.  The test hasn't always passed for CRIS: it started
passing on trunk at (193019:193029] (before the 4.8 branch;
2012-10-31) which includes a commit with a follow-up for PR46309
with more test-coverage (without BRANCH_COST notes).  The
test-case gcc.dg/pr46309.c was not touched at that time and any
PASS effect for targets with BRANCH_COST=1 seems only
incidental.  It started failing for trunk at (206454:206460] and
on 4.8-branch at (206507:206513] whose intersection has:

+2014-01-09  Richard Biener  <rguenther@suse.de>
+
+	PR tree-optimization/59715
+	* tree-cfg.h (split_critical_edges): Declare.
+	* tree-cfg.c (split_critical_edges): Export.
+	* tree-ssa-sink.c (execute_sink_code): Split critical edges.
+

and the effect of the test failing seems as incidental as when
it started to pass.  BTW, I verified that setting BRANCH_COST to
2 indeed makes the test pass for cris-elf, which of course by
itself is not an acceptable fix.

I know there's a redundant {} level there, but it won't be
redundant if adding targets to that list, still if there are
more tests like this maybe it's worthwhile to consider adding
an effective-target branch_cost_gt_1 or something.

gcc/testsuite:
	* gcc.dg/pr46309.c: Disable for cris*-*-*.


Anyway, enough with the commentary, committed to trunk and 4.8-branch.

brgds, H-P

Comments

Mike Stump Jan. 11, 2014, 12:55 a.m. UTC | #1
On Jan 10, 2014, at 11:26 AM, Hans-Peter Nilsson <hans-peter.nilsson@axis.com> wrote:
> This patch "fixes" a regression on trunk and the 4.8 branch:

> Index: gcc/testsuite/gcc.dg/pr46309.c
> ===================================================================
> --- gcc/testsuite/gcc.dg/pr46309.c	(revision 206534)
> +++ gcc/testsuite/gcc.dg/pr46309.c	(working copy)
> @@ -1,5 +1,5 @@
> /* PR tree-optimization/46309 */
> -/* { dg-do compile } */
> +/* { dg-do compile { target { ! { cris*-*-* } } } } */

If you could add /* branch cost==1 */ or some such to it, it would help others that have ports and see it fail, why this might be appropriate to just skip on their target, thanks.
diff mbox

Patch

Index: gcc/testsuite/gcc.dg/pr46309.c
===================================================================
--- gcc/testsuite/gcc.dg/pr46309.c	(revision 206534)
+++ gcc/testsuite/gcc.dg/pr46309.c	(working copy)
@@ -1,5 +1,5 @@ 
 /* PR tree-optimization/46309 */
-/* { dg-do compile } */
+/* { dg-do compile { target { ! { cris*-*-* } } } } */
 /* { dg-options "-O2 -fdump-tree-reassoc-details" } */
 /* The transformation depends on BRANCH_COST being greater than 1
    (see the notes in the PR), so try to force that.  */