From d3903c22d54559908a790f1aa257a20c783aea91 Mon Sep 17 00:00:00 2001 From: Jeffrey A Law Date: Fri, 29 May 1998 00:50:16 +0000 Subject: [PATCH] gcse.c (pre_delete): Fix code to determine the mode of the reaching pseudo register. * gcse.c (pre_delete): Fix code to determine the mode of the reaching pseudo register. From-SVN: r20134 --- gcc/ChangeLog | 5 +++++ gcc/gcse.c | 12 +++++++----- 2 files changed, 12 insertions(+), 5 deletions(-) diff --git a/gcc/ChangeLog b/gcc/ChangeLog index b29b6c0abc6..85dad03ca40 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 * Makefile.in (GEN): Add gencheck diff --git a/gcc/gcse.c b/gcc/gcse.c index abfc1d14bcd..2c6a9d1d99e 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. -- 2.30.2