aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRichard Henderson <rth@redhat.com>2001-05-21 23:58:17 -0700
committerRichard Henderson <rth@gcc.gnu.org>2001-05-21 23:58:17 -0700
commit0a33d11eaba21d9f47d3576dbd29c661f656135d (patch)
treec0a10a585f843312330734edc25eecf84e6f94a5
parentc93d7fae7b9825449c023d42eb40641c0ad80be2 (diff)
downloadgcc-0a33d11eaba21d9f47d3576dbd29c661f656135d.zip
gcc-0a33d11eaba21d9f47d3576dbd29c661f656135d.tar.gz
gcc-0a33d11eaba21d9f47d3576dbd29c661f656135d.tar.bz2
combine.c (subst): Do not substitute for a register as a destination...
* combine.c (subst): Do not substitute for a register as a destination subreg/strict_low_part/zero_extract. From-SVN: r42429
-rw-r--r--gcc/ChangeLog3
-rw-r--r--gcc/combine.c11
2 files changed, 13 insertions, 1 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index cd7336e..5e578ae 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,5 +1,8 @@
2001-05-21 Richard Henderson <rth@redhat.com>
+ * combine.c (subst): Do not substitute for a register as
+ a destination subreg/strict_low_part/zero_extract.
+
* combine.c (simplify_comparison): Update op1 after constant
extension.
* recog.c (const_int_operand): Accept only constants valid
diff --git a/gcc/combine.c b/gcc/combine.c
index e3ad70a..675b1fe 100644
--- a/gcc/combine.c
+++ b/gcc/combine.c
@@ -3394,7 +3394,16 @@ subst (x, from, to, in_dest, unique_copy)
}
else if (fmt[i] == 'e')
{
- if (COMBINE_RTX_EQUAL_P (XEXP (x, i), from))
+ /* If this is a register being set, ignore it. */
+ new = XEXP (x, i);
+ if (in_dest
+ && (code == SUBREG || code == STRICT_LOW_PART
+ || code == ZERO_EXTRACT)
+ && i == 0
+ && GET_CODE (new) == REG)
+ ;
+
+ else if (COMBINE_RTX_EQUAL_P (XEXP (x, i), from))
{
/* In general, don't install a subreg involving two
modes not tieable. It can worsen register