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

--- Comment #3 from Richard Biener <rguenth at gcc dot gnu.org> ---
if-conversion builds

  _51 = LOOP_VECTORIZED (3, 4);

but

new phi replacement stmt
prephitmp_63 = prephitmp_62 != 0 ? _3 : prephitmp_62;
Degenerate phi!
prephitmp_52 = PHI <3(6)>
Degenerate phi!
prephitmp_54 = PHI <prephitmp_63(6)>
Applying pattern match.pd:865, generic-match.c:429
Removing basic block 5
basic block 5, loop depth 1
 pred:
 succ:


Removing basic block 6
basic block 6, loop depth 1
 pred:
 succ:


Merging blocks 17 and 11
Merging blocks 4 and 24
Merging blocks 21 and 22
gimple_simplified to if (1 != 0)
Applying pattern match.pd:853, gimple-match.c:164
Applying pattern match.pd:2618, gimple-match.c:57412
Removing basic block 23
basic block 23, loop depth 1
 pred:       21
goto <bb 19>;
 succ:       19


fix_loop_structure: fixing up loops for function
fix_loop_structure: removing loop 4


so there is no loop 4 in the end ...


Before if-conversion the IL has

  <bb 11>:
  # prephitmp_52 = PHI <3(6)>
  # prephitmp_54 = PHI <prephitmp_63(6)>
  if (prephitmp_52 != 0)

which likely messes things up.  copyprop leaves us with this unpropagated
constant by means of stmt folding during SSA substitution phase.


We are generally not fixing up a LOOP_VECTORIZED call when loops vanish
as we assume that doesn't happen between if-conversion and vectorization.

Reply via email to