http://gcc.gnu.org/bugzilla/show_bug.cgi?id=48290
Summary: FAIL: gcc.dg/vect/pr38529.c, ICE in vect_get_vec_def_for_operand, at tree-vect-stmts.c:1072 Product: gcc Version: 4.7.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: tree-optimization AssignedTo: unassig...@gcc.gnu.org ReportedBy: rgue...@gcc.gnu.org CC: i...@gcc.gnu.org The vectorizer seems to mishandle PHIs for <bb 3>: <bb 4>: # j_17 = PHI <j_5(3), 0(7)> # ivtmp.6_14 = PHI <ivtmp.6_15(3), 17(7)> j_5 = j_17 + 1; ivtmp.6_15 = ivtmp.6_14 - 1; if (ivtmp.6_15 != 0) goto <bb 3>; else goto <bb 5>; <bb 5>: # a_I_lsm.4_2 = PHI <0.0(4)> a[i_16] = a_I_lsm.4_2; i_6 = i_16 + 1; ivtmp.5_12 = ivtmp.5_10 - 1; if (ivtmp.5_12 != 0) goto <bb 6>; else goto <bb 8>; <bb 6>: <bb 7>: # i_16 = PHI <0(2), i_6(6)> # ivtmp.5_10 = PHI <4(2), ivtmp.5_12(6)> goto <bb 4>; in outer loop vectorization. Somehow this PHI isn't processed at all. While I will fix copyprop further to propagate the zero to its single use I think the vectorizer shouldn't ICE on this case either. Ira, can you have a look? Thanks, Richard.