diff options
author | amylaar <amylaar@138bc75d-0d04-0410-961f-82ee72b054a4> | 2002-07-11 21:03:51 +0000 |
---|---|---|
committer | amylaar <amylaar@138bc75d-0d04-0410-961f-82ee72b054a4> | 2002-07-11 21:03:51 +0000 |
commit | b6bf753ce2f664f8da8668096576fad9ace9fcee (patch) | |
tree | 470152215f717097fe37cefea6c2ed340f8da478 /gcc/combine.c | |
parent | 753fca8af8b1c538c0a10bc9cd59cd7b06b1d80d (diff) | |
download | gcc-b6bf753ce2f664f8da8668096576fad9ace9fcee.tar.gz |
* combine.c (try_combine): When converting a paradoxical subreg
to an extension, take LOAD_EXTEND_OP into account.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@55404 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/combine.c')
-rw-r--r-- | gcc/combine.c | 15 |
1 files changed, 13 insertions, 2 deletions
diff --git a/gcc/combine.c b/gcc/combine.c index e7f22553062..cd2e8df7b73 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); |