This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug tree-optimization/81409] Inefficient loops generated from range-v3 code


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).

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]