aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorRoger Sayle <roger@eyesopen.com>2003-07-16 19:36:38 +0000
committerRoger Sayle <sayle@gcc.gnu.org>2003-07-16 19:36:38 +0000
commitcc8c96fd6d398dd6013198715b0880af2d8769d8 (patch)
tree8cd2a805d5074f26437994d27344930d76a91b43 /gcc
parentd41ba56fc46ed9cf8c2b4a3dbf74c01eb001887f (diff)
downloadgcc-cc8c96fd6d398dd6013198715b0880af2d8769d8.zip
gcc-cc8c96fd6d398dd6013198715b0880af2d8769d8.tar.gz
gcc-cc8c96fd6d398dd6013198715b0880af2d8769d8.tar.bz2
combine.c (subst): Also handle (subreg (const_double ...)) case if created by a substitution...
* combine.c (subst): Also handle (subreg (const_double ...)) case if created by a substitution, by using the original inner mode. From-SVN: r69476
Diffstat (limited to 'gcc')
-rw-r--r--gcc/ChangeLog5
-rw-r--r--gcc/combine.c4
2 files changed, 8 insertions, 1 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index ba9356f..de70309 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,5 +1,10 @@
2003-07-16 Roger Sayle <roger@eyesopen.com>
+ * combine.c (subst): Also handle (subreg (const_double ...)) case
+ if created by a substitution, by using the original inner mode.
+
+2003-07-16 Roger Sayle <roger@eyesopen.com>
+
* simplify-rtx.c (simplify_replace_rtx): Convert constant comparisons
to MODE_FLOAT constants if FLOAT_STORE_FLAG_VALUE is defined.
(simplify_rtx): Likewise. Simplify (lo_sum (high X) X) as X.
diff --git a/gcc/combine.c b/gcc/combine.c
index 3c3172b..5a75201 100644
--- a/gcc/combine.c
+++ b/gcc/combine.c
@@ -3476,7 +3476,9 @@ subst (rtx x, rtx from, rtx to, int in_dest, int unique_copy)
if (GET_CODE (new) == CLOBBER && XEXP (new, 0) == const0_rtx)
return new;
- if (GET_CODE (new) == CONST_INT && GET_CODE (x) == SUBREG)
+ if (GET_CODE (x) == SUBREG
+ && (GET_CODE (new) == CONST_INT
+ || GET_CODE (new) == CONST_DOUBLE))
{
enum machine_mode mode = GET_MODE (x);