------- Comment #16 from dorit at il dot ibm dot com 2006-12-12 20:59 ------- (In reply to comment #13) Looks like what's blocking vectorization of the loop is:
sinc.f90:8: note: value used after loop. sinc.f90:8: note: not vectorized: relevant stmt not supported: D.1408_32 = (*radius_31)[D.1407_30] i.e., there is a value computed in the loop that is also used after the loop (coefficient__lsm.61_26), and the above stmt is in its def-use chain, as can be seen from the loop snippet below: # n_3 = PHI <1(3), n_70(5)>; <L14>:; ... D.1408_32 = (*radius_31)[D.1407_30]; ... D.1410_35 = reciptmp.60_24 * D.1408_32; ... D.1419_63 = D.1410_35 * pretmp.53_51; coefficient__lsm.61_26 = D.1419_63; ... (*tmp_49)[D.1426_67] = D.1419_63; n_70 = n_3 + 1; if (n_3 == D.1398_5) goto <L20>; else goto <L19>; <L19>:; goto <bb 4> (<L14>); # coefficient__lsm.61_54 = PHI <coefficient__lsm.61_26(4)>; <L20>:; *coefficient_44 = coefficient__lsm.61_54; <L10>:; return; We currently support a computation that is used after the loop only if the computation is a reduction. We have a patch in autovect branch that provides the first step towards supporting this situation in general, but it needs more work. How important is this feature do you think? In the meantime you can try to use a different variable for the coefficient inside the loop, and after the loop read the desired value from memory to set the coefficient function argument (hopefully this will disconnect the use outside the loop from the def inside the loop). -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=30038