tree-ssa-reassoc.c (attempt_builtin_copysign): Call gimple_call_builtin instead of is_gimple_call.

* tree-ssa-reassoc.c (attempt_builtin_copysign): Call
	gimple_call_builtin instead of is_gimple_call.

	* gcc.dg/tree-ssa/reassoc-42.c: New test.

From-SVN: r228843
This commit is contained in:
Marek Polacek 2015-10-15 13:22:47 +00:00 committed by Marek Polacek
parent 7701fc20a0
commit 261e8f066b
4 changed files with 18 additions and 1 deletions

View File

@ -1,3 +1,8 @@
2015-10-15 Marek Polacek <polacek@redhat.com>
* tree-ssa-reassoc.c (attempt_builtin_copysign): Call
gimple_call_builtin instead of is_gimple_call.
2015-10-15 Richard Biener <rguenther@suse.de>
* tree-vect-stmts.c (vect_init_vector): Remove unused vars.

View File

@ -1,3 +1,7 @@
2015-10-15 Marek Polacek <polacek@redhat.com>
* gcc.dg/tree-ssa/reassoc-42.c: New test.
2015-10-15 Marek Polacek <polacek@redhat.com>
PR tree-optimization/67953

View File

@ -0,0 +1,8 @@
/* { dg-do compile } */
/* { dg-options "-Ofast" } */
double
foo (double f(void))
{
return 2. * f ();
}

View File

@ -4643,7 +4643,7 @@ attempt_builtin_copysign (vec<operand_entry *> *ops)
&& has_single_use (oe->op))
{
gimple *def_stmt = SSA_NAME_DEF_STMT (oe->op);
if (is_gimple_call (def_stmt))
if (gimple_call_builtin_p (def_stmt, BUILT_IN_NORMAL))
{
tree fndecl = gimple_call_fndecl (def_stmt);
tree arg0, arg1;