------- Comment #6 from pinskia at gcc dot gnu dot org  2006-11-26 20:03 -------
Here is the patch which I am testing:
Index: tree-ssa-reassoc.c
===================================================================
--- tree-ssa-reassoc.c  (revision 119229)
+++ tree-ssa-reassoc.c  (working copy)
@@ -417,8 +417,8 @@ eliminate_duplicate_pair (enum tree_code
                          operand_entry_t last)
 {

-  /* If we have two of the same op, and the opcode is & or |, we can
-     eliminate one of them.
+  /* If we have two of the same op, and the opcode is & |, min, or max,
+     we can eliminate one of them.
      If we have two of the same op, and the opcode is ^, we can
      eliminate both of them.  */

@@ -426,13 +426,15 @@ eliminate_duplicate_pair (enum tree_code
     {
       switch (opcode)
        {
+       case MAX_EXPR:
+       case MIN_EXPR:
        case BIT_IOR_EXPR:
        case BIT_AND_EXPR:
          if (dump_file && (dump_flags & TDF_DETAILS))
            {
              fprintf (dump_file, "Equivalence: ");
              print_generic_expr (dump_file, curr->op, 0);
-             fprintf (dump_file, " [&|] ");
+             fprintf (dump_file, " [&|minmax] ");
              print_generic_expr (dump_file, last->op, 0);
              fprintf (dump_file, " -> ");
              print_generic_stmt (dump_file, last->op, 0);


-- 

pinskia at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
          Component|target                      |tree-optimization


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

Reply via email to