------- Comment #31 from ubizjak at gmail dot com  2008-02-10 13:45 -------
Patch in testing:

Index: tree-ssa-forwprop.c
===================================================================
--- tree-ssa-forwprop.c (revision 132202)
+++ tree-ssa-forwprop.c (working copy)
@@ -376,7 +376,7 @@ forward_propagate_into_cond (tree cond_e
            tree op1 = TREE_OPERAND (cond, 1);
            rhs0 = GIMPLE_STMT_OPERAND (def_stmt, 1);
            tmp = combine_cond_expr_cond (TREE_CODE (cond), boolean_type_node,
-                                         fold_convert (TREE_TYPE (op1), rhs0),
+                                         fold_convert (TREE_TYPE (rhs0),
rhs0),
                                          op1, !single_use0_p);
          }
        /* If that wasn't successful, try the second operand.  */
@@ -393,7 +393,7 @@ forward_propagate_into_cond (tree cond_e
            rhs1 = GIMPLE_STMT_OPERAND (def_stmt, 1);
            tmp = combine_cond_expr_cond (TREE_CODE (cond), boolean_type_node,
                                          op0,
-                                         fold_convert (TREE_TYPE (op0), rhs1),
+                                         fold_convert (TREE_TYPE (rhs1),
rhs1),
                                          !single_use1_p);
          }
        /* If that wasn't successful either, try both operands.  */
@@ -402,7 +402,7 @@ forward_propagate_into_cond (tree cond_e
            && rhs1 != NULL_TREE)
          tmp = combine_cond_expr_cond (TREE_CODE (cond), boolean_type_node,
                                        rhs0,
-                                       fold_convert (TREE_TYPE (rhs0), rhs1),
+                                       fold_convert (TREE_TYPE (rhs1), rhs1),
                                        !(single_use0_p && single_use1_p));
       }
     else if (TREE_CODE (cond) == SSA_NAME)


-- 

ubizjak at gmail dot com changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
         AssignedTo|unassigned at gcc dot gnu   |ubizjak at gmail dot com
                   |dot org                     |
             Status|NEW                         |ASSIGNED
   Last reconfirmed|2008-02-06 01:19:36         |2008-02-10 13:45:55
               date|                            |


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=33992

Reply via email to