http://gcc.gnu.org/bugzilla/show_bug.cgi?id=50698
--- Comment #6 from vincenzo Innocente <vincenzo.innocente at cern dot ch> 2011-10-15 13:40:31 UTC --- I now moved to a more realistic case that can be reduced to this: void loop(float * x, int n) { for (int i=0;i!=n; ++i) x[i]=x[i+n]+x[i+2*n]; } and it creates aliases even if the memory region are clearly disjoint: (used gcc version 4.7.0 20111015 (experimental) (GCC) ) keep here or open an other "enhancement request"? 2: versioning for alias required: can't determine dependence between *D.2199_12 and *D.2195_8 2: mark for run-time aliasing test between *D.2199_12 and *D.2195_8 2: versioning for alias required: can't determine dependence between *D.2205_18 and *D.2195_8 2: mark for run-time aliasing test between *D.2205_18 and *D.2195_8 2: Vectorizing an unaligned access. 2: Vectorizing an unaligned access. 2: Vectorizing an unaligned access. 2: vect_model_load_cost: unaligned supported by hardware. 2: vect_model_load_cost: inside_cost = 2, outside_cost = 0 . 2: vect_model_load_cost: unaligned supported by hardware. 2: vect_model_load_cost: inside_cost = 2, outside_cost = 0 . 2: vect_model_simple_cost: inside_cost = 1, outside_cost = 0 . 2: vect_model_store_cost: unaligned supported by hardware. 2: vect_model_store_cost: inside_cost = 2, outside_cost = 0 . 2: cost model: Adding cost of checks for loop versioning aliasing. 2: cost model: epilogue peel iters set to vf/2 because loop iterations are unknown . 2: Cost model analysis: Vector inside of loop cost: 7 Vector outside of loop cost: 19 Scalar iteration cost: 4 Scalar outside cost: 1 prologue iterations: 0 epilogue iterations: 2 Calculated minimum iters for profitability: 7 2: Profitability threshold = 6 Vectorizing loop at Arena.cpp:2 2: Profitability threshold is 6 loop iterations. 2: create runtime check for data references *D.2199_12 and *D.2195_8 2: create runtime check for data references *D.2205_18 and *D.2195_8 2: created 2 versioning for alias checks. 2: LOOP VECTORIZED. Arena.cpp:1: note: vectorized 1 loops in function.