This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug middle-end/38533] [4.2/4.3/4.4 regression] tree-ssa-reassoc.c increases register pressure several times
- From: "jakub at gcc dot gnu dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 16 Dec 2008 13:49:07 -0000
- Subject: [Bug middle-end/38533] [4.2/4.3/4.4 regression] tree-ssa-reassoc.c increases register pressure several times
- References: <bug-38533-17083@http.gcc.gnu.org/bugzilla/>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Comment #1 from jakub at gcc dot gnu dot org 2008-12-16 13:49 -------
The culprit is tree-ssa-reassoc.c, with -fno-tree-ssa-reassoc the generated
code is comparable to 3.4.
For some reason it decides:
Transforming err_10 = __err_3 | __err_8;
into err_10 = __err_8 | __err_3;
(no idea what advantages that has, but anyway) but instead of reinserting
the transformed stmt into the location where err_10 used to be set before,
it moves all the 30 err_A = err_B | __err_C stmts (where each stmt depends on
the preceeding one) after the last asm volatile. This means that register
pressure jumps through the roof. In this case (if the transformation actually
makes sense) certainly the first transformed stmt can be inserted into the old
definition spot and all the following stmts can be left untouched.
--
jakub at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |dberlin at gcc dot gnu dot
| |org
Keywords| |missed-optimization
Summary|[4.2/4.3/4.4 regression] |[4.2/4.3/4.4 regression]
|Inefficient stack usage |tree-ssa-reassoc.c increases
| |register pressure several
| |times
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=38533