OSDN Git Service

2005-07-25 Andrew Pinski <pinskia@physics.uc.edu>
authorpinskia <pinskia@138bc75d-0d04-0410-961f-82ee72b054a4>
Mon, 25 Jul 2005 20:27:56 +0000 (20:27 +0000)
committerpinskia <pinskia@138bc75d-0d04-0410-961f-82ee72b054a4>
Mon, 25 Jul 2005 20:27:56 +0000 (20:27 +0000)
        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>

        PR tree-opt/22484
        * testsuite/g++.dg/opt/loop2.C: New test.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@102369 138bc75d-0d04-0410-961f-82ee72b054a4

gcc/ChangeLog
gcc/testsuite/ChangeLog
gcc/tree-ssa-ccp.c
gcc/tree-ssa-propagate.c

index 2217142..a31a4a7 100644 (file)
@@ -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.
 
index bcdb54c..f82d239 100644 (file)
@@ -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.
 
index 95a2fa1..829bba9 100644 (file)
@@ -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;
 
index 07b13e3..ced23df 100644 (file)
@@ -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: