Committed: skip gcc.dg/pr46309.c for CRIS
Hans-Peter Nilsson
hans-peter.nilsson@axis.com
Fri Jan 10 19:27:00 GMT 2014
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*-*-*.
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. */
Anyway, enough with the commentary, committed to trunk and 4.8-branch.
brgds, H-P
More information about the Gcc-patches
mailing list