aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
Diffstat (limited to 'gcc')
-rw-r--r--gcc/ChangeLog5
-rw-r--r--gcc/gcse.c12
2 files changed, 12 insertions, 5 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index b29b6c0..85dad03 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -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
diff --git a/gcc/gcse.c b/gcc/gcse.c
index abfc1d1..2c6a9d1 100644
--- a/gcc/gcse.c
+++ b/gcc/gcse.c
@@ -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.