(cse_insn): Don't record a DEST a paradoxical SUBREG and SRC is a
authorRichard Kenner <kenner@gcc.gnu.org>
Fri, 28 Oct 1994 22:55:05 +0000 (18:55 -0400)
committerRichard Kenner <kenner@gcc.gnu.org>
Fri, 28 Oct 1994 22:55:05 +0000 (18:55 -0400)
SIGN_EXTEND or ZERO_EXTEND.

From-SVN: r8354

gcc/cse.c

index d030c1d8ff159ac6c2c3b31b45adca2be2f4f963..067db83889df5676f52aec6b3438653316a8c2d7 100644 (file)
--- a/gcc/cse.c
+++ b/gcc/cse.c
@@ -7188,7 +7188,17 @@ cse_insn (insn, in_libcall_block)
            || in_libcall_block
            /* If we didn't put a REG_EQUAL value or a source into the hash
               table, there is no point is recording DEST.  */
-            || sets[i].src_elt == 0)
+           || sets[i].src_elt == 0
+           /* If DEST is a paradoxical SUBREG and SRC is a ZERO_EXTEND
+              or SIGN_EXTEND, don't record DEST since it can cause
+              some tracking to be wrong.
+
+              ??? Think about this more later.  */
+           || (GET_CODE (dest) == SUBREG
+               && (GET_MODE_SIZE (GET_MODE (dest))
+                   > GET_MODE_SIZE (GET_MODE (SUBREG_REG (dest))))
+               && (GET_CODE (sets[i].src) == SIGN_EXTEND
+                   || GET_CODE (sets[i].src) == ZERO_EXTEND)))
          continue;
 
        /* STRICT_LOW_PART isn't part of the value BEING set,