diff options
author | Richard Sandiford <rsandifo@redhat.com> | 2003-09-26 06:08:48 +0000 |
---|---|---|
committer | Richard Sandiford <rsandifo@gcc.gnu.org> | 2003-09-26 06:08:48 +0000 |
commit | 5581fc9110377e8a08394f985a17c3e0cb31227a (patch) | |
tree | bcba3cef0778f2f0b0d3e849894990e81a56635a /gcc/expr.c | |
parent | 9eb5455884dc17327a98a395ca148c254c2a908d (diff) | |
download | gcc-5581fc9110377e8a08394f985a17c3e0cb31227a.zip gcc-5581fc9110377e8a08394f985a17c3e0cb31227a.tar.gz gcc-5581fc9110377e8a08394f985a17c3e0cb31227a.tar.bz2 |
expr.c (emit_move_insn_1): If there is no move pattern for the original mode...
* expr.c (emit_move_insn_1): If there is no move pattern for the
original mode, try using a pattern for the corresponding integer mode.
From-SVN: r71816
Diffstat (limited to 'gcc/expr.c')
-rw-r--r-- | gcc/expr.c | 11 |
1 files changed, 11 insertions, 0 deletions
@@ -3491,6 +3491,17 @@ emit_move_insn_1 (rtx x, rtx y) return emit_insn (GEN_FCN (insn_code) (x, y)); } + /* Try using a move pattern for the corresponding integer mode. This is + only safe when simplify_subreg can convert MODE constants into integer + constants. At present, it can only do this reliably if the value + fits within a HOST_WIDE_INT. */ + else if (GET_MODE_BITSIZE (mode) <= HOST_BITS_PER_WIDE_INT + && (submode = int_mode_for_mode (mode)) != BLKmode + && mov_optab->handlers[submode].insn_code != CODE_FOR_nothing) + return emit_insn (GEN_FCN (mov_optab->handlers[submode].insn_code) + (simplify_gen_subreg (submode, x, mode, 0), + simplify_gen_subreg (submode, y, mode, 0))); + /* This will handle any multi-word or full-word mode that lacks a move_insn pattern. However, you will get better code if you define such patterns, even if they must turn into multiple assembler instructions. */ |