Commit 85bc75f8 by Richard Biener Committed by Richard Biener

re PR tree-optimization/87263 (ICE on valid code at -O1: verify_ssa failed)

2018-09-13  Richard Biener  <rguenther@suse.de>

	PR tree-optimization/87263
	* tree-ssa-sccvn.c (visit_phi): Revert some earlier changes.
	(struct unwind_state): Add max_rpo field.
	(do_rpo_vn): Allow up-to-date loop state to be used when not iterating.
	Compute max_rpo, the max RPO number a block can be backwards reached
	from.  Re-write non-iterating mode to a RPO ordered worklist approach,
	separating it from the iterating mode.

	* gcc.dg/torture/pr87263.c: New testcase.
	* gcc.dg/torture/ssa-fre-2.c: Likewise.
	* gcc.dg/torture/ssa-fre-3.c: Likewise.
	* gcc.dg/torture/ssa-fre-4.c: Likewise.

From-SVN: r264273
parent 08233f0d
2018-09-13 Richard Biener <rguenther@suse.de>
PR tree-optimization/87263
* tree-ssa-sccvn.c (visit_phi): Revert some earlier changes.
(struct unwind_state): Add max_rpo field.
(do_rpo_vn): Allow up-to-date loop state to be used when not iterating.
Compute max_rpo, the max RPO number a block can be backwards reached
from. Re-write non-iterating mode to a RPO ordered worklist approach,
separating it from the iterating mode.
2018-09-13 Vlad Lazar <vlad.lazar@arm.com>
* haifa-sched.c (rank_for_schedule): Schedule by INSN_COST.
......
2018-09-13 Richard Biener <rguenther@suse.de>
PR tree-optimization/87263
* gcc.dg/torture/pr87263.c: New testcase.
* gcc.dg/torture/ssa-fre-2.c: Likewise.
* gcc.dg/torture/ssa-fre-3.c: Likewise.
* gcc.dg/torture/ssa-fre-4.c: Likewise.
2018-09-13 Omar Sandoval <osandov@osandov.com>
Tom de Vries <tdevries@suse.de>
......
/* { dg-do compile } */
int a, b, c;
int main ()
{
int g, *h[3] = {&g, &g, &g};
if (h[2] == 0)
;
else
{
int i[1];
if (a)
while (a)
L:;
else
{
int k = b;
}
}
if ((b < c) > b)
goto L;
return 0;
}
/* { dg-do run } */
int x;
int main()
{
int i = 0;
x = 0;
if (x)
{
for (; i < 10; ++i)
{
doit:
x = i;
}
}
if (!x)
goto doit;
if (x != 9)
__builtin_abort ();
return 0;
}
/* { dg-do compile } */
/* { dg-skip-if "" { *-*-* } { "-O0" } { "" } } */
/* { dg-additional-options "-fdump-tree-fre1" } */
int x;
int main()
{
x = 0;
int z = x;
int w = 1;
for (int i = 0; i < 32; ++i)
{
if (z)
w = 2;
else
w = 1;
if (w == 2)
__builtin_abort ();
}
return w;
}
/* { dg-final { scan-tree-dump-not "abort" "fre1" } } */
/* { dg-do compile } */
/* { dg-skip-if "" { *-*-* } { "-O0" } { "" } } */
/* { dg-additional-options "-fdump-tree-fre1" } */
int x;
int main()
{
x = 0;
if (x)
{
for (int i = 0; i < 10; ++i)
x = i;
}
return x;
}
/* { dg-final { scan-tree-dump "return 0;" "fre1" } } */
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