OSDN Git Service

2010-10-04 Matthias Klose <doko@ubuntu.com>
[pf3gnuchains/gcc-fork.git] / gcc / fwprop.c
index a6f52cd..b54ff50 100644 (file)
@@ -908,28 +908,17 @@ update_df (rtx insn, rtx *loc, df_ref *use_rec, enum df_ref_type type,
     {
       df_ref use = *use_rec;
       df_ref orig_use = use, new_use;
-      int width = -1;
-      int offset = -1;
-      enum machine_mode mode = VOIDmode;
       rtx *new_loc = find_occurrence (loc, DF_REF_REG (orig_use));
       use_rec++;
 
       if (!new_loc)
        continue;
 
-      if (DF_REF_FLAGS_IS_SET (orig_use, DF_REF_SIGN_EXTRACT | DF_REF_ZERO_EXTRACT))
-       {
-         width = DF_REF_EXTRACT_WIDTH (orig_use);
-         offset = DF_REF_EXTRACT_OFFSET (orig_use);
-         mode = DF_REF_EXTRACT_MODE (orig_use);
-       }
-
       /* Add a new insn use.  Use the original type, because it says if the
          use was within a MEM.  */
       new_use = df_ref_create (DF_REF_REG (orig_use), new_loc,
                               insn, BLOCK_FOR_INSN (insn),
-                              type, DF_REF_FLAGS (orig_use) | new_flags,
-                              width, offset, mode);
+                              type, DF_REF_FLAGS (orig_use) | new_flags);
 
       /* Set up the use-def chain.  */
       gcc_assert (DF_REF_ID (new_use) == (int) VEC_length (df_ref, use_def_ref));
@@ -1305,10 +1294,11 @@ forward_propagate_and_simplify (df_ref use, rtx def_insn, rtx def_set)
        loc = &SET_SRC (use_set);
 
       /* Do not replace an existing REG_EQUAL note if the insn is not
-        recognized.  Either we're already replacing in the note, or
-        we'll separately try plugging the definition in the note and
-        simplifying.  */
-      set_reg_equal = (note == NULL_RTX);
+        recognized.  Either we're already replacing in the note, or we'll
+        separately try plugging the definition in the note and simplifying.
+        And only install a REQ_EQUAL note when the destination is a REG,
+        as the note would be invalid otherwise.  */
+      set_reg_equal = (note == NULL_RTX && REG_P (SET_DEST (use_set)));
     }
 
   if (GET_MODE (*loc) == VOIDmode)