OSDN Git Service

2003-07-14 Franz Sirl <Franz.Sirl-kernel@lauterbach.com>
authorsirl <sirl@138bc75d-0d04-0410-961f-82ee72b054a4>
Mon, 14 Jul 2003 09:29:44 +0000 (09:29 +0000)
committersirl <sirl@138bc75d-0d04-0410-961f-82ee72b054a4>
Mon, 14 Jul 2003 09:29:44 +0000 (09:29 +0000)
PR optimization/11440
* gcse.c (try_replace_reg): Don't attach notes to ZERO_EXTRACT or
SIGN_EXTRACT SETs.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@69325 138bc75d-0d04-0410-961f-82ee72b054a4

gcc/ChangeLog
gcc/gcse.c

index 510d74f..3368f56 100644 (file)
@@ -1,3 +1,9 @@
+2003-07-14  Franz Sirl  <Franz.Sirl-kernel@lauterbach.com>
+
+       PR optimization/11440
+       * gcse.c (try_replace_reg): Don't attach notes to ZERO_EXTRACT or
+       SIGN_EXTRACT SETs.
+
 2003-07-14  Alan Modra  <amodra@bigpond.net.au>
 
        * doc/tm.texi (BLOCK_REG_PADDING): Describe.
index 8ddcd73..30d4c1e 100644 (file)
@@ -3856,9 +3856,12 @@ try_replace_reg (rtx from, rtx to, rtx insn)
          && validate_change (insn, &SET_SRC (set), src, 0))
        success = 1;
 
-      /* If we've failed to do replacement, have a single SET, and don't already
-        have a note, add a REG_EQUAL note to not lose information.  */
-      if (!success && note == 0 && set != 0)
+      /* If we've failed to do replacement, have a single SET, don't already
+        have a note, and have no special SET, add a REG_EQUAL note to not
+        lose information.  */
+      if (!success && note == 0 && set != 0
+         && GET_CODE (XEXP (set, 0)) != ZERO_EXTRACT
+         && GET_CODE (XEXP (set, 0)) != SIGN_EXTRACT)
        note = set_unique_reg_note (insn, REG_EQUAL, copy_rtx (src));
     }