------- Comment #4 from irar at il dot ibm dot com 2009-09-27 08:06 ------- (In reply to comment #1) > The interesting thing is that data-ref analysis sees 128bit alignment but > the vectorizer still produces > vect_var_.24_59 = M*vect_p.20_57{misalignment: 0}; > D.2564_12 = *D.2563_11; > vect_var_.25_61 = vect_var_.24_59 * vect_cst_.26_60; > D.2565_13 = D.2564_12 * 2.2999999523162841796875e+0; > M*vect_p.27_64{misalignment: 0} = vect_var_.25_61; > thus, unknown misalignment. > (instantiate_scev > (instantiate_below = 3) > (evolution_loop = 1) > (chrec = {i_10(D), +, 4}_1) > (res = {i_10(D), +, 4}_1)) > base_address: i_10(D) > offset from base address: 0 > constant offset from base address: 0 > step: 4 > aligned to: 128 > base_object: *i_10(D) > Creating dr for *D.2562_7 > (res = {f_6(D), +, 4}_1)) > base_address: f_6(D) > offset from base address: 0 > constant offset from base address: 0 > step: 4 > aligned to: 128 > base_object: *f_6(D) > t2.i:5: note: === vect_enhance_data_refs_alignment === > t2.i:5: note: Vectorizing an unaligned access. > t2.i:5: note: Vectorizing an unaligned access.
"aligned to" refers to the offset misalignment and not to the misalignment of base. attribute aligned works only for arrays, i.e., declarations, and not for pointer arguments. For pointers the vectorizer only checks TYPE_ALIGN_UNIT of the base type. Ira -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=41464