http://gcc.gnu.org/bugzilla/show_bug.cgi?id=46787
--- Comment #1 from Richard Guenther <rguenth at gcc dot gnu.org> 2010-12-03 15:37:16 UTC --- To fix: /* FIXME -- data dependence analysis does not work correctly for objects with invariant addresses in loop nests. Let us fail here until the problem is fixed. */ if (dr_address_invariant_p (dr) && nest) { free_data_ref (dr); if (dump_file && (dump_flags & TDF_DETAILS)) fprintf (dump_file, "\tFAILED as dr address is invariant\n"); ret = false; break; } for this to work and be a real improvement we need to pass down the minimum iterations of the loop (thus, the minimum vectorization factor in case of the vectorizer). We can also fix it up locally in the vectorizer when compute_data_dependences_for_loop would not re-scan the loop for data references (but we'd do it in the vectorizer and remove the scalar loads). We can also avoid computing data dependences until vect_analyze_data_ref_dependences then and save some compile-time for non-vectorized loops.