aboutsummaryrefslogtreecommitdiff
path: root/gcc/tree-ssa-dom.c
diff options
context:
space:
mode:
authorRichard Guenther <rguenther@suse.de>2011-12-06 09:02:17 +0000
committerRichard Biener <rguenth@gcc.gnu.org>2011-12-06 09:02:17 +0000
commitd829c408d24409897d2444faed69ed072c0d73fe (patch)
tree84166cf1fe0e2bf39bec0a5b5c73e24040f13a0f /gcc/tree-ssa-dom.c
parent59b719ec82d2d84286d8fdf86153a3261de0139e (diff)
downloadgcc-d829c408d24409897d2444faed69ed072c0d73fe.zip
gcc-d829c408d24409897d2444faed69ed072c0d73fe.tar.gz
gcc-d829c408d24409897d2444faed69ed072c0d73fe.tar.bz2
re PR tree-optimization/51363 (ICE: in gimple_rhs_has_side_effects, at gimple.c:2530 with -O -fno-tree-ccp)
2011-12-06 Richard Guenther <rguenther@suse.de> PR tree-optimization/51363 * gimple.c (gimple_rhs_has_side_effects): Remove. * gimple.h (gimple_rhs_has_side_effects): Likewise. * tree-ssa-dom.c (optimize_stmt): Simplify conditional. From-SVN: r182041
Diffstat (limited to 'gcc/tree-ssa-dom.c')
-rw-r--r--gcc/tree-ssa-dom.c8
1 files changed, 3 insertions, 5 deletions
diff --git a/gcc/tree-ssa-dom.c b/gcc/tree-ssa-dom.c
index 949acf1..f8207e0 100644
--- a/gcc/tree-ssa-dom.c
+++ b/gcc/tree-ssa-dom.c
@@ -2154,12 +2154,10 @@ optimize_stmt (basic_block bb, gimple_stmt_iterator si)
/* Check for redundant computations. Do this optimization only
for assignments that have no volatile ops and conditionals. */
- may_optimize_p = (!gimple_has_volatile_ops (stmt)
- && ((is_gimple_assign (stmt)
- && !gimple_rhs_has_side_effects (stmt))
+ may_optimize_p = (!gimple_has_side_effects (stmt)
+ && (is_gimple_assign (stmt)
|| (is_gimple_call (stmt)
- && gimple_call_lhs (stmt) != NULL_TREE
- && !gimple_rhs_has_side_effects (stmt))
+ && gimple_call_lhs (stmt) != NULL_TREE)
|| gimple_code (stmt) == GIMPLE_COND
|| gimple_code (stmt) == GIMPLE_SWITCH));