gcse.c (pre_delete): Fix code to determine the mode of the reaching pseudo register.
authorJeffrey A Law <law@cygnus.com>
Fri, 29 May 1998 00:50:16 +0000 (00:50 +0000)
committerJeff Law <law@gcc.gnu.org>
Fri, 29 May 1998 00:50:16 +0000 (18:50 -0600)
        * gcse.c (pre_delete): Fix code to determine the mode of
        the reaching pseudo register.

From-SVN: r20134

gcc/ChangeLog
gcc/gcse.c

index b29b6c0abc6a331d836bf95efcab0deb41d5436c..85dad03ca407a0ba18844be9c0b8737063a95b15 100644 (file)
@@ -1,3 +1,8 @@
+Fri May 29 01:48:25 1998  Jeffrey A Law  (law@cygnus.com)
+
+       * gcse.c (pre_delete): Fix code to determine the mode of
+       the reaching pseudo register.
+
 Fri May 29 01:07:28 1998  Bernd Schmidt <crux@Pool.Informatik.RWTH-Aachen.DE>
 
        * Makefile.in (GEN): Add gencheck
index abfc1d14bcd3402e135f348916668dc85a170acf..2c6a9d1d99e8c77f1fe2e99bea4adf3ef3074ee3 100644 (file)
@@ -4548,15 +4548,17 @@ pre_delete ()
 
              if (TEST_BIT (ppin, indx))
                {
-                 /* Create a pseudo-reg to store the result of reaching
-                    expressions into.  */
-                 if (expr->reaching_reg == NULL)
-                   expr->reaching_reg = gen_reg_rtx (GET_MODE (expr->expr));
-
                  set = single_set (insn);
                  if (! set)
                    abort ();
 
+                 /* Create a pseudo-reg to store the result of reaching
+                    expressions into.  Get the mode for the new pseudo
+                    from the mode of the original destination pseudo.  */
+                 if (expr->reaching_reg == NULL)
+                   expr->reaching_reg
+                     = gen_reg_rtx (GET_MODE (SET_DEST (set)));
+
                  /* In theory this should never fail since we're creating
                     a reg->reg copy.