This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug tree-optimization/55802] Various missed optimizations for a simple function in GCC itself
- From: "rguenth at gcc dot gnu.org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Wed, 02 Jan 2013 11:00:54 +0000
- Subject: [Bug tree-optimization/55802] Various missed optimizations for a simple function in GCC itself
- Auto-submitted: auto-generated
- References: <bug-55802-4@http.gcc.gnu.org/bugzilla/>
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=55802
--- Comment #2 from Richard Biener <rguenth at gcc dot gnu.org> 2013-01-02 11:00:54 UTC ---
The sink issue is that we cannot sink PHI nodes:
<bb 4>:
...
if (_11 < _20)
goto <bb 5>;
else
goto <bb 6>;
<bb 5>:
_26 = _19->block_info;
_27 = (long unsigned int) _11;
_28 = _27 * 8;
_29 = _26 + _28;
<bb 6>:
# _30 = PHI <0B(4), _29(5)>
...
if (_14 != 0)
goto <bb 8>;
else
goto <bb 7>;
<bb 7>:
op2_12 = &_30->out;
...
to be able to sink the definition of _30 into basic-block 7 we'd have to
sink the whole control structure. Similar to how we only (very) weakly
handle hoisting loop invaraint conditional code we cannot at all sink
conditional code.
-> more specific bug