This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug tree-optimization/81409] Inefficient loops generated from range-v3 code
- From: "glisse at gcc dot gnu.org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Wed, 12 Jul 2017 12:19:12 +0000
- Subject: [Bug tree-optimization/81409] Inefficient loops generated from range-v3 code
- Auto-submitted: auto-generated
- References: <bug-81409-4@http.gcc.gnu.org/bugzilla/>
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=81409
--- Comment #1 from Marc Glisse <glisse at gcc dot gnu.org> ---
The most obvious thing I notice is
<bb 6> [100.00%] [count: INV]:
# it$_M_current_23 = PHI <it$_M_current_41(5), _27(7)>
_20 = _7 == it$_M_current_23;
_5 = _20 | _53;
if (_5 != 0)
goto <bb 9>; [7.36%] [count: INV]
else
goto <bb 7>; [92.64%] [count: INV]
<bb 7> [92.60%] [count: INV]:
_27 = it$_M_current_23 + 4;
if (_7 != _27)
goto <bb 8>; [3.75%] [count: INV]
else
goto <bb 6>; [96.25%] [count: INV]
where 7 -> 6 means that _7 == _27 == it$_M_current_23 so _5 != 0 has to be
true. However, we do not thread that (at thread4 time, we go from 7 to 12
(empty latch) to 6 instead of directly to 6).