Non-dead stores eliminated with cond-exec
Richard Henderson
rth@cygnus.com
Thu May 25 16:19:00 GMT 2000
On Thu, May 25, 2000 at 06:13:36PM +0100, Richard Earnshaw wrote:
> At the end of if_convert we update the global life info and remove any new
> dead code that we find. However, propagate_one_insn () notes that insn
> 2013 stores into mem(r12+12), but doesn't note that this is conditional.
> Hence it appears that insn 1995 is redundant, so it gets incorrectly
> deleted.
>
> I think we need to track the conditional nature of stores as we do for
> registers in this case.
That would be most ideal yes. The minimal fix is not to
record the memory as dead.
r~
* flow.c (mark_set_1): Don't record conditionally dead memory.
Index: flow.c
===================================================================
RCS file: /cvs/gcc/egcs/gcc/flow.c,v
retrieving revision 1.291
diff -c -p -d -r1.291 flow.c
*** flow.c 2000/05/25 21:38:48 1.291
--- flow.c 2000/05/25 23:17:08
*************** mark_set_1 (pbi, code, reg, cond, insn,
*** 4252,4257 ****
--- 4252,4259 ----
invalidate_mems_from_autoinc (pbi, insn);
if (GET_CODE (reg) == MEM && ! side_effects_p (reg)
+ /* ??? With more effort we could track conditional memory life. */
+ && ! cond
/* We do not know the size of a BLKmode store, so we do not track
them for redundant store elimination. */
&& GET_MODE (reg) != BLKmode
More information about the Gcc-bugs
mailing list