From: Marek Polacek Date: Thu, 15 Oct 2015 13:22:47 +0000 (+0000) Subject: tree-ssa-reassoc.c (attempt_builtin_copysign): Call gimple_call_builtin instead of... X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=261e8f066b95ebc02530df8b78be14f911c73406;p=gcc.git 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 --- diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 380f1eed379..50c7f57e40f 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,8 @@ +2015-10-15 Marek Polacek + + * tree-ssa-reassoc.c (attempt_builtin_copysign): Call + gimple_call_builtin instead of is_gimple_call. + 2015-10-15 Richard Biener * tree-vect-stmts.c (vect_init_vector): Remove unused vars. diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index 631d8a7b613..181e5e482e0 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,7 @@ +2015-10-15 Marek Polacek + + * gcc.dg/tree-ssa/reassoc-42.c: New test. + 2015-10-15 Marek Polacek PR tree-optimization/67953 diff --git a/gcc/testsuite/gcc.dg/tree-ssa/reassoc-42.c b/gcc/testsuite/gcc.dg/tree-ssa/reassoc-42.c new file mode 100644 index 00000000000..9c8eb396e4d --- /dev/null +++ b/gcc/testsuite/gcc.dg/tree-ssa/reassoc-42.c @@ -0,0 +1,8 @@ +/* { dg-do compile } */ +/* { dg-options "-Ofast" } */ + +double +foo (double f(void)) +{ + return 2. * f (); +} diff --git a/gcc/tree-ssa-reassoc.c b/gcc/tree-ssa-reassoc.c index 62438dd7027..45b8d467d48 100644 --- a/gcc/tree-ssa-reassoc.c +++ b/gcc/tree-ssa-reassoc.c @@ -4643,7 +4643,7 @@ attempt_builtin_copysign (vec *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;