From: Jim Wilson Date: Wed, 8 Sep 1993 18:58:14 +0000 (-0700) Subject: (convert_move): When truncating, call force_reg first if X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=431a6ecab3b51c825ecd2f5ad591ca858e4b296a;p=gcc.git (convert_move): When truncating, call force_reg first if it is something that gen_lowpart won't understand. From-SVN: r5287 --- diff --git a/gcc/expr.c b/gcc/expr.c index cb48acd9c79..0404c6b4a4c 100644 --- a/gcc/expr.c +++ b/gcc/expr.c @@ -870,6 +870,13 @@ convert_move (to, from, unsignedp) if (GET_MODE_BITSIZE (from_mode) > BITS_PER_WORD && GET_MODE_BITSIZE (to_mode) <= BITS_PER_WORD) { + if (!((GET_CODE (from) == MEM + && ! MEM_VOLATILE_P (from) + && direct_load[(int) to_mode] + && ! mode_dependent_address_p (XEXP (from, 0))) + || GET_CODE (from) == REG + || GET_CODE (from) == SUBREG)) + from = force_reg (from_mode, from); convert_move (to, gen_lowpart (word_mode, from), 0); return; }