From 0a33d11eaba21d9f47d3576dbd29c661f656135d Mon Sep 17 00:00:00 2001 From: Richard Henderson Date: Mon, 21 May 2001 23:58:17 -0700 Subject: 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 --- gcc/combine.c | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) (limited to 'gcc/combine.c') 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 -- cgit v1.1