tree-ssa-phiopt.c (conditional_replacement): Use the correct type with the copy of...
authorAndrew Pinski <pinskia@physics.uc.edu>
Fri, 24 Sep 2004 18:16:11 +0000 (18:16 +0000)
committerAndrew Pinski <pinskia@gcc.gnu.org>
Fri, 24 Sep 2004 18:16:11 +0000 (11:16 -0700)
2004-09-24  Andrew Pinski  <pinskia@physics.uc.edu>

        * tree-ssa-phiopt.c (conditional_replacement): Use the correct
        type with the copy of the conditional.

From-SVN: r88065

gcc/ChangeLog
gcc/tree-ssa-phiopt.c

index 6e237dc163dbbdc84764cfae946c0b7f74451702..74b4a425f54a9cf113dd08fdb65e4c619b40feec 100644 (file)
@@ -1,3 +1,8 @@
+2004-09-24  Andrew Pinski  <pinskia@physics.uc.edu>
+
+       * tree-ssa-phiopt.c (conditional_replacement): Use the correct
+       type with the copy of the conditional.
+
 2004-09-24  Andrew Pinski  <pinskia@physics.uc.edu>
 
        PR tree-opt/16954
index fe0fddf93454a99107a898b19315c7edd6db53cb..e61e736f5a3094c18277f19c9875eae243e752a9 100644 (file)
@@ -344,11 +344,11 @@ conditional_replacement (basic_block bb, tree phi, tree arg0, tree arg1)
       if (!COMPARISON_CLASS_P (old_result))
        return false;
       
-      new1 = build (TREE_CODE (old_result), TREE_TYPE (result),
+      new1 = build (TREE_CODE (old_result), TREE_TYPE (old_result),
                    TREE_OPERAND (old_result, 0),
                    TREE_OPERAND (old_result, 1));
       
-      new1 = build (MODIFY_EXPR, TREE_TYPE (result), new_var, new1);
+      new1 = build (MODIFY_EXPR, TREE_TYPE (old_result), new_var, new1);
       bsi_insert_after (&bsi, new1, BSI_NEW_STMT);
     }