Commit 7b4eaf7e by Richard Guenther Committed by Richard Biener

re PR tree-optimization/37997 (PHI translation does not simplify to non-constants)

2012-01-19  Richard Guenther  <rguenther@suse.de>

	PR tree-optimization/37997
	* gcc.dg/tree-ssa/ssa-pre-28.c: New testcase.

From-SVN: r183297
parent f90aa714
2012-01-19 Richard Guenther <rguenther@suse.de>
PR tree-optimization/37997
* gcc.dg/tree-ssa/ssa-pre-28.c: New testcase.
2012-01-19 Andrey Belevantsev <abel@ispras.ru>
PR rtl-optimization/51505
......
/* PR37997 */
/* { dg-do compile } */
/* { dg-options "-O2 -fdump-tree-pre-details" } */
int foo (int i, int b, int result)
{
int mask;
if (b)
mask = -1;
else
mask = 0;
result = i + 1;
result = result & mask;
return result;
}
/* We should insert i + 1 into the if (b) path as well as the simplified
i + 1 & -1 expression. And do replacement with two PHI temps. */
/* { dg-final { scan-tree-dump-times "with prephitmp" 2 "pre" } } */
/* { dg-final { cleanup-tree-dump "pre" } } */
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