Commit 4f4b88d0 by Herman A.J. ten Brugge Committed by Jeff Law

* flow.c (insn_dead_p): Detect dead memory stores with auto increments.

From-SVN: r36220
parent f725a3ec
2000-09-06 Herman A.J. ten Brugge <Haj.Ten.Brugge@net.HCC.nl>
* flow.c (insn_dead_p): Detect dead memory stores with auto increments.
2000-09-06 Kazu Hirata <kazu@hxi.com> 2000-09-06 Kazu Hirata <kazu@hxi.com>
* calls.c: Fix formatting. * calls.c: Fix formatting.
......
...@@ -3954,8 +3954,21 @@ insn_dead_p (pbi, x, call_ok, notes) ...@@ -3954,8 +3954,21 @@ insn_dead_p (pbi, x, call_ok, notes)
temp = pbi->mem_set_list; temp = pbi->mem_set_list;
while (temp) while (temp)
{ {
if (rtx_equal_p (XEXP (temp, 0), r)) rtx mem = XEXP (temp, 0);
if (rtx_equal_p (mem, r))
return 1;
#ifdef AUTO_INC_DEC
/* Check if memory reference matches an auto increment. Only
post increment/decrement or modify are valid. */
if (GET_MODE (mem) == GET_MODE (r)
&& (GET_CODE (XEXP (mem, 0)) == POST_DEC
|| GET_CODE (XEXP (mem, 0)) == POST_INC
|| GET_CODE (XEXP (mem, 0)) == POST_MODIFY)
&& GET_MODE (XEXP (mem, 0)) == GET_MODE (r)
&& rtx_equal_p (XEXP (XEXP (mem, 0), 0), XEXP (r, 0)))
return 1; return 1;
#endif
temp = XEXP (temp, 1); temp = XEXP (temp, 1);
} }
} }
......
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