Commit ab99f467 by Richard Biener Committed by Richard Biener

re PR tree-optimization/70780 (wrong code at -O2 and -O3 on x86_64-linux-gnu)

2016-04-25  Richard Biener  <rguenther@suse.de>

	PR tree-optimization/70780
	* tree-ssa-pre.c (compute_antic_aux): Also return true if the block
	wasn't visited yet.
	(compute_antic): Mark blocks with abnormal preds as visited as
	they have a final empty antic-in solution already.

	* gcc.dg/torture/pr70780.c: New testcase.

From-SVN: r235407
parent e52477c7
2016-04-25 Richard Biener <rguenther@suse.de>
PR tree-optimization/70780
* tree-ssa-pre.c (compute_antic_aux): Also return true if the block
wasn't visited yet.
(compute_antic): Mark blocks with abnormal preds as visited as
they have a final empty antic-in solution already.
2016-04-25 Michael Collison <michael.collison@linaro.org> 2016-04-25 Michael Collison <michael.collison@linaro.org>
* ChangeLog(2016-04-25): Fix ChangeLog formatting. * ChangeLog(2016-04-25): Fix ChangeLog formatting.
2016-04-25 Michael Collison <michael.collison@linaro.org> 2016-04-25 Michael Collison <michael.collison@linaro.org>
......
2016-04-25 Richard Biener <rguenther@suse.de>
PR tree-optimization/70780
* gcc.dg/torture/pr70780.c: New testcase.
2016-04-25 Michael Collison <michael.collison@arm.com> 2016-04-25 Michael Collison <michael.collison@arm.com>
* testsuite/gcc.target/arm/neon-vaddws16.c: New test. * testsuite/gcc.target/arm/neon-vaddws16.c: New test.
......
/* { dg-do run } */
int a, b, c, *d, e;
static int
fn1 ()
{
if (a)
goto l1;
l2: while (b)
if (*d)
return c;
for (e = 0; e; e++)
{
goto l2;
l1:;
}
return 0;
}
int
main ()
{
fn1 ();
return 0;
}
...@@ -2077,6 +2077,7 @@ compute_antic_aux (basic_block block, bool block_has_abnormal_pred_edge) ...@@ -2077,6 +2077,7 @@ compute_antic_aux (basic_block block, bool block_has_abnormal_pred_edge)
unsigned int bii; unsigned int bii;
edge e; edge e;
edge_iterator ei; edge_iterator ei;
bool was_visited = BB_VISITED (block);
old = ANTIC_OUT = S = NULL; old = ANTIC_OUT = S = NULL;
BB_VISITED (block) = 1; BB_VISITED (block) = 1;
...@@ -2167,7 +2168,7 @@ compute_antic_aux (basic_block block, bool block_has_abnormal_pred_edge) ...@@ -2167,7 +2168,7 @@ compute_antic_aux (basic_block block, bool block_has_abnormal_pred_edge)
clean (ANTIC_IN (block)); clean (ANTIC_IN (block));
if (!bitmap_set_equal (old, ANTIC_IN (block))) if (!was_visited || !bitmap_set_equal (old, ANTIC_IN (block)))
changed = true; changed = true;
maybe_dump_sets: maybe_dump_sets:
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment