Fix PR rtl-optimization/54369

Eric Botcazou ebotcazou@adacore.com
Sun Sep 2 10:38:00 GMT 2012


This is a wrong code bug at -O2 reported for MIPS and caused by the discrepancy 
between the natural placement of barriers in the RTL stream and the placement 
expected by the dbr pass (actually by the delete_related_insns machinery).

The MIPS port invokes the dbr pass from its own reorg pass and the prerequisite 
for the placement of barriers isn't fulfilled in this case.  Ironically enough, 
Richard S. remarked that the SPARC port is plagued by the same problem when its 
own reorg pass is activated (but that's almost never the case for SPARC).

Tested by Steve on MIPS and me on SPARC, approved by Richard for the MIPS part 
and applied on all active branches.


2012-09-02  Eric Botcazou  <ebotcazou@adacore.com>

	PR rtl-optimization/54369
	* config/mips/mips.c (mips_reorg): Invoke cleanup_barriers before
	calling dbr_schedule.
	* config/sparc/sparc.c (sparc_reorg): Likewise.


-- 
Eric Botcazou
-------------- next part --------------
A non-text attachment was scrubbed...
Name: p.diff
Type: text/x-patch
Size: 1115 bytes
Desc: not available
URL: <http://gcc.gnu.org/pipermail/gcc-patches/attachments/20120902/967ebd70/attachment.bin>


More information about the Gcc-patches mailing list