From: Bernd Schmidt Date: Fri, 8 Sep 2000 09:41:07 +0000 (+0000) Subject: Fix computation of need_mode in choose_reload_regs. X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=ce701d1bd7218c2c055840da396761814cf2fdf6;p=gcc.git Fix computation of need_mode in choose_reload_regs. From-SVN: r36264 --- diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 6e2837b660a..288f380afda 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -2,6 +2,8 @@ * combine.c (combine_simplify_rtx): Try to simplify VEC_SELECT of a VEC_CONCAT. + From Richard Henderson: + * reload1.c (choose_reload_regs): Compute need_mode properly. 2000-09-07 Richard Henderson diff --git a/gcc/reload1.c b/gcc/reload1.c index b09f9eb8222..fb840477ba7 100644 --- a/gcc/reload1.c +++ b/gcc/reload1.c @@ -5304,8 +5304,13 @@ choose_reload_regs (chain) i = REGNO (last_reg) + word; last_class = REGNO_REG_CLASS (i); - need_mode = smallest_mode_for_size ((word+1) * UNITS_PER_WORD, - GET_MODE_CLASS (mode)); + if (word == 0) + need_mode = mode; + else + need_mode + = smallest_mode_for_size (GET_MODE_SIZE (mode) + + word * UNITS_PER_WORD, + GET_MODE_CLASS (mode)); if ( #ifdef CLASS_CANNOT_CHANGE_MODE