tree-ssa-pre.c (find_or_generate_expression): CALL_EXPR is okay too.

2005-05-17  Daniel Berlin  <dberlin@dberlin.org>

	* tree-ssa-pre.c (find_or_generate_expression): CALL_EXPR
	is okay too.

From-SVN: r99882
This commit is contained in:
Daniel Berlin 2005-05-18 03:07:44 +00:00 committed by Daniel Berlin
parent a21946f5a4
commit a3cf80ecc7
3 changed files with 15 additions and 1 deletions

View File

@ -1,3 +1,8 @@
2005-05-17 Daniel Berlin <dberlin@dberlin.org>
* tree-ssa-pre.c (find_or_generate_expression): CALL_EXPR
is okay too.
2005-05-17 Zdenek Dvorak <dvorakz@suse.cz>
* timevar.def (TV_SCEV_CONST): New timevar.

View File

@ -0,0 +1,8 @@
/* Tree PRE is going to transform this so that it doesn't call cos on the
d = 0 path, and in doing so, it needs to regenerate the cos call.
This was ICE'ing due to an overly strict check on what it knew how
to regenerate. */
/* { dg-do compile } */
/* { dg-options "-O2 -ffast-math" } */
double cos(double);
double f(double d, double i, int j) { if (j == 1) d = 0; return d * cos(i); }

View File

@ -1467,7 +1467,8 @@ find_or_generate_expression (basic_block block, tree expr, tree stmts)
gcc_assert (UNARY_CLASS_P (genop)
|| BINARY_CLASS_P (genop)
|| COMPARISON_CLASS_P (genop)
|| REFERENCE_CLASS_P (genop));
|| REFERENCE_CLASS_P (genop)
|| TREE_CODE (genop) == CALL_EXPR);
genop = create_expression_by_pieces (block, genop, stmts);
}
return genop;