------- Comment #11 from jingyu at google dot com  2010-01-14 00:13 -------
Subject: Re:  problematic REG_EQUAL note added to 
        SUBREG

> Yes, jumping to validate_replacement means that the other combinations are not
> tried.  If the new pattern is not valid, the code will try to massage it and
> not try other combinations.  And I think that, in practice, it won't actually
> do anything since the various subsequent tricks are incompatible with case2.
>
Good to know.
Thanks very much for the explanation.
Hunk#3 is removed.

I will send the following patch to gcc-patches and CC you.

Index: combine.c
===================================================================
--- combine.c   (revision 155801)
+++ combine.c   (working copy)
@@ -2663,10 +2663,16 @@ try_combine (rtx i3, rtx i2, rtx i1, int
          i2dest = SET_DEST (temp);
          i2dest_killed = dead_or_set_p (i2, i2dest);

+         /* Replace the source in I2 with the new constant and make the
+            resulting insn the new pattern for I3.  Then skip to where we
+            validate the pattern.  Everything was set up above.  */
          SUBST (SET_SRC (temp),
                 immed_double_const (olo, ohi, GET_MODE (SET_DEST (temp))));

          newpat = PATTERN (i2);
+
+          /* The dest of I3 has been replaced with the dest of I2. */
+          changed_i3_dest = 1;
          goto validate_replacement;
        }
     }
@@ -3038,8 +3044,6 @@ try_combine (rtx i3, rtx i2, rtx i1, int
        }
     }

-  /* We come here when we are replacing a destination in I2 with the
-     destination of I3.  */
  validate_replacement:

   /* Note which hard regs this insn has as inputs.  */


Thanks,
Jing


-- 


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

Reply via email to