(copy_rtx_and_substitute, case USE):
authorRichard Stallman <rms@gnu.org>
Sun, 21 Mar 1993 21:28:23 +0000 (21:28 +0000)
committerRichard Stallman <rms@gnu.org>
Sun, 21 Mar 1993 21:28:23 +0000 (21:28 +0000)
Don't remove a subreg if ORIG had one.

From-SVN: r3814

gcc/integrate.c

index 1b358e10e3392e8218f6dee70ab3f923cc05ea6c..95917c8b7c306624483313faaa2344d971e5d560 100644 (file)
@@ -1981,9 +1981,11 @@ copy_rtx_and_substitute (orig, map)
     case USE:
     case CLOBBER:
       /* USE and CLOBBER are ordinary, but we convert (use (subreg foo))
-        to (use foo).  */
+        to (use foo) if the original insn didn't have a subreg.
+        Removing the subreg distorts the VAX movstrhi pattern
+        by changing the mode of an operand.  */
       copy = copy_rtx_and_substitute (XEXP (orig, 0), map);
-      if (GET_CODE (copy) == SUBREG)
+      if (GET_CODE (copy) == SUBREG && GET_CODE (XEXP (orig, 0)) != SUBREG)
        copy = SUBREG_REG (copy);
       return gen_rtx (code, VOIDmode, copy);