diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 6271933bd134..60f09e496314 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,9 @@ +2011-05-27 Bill Schmidt + + PR tree-optimization/49170 + * tree-ssa-math-opts.c (execute_cse_sincos): Add checks for + sincos or cexp. + 2011-05-27 Richard Guenther PR middle-end/49189 diff --git a/gcc/tree-ssa-math-opts.c b/gcc/tree-ssa-math-opts.c index cd601e3dd0cb..975ce9b1e5f2 100644 --- a/gcc/tree-ssa-math-opts.c +++ b/gcc/tree-ssa-math-opts.c @@ -1093,6 +1093,10 @@ execute_cse_sincos (void) CASE_FLT_FN (BUILT_IN_COS): CASE_FLT_FN (BUILT_IN_SIN): CASE_FLT_FN (BUILT_IN_CEXPI): + /* Make sure we have either sincos or cexp. */ + if (!TARGET_HAS_SINCOS && !TARGET_C99_FUNCTIONS) + break; + arg = gimple_call_arg (stmt, 0); if (TREE_CODE (arg) == SSA_NAME) cfg_changed |= execute_cse_sincos_1 (arg);