aboutsummaryrefslogtreecommitdiff
path: root/gcc/combine.c
diff options
context:
space:
mode:
authorJ"orn Rennecke <joern.rennecke@superh.com>2002-07-11 21:03:51 +0000
committerJoern Rennecke <amylaar@gcc.gnu.org>2002-07-11 22:03:51 +0100
commit25c25947019a3e4628e8b382d7e1b00d9482d717 (patch)
tree470152215f717097fe37cefea6c2ed340f8da478 /gcc/combine.c
parentbb654703036e9c948296d147eafb8191ec64b923 (diff)
downloadgcc-25c25947019a3e4628e8b382d7e1b00d9482d717.zip
gcc-25c25947019a3e4628e8b382d7e1b00d9482d717.tar.gz
gcc-25c25947019a3e4628e8b382d7e1b00d9482d717.tar.bz2
combine.c (try_combine): When converting a paradoxical subreg to an extension...
* combine.c (try_combine): When converting a paradoxical subreg to an extension, take LOAD_EXTEND_OP into account. From-SVN: r55404
Diffstat (limited to 'gcc/combine.c')
-rw-r--r--gcc/combine.c15
1 files changed, 13 insertions, 2 deletions
diff --git a/gcc/combine.c b/gcc/combine.c
index e7f2255..cd2e8df 100644
--- a/gcc/combine.c
+++ b/gcc/combine.c
@@ -2283,8 +2283,19 @@ try_combine (i3, i2, i1, new_direct_jump_p)
/* If *SPLIT is a paradoxical SUBREG, when we split it, it should
be written as a ZERO_EXTEND. */
if (split_code == SUBREG && GET_CODE (SUBREG_REG (*split)) == MEM)
- SUBST (*split, gen_rtx_ZERO_EXTEND (split_mode,
- SUBREG_REG (*split)));
+ {
+#ifdef LOAD_EXTEND_OP
+ /* Or as a SIGN_EXTEND if LOAD_EXTEND_OP says that that's
+ what it really is. */
+ if (LOAD_EXTEND_OP (GET_MODE (SUBREG_REG (*split)))
+ == SIGN_EXTEND)
+ SUBST (*split, gen_rtx_SIGN_EXTEND (split_mode,
+ SUBREG_REG (*split)));
+ else
+#endif
+ SUBST (*split, gen_rtx_ZERO_EXTEND (split_mode,
+ SUBREG_REG (*split)));
+ }
#endif
newi2pat = gen_rtx_SET (VOIDmode, newdest, *split);