summaryrefslogtreecommitdiff
path: root/gcc/reload1.c
diff options
context:
space:
mode:
authorJeffrey A Law <law@cygnus.com>2001-03-15 19:55:43 +0000
committerJeff Law <law@gcc.gnu.org>2001-03-15 12:55:43 -0700
commitb216e516b8d9c93d229d6a66cde700ef77263ad7 (patch)
tree9e1a0d078ed3e8135de8ee0fb54cfe541b0196f1 /gcc/reload1.c
parentbb2cf916da4251c227826f82e945d8c90dbd552b (diff)
downloadgcc-b216e516b8d9c93d229d6a66cde700ef77263ad7.tar.gz
reload1.c (reload_cse_simplify_set): For LOAD_EXTEND_OP, do not "widen" a destination that is already wider than a word.
* reload1.c (reload_cse_simplify_set): For LOAD_EXTEND_OP, do not "widen" a destination that is already wider than a word. Also do not widen if LOAD_EXTEND_OP is NIL for the given mode. From-SVN: r40510
Diffstat (limited to 'gcc/reload1.c')
-rw-r--r--gcc/reload1.c10
1 files changed, 7 insertions, 3 deletions
diff --git a/gcc/reload1.c b/gcc/reload1.c
index 2f64c2d7d4a..39d1cc3383c 100644
--- a/gcc/reload1.c
+++ b/gcc/reload1.c
@@ -8279,9 +8279,13 @@ reload_cse_simplify_set (set, insn)
&& GET_CODE (SET_SRC (set)) != REG))
{
#ifdef LOAD_EXTEND_OP
- rtx wide_dest = gen_rtx_REG (word_mode, REGNO (SET_DEST (set)));
- ORIGINAL_REGNO (wide_dest) = ORIGINAL_REGNO (SET_DEST (set));
- validate_change (insn, &SET_DEST (set), wide_dest, 1);
+ if (GET_MODE_BITSIZE (GET_MODE (SET_DEST (set))) < BITS_PER_WORD
+ && extend_op != NIL)
+ {
+ rtx wide_dest = gen_rtx_REG (word_mode, REGNO (SET_DEST (set)));
+ ORIGINAL_REGNO (wide_dest) = ORIGINAL_REGNO (SET_DEST (set));
+ validate_change (insn, &SET_DEST (set), wide_dest, 1);
+ }
#endif
validate_change (insn, &SET_SRC (set), copy_rtx (this_rtx), 1);