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

--- Comment #27 from Richard Biener <rguenth at gcc dot gnu.org> ---
OK, so here we end up with

  <bb 2> [local count: 14598063]:
  D.165232.m_size = 1;
  D.165232.m_data = "\x12\"\x00"; 
  sought = D.165232;
  .ASSUME (_ZNK11QStringView4sizeEv._assume.0, &sought);
  goto <bb 33>; [100.00%]

... (with calls to qt_assert)

  <bb 31> [local count: 1073741824]:
  # i_12 = PHI <i_15(30), 0(56)>
  if (_8 > i_12)
    goto <bb 5>; [89.00%]
  else
    goto <bb 32>; [11.00%]

  <bb 32> [local count: 118111600]:
  tokensMatched_17 = tokensMatched_16 + 1;

  <bb 33> [local count: 132709663]:
  # idx_19 = PHI <-1(2), _98(30)>
  # tokensMatched_16 = PHI <0(2), tokensMatched_17(30)>
  _20 = idx_19 + 1;
  s = sought;
  _67 = s.m_size;
  _68 = __builtin_constant_p (_67);
  if (_68 != 0)
    goto <bb 34>; [50.00%]
  else
    goto <bb 54>; [50.00%]

  <bb 34> [local count: 4880644631]:
  _69 = (long unsigned int) _67;
  if (_69 <= 4611686018427387902)
    goto <bb 36>; [100.00%]
  else
    goto <bb 35>; [0.00%]

  <bb 35> [count: 0]:
  __builtin_unreachable ();

and the .ASSUME makes 'sought' address-taken and thus clobbered
by calls.  I have a patch to fix that, with that it's optimized.

Reply via email to