summaryrefslogtreecommitdiff
path: root/gcc/tree-ssa-math-opts.c
diff options
context:
space:
mode:
authorbstarynk <bstarynk@138bc75d-0d04-0410-961f-82ee72b054a4>2011-06-08 06:47:55 +0000
committerbstarynk <bstarynk@138bc75d-0d04-0410-961f-82ee72b054a4>2011-06-08 06:47:55 +0000
commitad2e171e6b39572f3420056ddc75e2868744dc72 (patch)
tree8b08c29413b956616f6d0adb1a107f17e70a4e99 /gcc/tree-ssa-math-opts.c
parent61c059fcd4ddcc849aae31efce0f1a4866c0d04b (diff)
downloadgcc-ad2e171e6b39572f3420056ddc75e2868744dc72.tar.gz
2011-06-08 Basile Starynkevitch <basile@starynkevitch.net>
MELT branch merged with trunk rev 174972 using svnmerge also patched fixincludes/genfixes git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/branches/melt-branch@174797 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/tree-ssa-math-opts.c')
-rw-r--r--gcc/tree-ssa-math-opts.c24
1 files changed, 3 insertions, 21 deletions
diff --git a/gcc/tree-ssa-math-opts.c b/gcc/tree-ssa-math-opts.c
index f53a3004b93..e6b585723e9 100644
--- a/gcc/tree-ssa-math-opts.c
+++ b/gcc/tree-ssa-math-opts.c
@@ -1172,13 +1172,7 @@ gimple_expand_builtin_pow (gimple_stmt_iterator *gsi, location_t loc,
if (flag_unsafe_math_optimizations
&& cbrtfn
- /* FIXME: The following line was originally
- && (tree_expr_nonnegative_p (arg0) || !HONOR_NANS (mode)),
- but since arg0 is a gimple value, the first predicate
- will always return false. It needs to be replaced with a
- call to a similar gimple_val_nonnegative_p function to be
- added in gimple-fold.c. */
- && !HONOR_NANS (mode)
+ && (gimple_val_nonnegative_real_p (arg0) || !HONOR_NANS (mode))
&& REAL_VALUES_EQUAL (c, dconst1_3))
return build_and_insert_call (gsi, loc, &target, cbrtfn, arg0);
@@ -1190,13 +1184,7 @@ gimple_expand_builtin_pow (gimple_stmt_iterator *gsi, location_t loc,
if (flag_unsafe_math_optimizations
&& sqrtfn
&& cbrtfn
- /* FIXME: The following line was originally
- && (tree_expr_nonnegative_p (arg0) || !HONOR_NANS (mode)),
- but since arg0 is a gimple value, the first predicate
- will always return false. It needs to be replaced with a
- call to a similar gimple_val_nonnegative_p function to be
- added in gimple-fold.c. */
- && !HONOR_NANS (mode)
+ && (gimple_val_nonnegative_real_p (arg0) || !HONOR_NANS (mode))
&& optimize_function_for_speed_p (cfun)
&& hw_sqrt_exists
&& REAL_VALUES_EQUAL (c, dconst1_6))
@@ -1270,13 +1258,7 @@ gimple_expand_builtin_pow (gimple_stmt_iterator *gsi, location_t loc,
if (flag_unsafe_math_optimizations
&& cbrtfn
- /* FIXME: The following line was originally
- && (tree_expr_nonnegative_p (arg0) || !HONOR_NANS (mode)),
- but since arg0 is a gimple value, the first predicate
- will always return false. It needs to be replaced with a
- call to a similar gimple_val_nonnegative_p function to be
- added in gimple-fold.c. */
- && !HONOR_NANS (mode)
+ && (gimple_val_nonnegative_real_p (arg0) || !HONOR_NANS (mode))
&& real_identical (&c2, &c)
&& optimize_function_for_speed_p (cfun)
&& powi_cost (n / 3) <= POWI_MAX_MULTS)