Fix PR middle-end/14470 (take #2)

Eric Botcazou ebotcazou@libertysurf.fr
Mon Mar 22 12:20:00 GMT 2004


My fix for this PR:

http://gcc.gnu.org/ml/gcc-patches/2004-03/msg00768.html

had a (semi-)unexpected side-effect: disabling the POST_INC optimization for 
move targets in certain cases.  Thanks to Richard Earnshaw for spotting this 
with the help of CSiBE.

The attached patch fixes the problem.  Bootstrapped/regtested (3.4 branch) on 
sparc-sun-solaris2.8, sparc64-sun-solaris2.9 and i586-redhat-linux-gnu.

Approved by Mark, applied to mainline and 3.4 branch.

Gaby, do you want it on the 3.3 branch too?


2004-03-22  Eric Botcazou  <ebotcazou@libertysurf.fr>

	PR middle-end/14470
	* expr.c (mark_queue): New function.
	(emit_insns_enqueued_after_mark): New function replacing
	emit_queue.  Clear the body of emitted queued insns.
	(emit_queue): Call emit_insns_enqueued_after_mark.
	(store_expr): Mark the increment queue on entry.  Emit
	only the incrementations queued when expanding the source.


--
Eric Botcazou
-------------- next part --------------
A non-text attachment was scrubbed...
Name: pr14470-3.diff
Type: text/x-diff
Size: 3503 bytes
Desc: not available
URL: <http://gcc.gnu.org/pipermail/gcc-patches/attachments/20040322/3949b6e3/attachment.bin>


More information about the Gcc-patches mailing list