summaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
Diffstat (limited to 'gcc')
-rw-r--r--gcc/ChangeLog7
-rw-r--r--gcc/testsuite/ChangeLog5
-rw-r--r--gcc/tree-ssa-ccp.c1
-rw-r--r--gcc/tree-ssa-propagate.c2
4 files changed, 15 insertions, 0 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index 22171428681..a31a4a79866 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,5 +1,12 @@
2005-07-25 Andrew Pinski <pinskia@physics.uc.edu>
+ PR tree-opt/22484
+ * tree-ssa-ccp.c (fold_stmt_inplace): Strip useless type conversions
+ after fold.
+ * tree-ssa-propagate.c (set_rhs): Reject invalid conditional operands.
+
+2005-07-25 Andrew Pinski <pinskia@physics.uc.edu>
+
* tree-ssa-reassoc.c (reassociate_expr): Allow scaler floating point
types when flag_unsafe_math_optimizations is true.
diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog
index bcdb54cf70e..f82d239e225 100644
--- a/gcc/testsuite/ChangeLog
+++ b/gcc/testsuite/ChangeLog
@@ -1,5 +1,10 @@
2005-07-25 Andrew Pinski <pinskia@physics.uc.edu>
+ PR tree-opt/22484
+ * testsuite/g++.dg/opt/loop2.C: New test.
+
+2005-07-25 Andrew Pinski <pinskia@physics.uc.edu>
+
* gcc.dg/tree-ssa/reassoc-3.c: New test.
* gcc.dg/tree-ssa/reassoc-4.c: New test.
diff --git a/gcc/tree-ssa-ccp.c b/gcc/tree-ssa-ccp.c
index 95a2fa13864..829bba94132 100644
--- a/gcc/tree-ssa-ccp.c
+++ b/gcc/tree-ssa-ccp.c
@@ -2335,6 +2335,7 @@ fold_stmt_inplace (tree stmt)
return changed;
new_rhs = fold (rhs);
+ STRIP_USELESS_TYPE_CONVERSION (new_rhs);
if (new_rhs == rhs)
return changed;
diff --git a/gcc/tree-ssa-propagate.c b/gcc/tree-ssa-propagate.c
index 07b13e3fa5f..ced23dfb5b6 100644
--- a/gcc/tree-ssa-propagate.c
+++ b/gcc/tree-ssa-propagate.c
@@ -604,6 +604,8 @@ set_rhs (tree *stmt_p, tree expr)
break;
case COND_EXPR:
+ if (!is_gimple_condexpr (expr))
+ return false;
COND_EXPR_COND (stmt) = expr;
break;
case SWITCH_EXPR: