aboutsummaryrefslogtreecommitdiff
path: root/gcc/tree-ssa-math-opts.c
diff options
context:
space:
mode:
authorBill Schmidt <wschmidt@linux.vnet.ibm.com>2011-05-27 13:29:57 +0000
committerWilliam Schmidt <wschmidt@gcc.gnu.org>2011-05-27 13:29:57 +0000
commitfa65a9cfed495a4f092c2d6c2ddc2ec946565c18 (patch)
tree4f5ec5c5df6289c84f3ef9f9f3fec9e20c388a76 /gcc/tree-ssa-math-opts.c
parentc2299dfe5337c92723ad8d6c92a41731badc6a0a (diff)
downloadgcc-fa65a9cfed495a4f092c2d6c2ddc2ec946565c18.zip
gcc-fa65a9cfed495a4f092c2d6c2ddc2ec946565c18.tar.gz
gcc-fa65a9cfed495a4f092c2d6c2ddc2ec946565c18.tar.bz2
Index...
Index: gcc/ChangeLog =================================================================== --- gcc/ChangeLog (revision 174330) +++ gcc/ChangeLog (working copy) @@ -1,3 +1,9 @@ +2011-05-27 Bill Schmidt <wschmidt@linux.vnet.ibm.com> + + PR tree-optimization/49170 + * tree-ssa-math-opts.c (execute_cse_sincos): Add checks for + sincos or cexp. + 2011-05-27 Richard Guenther <rguenther@suse.de> PR middle-end/49189 Index: gcc/tree-ssa-math-opts.c =================================================================== --- gcc/tree-ssa-math-opts.c (revision 174330) +++ gcc/tree-ssa-math-opts.c (working copy) @@ -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); From-SVN: r174331
Diffstat (limited to 'gcc/tree-ssa-math-opts.c')
-rw-r--r--gcc/tree-ssa-math-opts.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/gcc/tree-ssa-math-opts.c b/gcc/tree-ssa-math-opts.c
index cd601e3..975ce9b 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);