diff options
author | hubicka <hubicka@138bc75d-0d04-0410-961f-82ee72b054a4> | 2001-05-17 17:49:34 +0000 |
---|---|---|
committer | hubicka <hubicka@138bc75d-0d04-0410-961f-82ee72b054a4> | 2001-05-17 17:49:34 +0000 |
commit | 3b58eaf79036e1ef8c6dc3953622873e36f1f5b0 (patch) | |
tree | ef6cfc17319151d60254b6cae966ce4d59cf05ec /gcc/recog.c | |
parent | 55d66c96aa12439aedacd23afbe08d82f800cc58 (diff) | |
download | gcc-3b58eaf79036e1ef8c6dc3953622873e36f1f5b0.tar.gz |
* recog.c (validate_replace_rtx_1): Use "TO" mode if not VOIDmode
when calling simplify_subreg. This is needed to allow replacing
of expression of one mode by expression of different mode.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@42214 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/recog.c')
-rw-r--r-- | gcc/recog.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/gcc/recog.c b/gcc/recog.c index d858394c4cd..00b45c64ce5 100644 --- a/gcc/recog.c +++ b/gcc/recog.c @@ -582,7 +582,9 @@ validate_replace_rtx_1 (loc, from, to, object) if (rtx_equal_p (SUBREG_REG (x), from)) { rtx temp; - temp = simplify_subreg (GET_MODE (x), to, GET_MODE (SUBREG_REG (x)), + temp = simplify_subreg (GET_MODE (x), to, + GET_MODE (to) != VOIDmode + ? GET_MODE (to) : GET_MODE (SUBREG_REG (x)), SUBREG_BYTE (x)); if (temp) { |