http://gcc.gnu.org/bugzilla/show_bug.cgi?id=59519

--- Comment #4 from bin.cheng <amker.cheng at gmail dot com> ---
First clue.

b_lsm.11_13 is recognized as chrec {1, +, 1}_2 with the patch, thus the loop
can be vectorized now.

  <bb 5>:

  <bb 6>:
  # b.4_30 = PHI <b.4_12(5), 1(12)>
  # prephitmp_28 = PHI <c.1_9(5), c.1_21(12)>
  # b_lsm.11_13 = PHI <b.4_12(5), 1(12)>
  # ivtmp_46 = PHI <ivtmp_45(5), 13(12)>
  c.1_9 = prephitmp_28 | 1;
  b.4_12 = b.4_30 + 1;
  ivtmp_45 = ivtmp_46 - 1;
  if (ivtmp_45 != 0)
    goto <bb 5>;
  else
    goto <bb 7>;

Problem arises in calling stack like:
vect_do_peeling_for_loop_bound
  slpeel_tree_peel_loop_to_edge
    slpeel_update_phi_nodes_for_guard1
for phi node : # b_lsm.11_13 = PHI <b.4_12(5), 1(12)>

It looks like loop peeling has difficulty in coping with peeled phi node.

Reply via email to