aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorJan Hubicka <jh@suse.cz>2001-05-17 19:49:34 +0200
committerJan Hubicka <hubicka@gcc.gnu.org>2001-05-17 17:49:34 +0000
commit992550d9a688aed347411c45abfd6ef70f11386f (patch)
treeef6cfc17319151d60254b6cae966ce4d59cf05ec /gcc
parent20415bba8aa6ae85e90b3873e7d0518ffc5fa016 (diff)
downloadgcc-992550d9a688aed347411c45abfd6ef70f11386f.zip
gcc-992550d9a688aed347411c45abfd6ef70f11386f.tar.gz
gcc-992550d9a688aed347411c45abfd6ef70f11386f.tar.bz2
recog.c (validate_replace_rtx_1): Use "TO" mode if not VOIDmode when calling simplify_subreg.
* 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. From-SVN: r42214
Diffstat (limited to 'gcc')
-rw-r--r--gcc/ChangeLog6
-rw-r--r--gcc/recog.c4
2 files changed, 9 insertions, 1 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index 4087617..f021be5 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,3 +1,9 @@
+Thu May 17 19:48:00 CEST 2001 Jan Hubicka <jh@suse.cz>
+
+ * 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.
+
Thu May 17 19:40:03 CEST 2001 Jan Hubicka <jh@suse.cz>
* simplify-rtx.c (simplify_subreg): Avoid creating of incorrect subregs.
diff --git a/gcc/recog.c b/gcc/recog.c
index d858394..00b45c6 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)
{