Commit 966b148a by Andreas Krebbel Committed by Ulrich Weigand

combine.c (make_compound_operation): Use simplify_subreg.

2005-06-19  Andreas Krebbel  <krebbel1@de.ibm.com>

	* combine.c (make_compound_operation): Use simplify_subreg.  Delete
	a optimization already done by simplify_subreg.

From-SVN: r101183
parent 9f24cc73
2005-06-19 Andreas Krebbel <krebbel1@de.ibm.com>
* combine.c (make_compound_operation): Use simplify_subreg. Delete
a optimization already done by simplify_subreg.
2005-06-19 Ulrich Weigand <uweigand@de.ibm.com> 2005-06-19 Ulrich Weigand <uweigand@de.ibm.com>
* loop.c (scan_loop): Do not consider insns setting the frame * loop.c (scan_loop): Do not consider insns setting the frame
......
...@@ -6732,41 +6732,33 @@ make_compound_operation (rtx x, enum rtx_code in_code) ...@@ -6732,41 +6732,33 @@ make_compound_operation (rtx x, enum rtx_code in_code)
what it originally did, do this SUBREG as a force_to_mode. */ what it originally did, do this SUBREG as a force_to_mode. */
tem = make_compound_operation (SUBREG_REG (x), in_code); tem = make_compound_operation (SUBREG_REG (x), in_code);
if (GET_CODE (tem) != GET_CODE (SUBREG_REG (x))
&& GET_MODE_SIZE (mode) < GET_MODE_SIZE (GET_MODE (tem))
&& subreg_lowpart_p (x))
{
rtx newer = force_to_mode (tem, mode, ~(HOST_WIDE_INT) 0,
NULL_RTX, 0);
/* If we have something other than a SUBREG, we might have {
done an expansion, so rerun ourselves. */ rtx simplified;
if (GET_CODE (newer) != SUBREG) simplified = simplify_subreg (GET_MODE (x), tem, GET_MODE (tem),
newer = make_compound_operation (newer, in_code); SUBREG_BYTE (x));
return newer; if (simplified)
} tem = simplified;
/* If this is a paradoxical subreg, and the new code is a sign or if (GET_CODE (tem) != GET_CODE (SUBREG_REG (x))
zero extension, omit the subreg and widen the extension. If it && GET_MODE_SIZE (mode) < GET_MODE_SIZE (GET_MODE (tem))
is a regular subreg, we can still get rid of the subreg by not && subreg_lowpart_p (x))
widening so much, or in fact removing the extension entirely. */ {
if ((GET_CODE (tem) == SIGN_EXTEND rtx newer = force_to_mode (tem, mode, ~(HOST_WIDE_INT) 0,
|| GET_CODE (tem) == ZERO_EXTEND) NULL_RTX, 0);
&& subreg_lowpart_p (x))
{ /* If we have something other than a SUBREG, we might have
if (GET_MODE_SIZE (mode) > GET_MODE_SIZE (GET_MODE (tem)) done an expansion, so rerun ourselves. */
|| (GET_MODE_SIZE (mode) > if (GET_CODE (newer) != SUBREG)
GET_MODE_SIZE (GET_MODE (XEXP (tem, 0))))) newer = make_compound_operation (newer, in_code);
{
if (! SCALAR_INT_MODE_P (mode)) return newer;
break; }
tem = gen_rtx_fmt_e (GET_CODE (tem), mode, XEXP (tem, 0));
} if (simplified)
else
tem = gen_lowpart (mode, XEXP (tem, 0));
return tem; return tem;
} }
break; break;
default: default:
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment