https://gcc.gnu.org/bugzilla/show_bug.cgi?id=118468

Richard Biener <rguenth at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
     Ever confirmed|0                           |1
           Keywords|                            |missed-optimization
             Status|UNCONFIRMED                 |NEW
             Blocks|                            |53947
   Last reconfirmed|                            |2025-01-14

--- Comment #1 from Richard Biener <rguenth at gcc dot gnu.org> ---
That bb 12 isn't inside the loop.  The issue is that if-conversion fails
to if-convert

  <bb 3> [local count: 1044213920]:  (loop header)
  # s_15 = PHI <s_10(9), s_7(D)(8)>
  _1 = *s_15;
  if (_1 > 63)
    goto <bb 11>; [50.00%]
  else 
    goto <bb 4>; [50.00%]

  <bb 11> [local count: 522106960]:
  goto <bb 5>; [100.00%]

  <bb 4> [local count: 522106960]:
  _14 = (int) _1;
  _17 = 9223372036854785024 >> _14;
  _18 = _17 & 1;
  _19 = _18 == 0;
  _25 = ~_19;

  <bb 5> [local count: 1044213920]:
  # prephitmp_26 = PHI <_25(4), 0(11)>

because

"Can not ifcvt due to multiple exits"

that's a stop-gap to avoid spending time on if-converting that's useless
in the end.  We also have

"basic block after exit bb but before latch"

so basically if-conversion doesn't know how to if-convert between
two exits - it always tries to remove _all_ control flow, not knowing
how to keep hands off of exit tests.


Referenced Bugs:

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=53947
[Bug 53947] [meta-bug] vectorizer missed-optimizations

Reply via email to