http://gcc.gnu.org/bugzilla/show_bug.cgi?id=56918
--- Comment #2 from Richard Biener <rguenth at gcc dot gnu.org> 2013-04-11 11:59:05 UTC --- The vectorizer does nothing wrong. The bug goes away with -fdisable-tree-vrp2 which would expose - stmp_var_.3_2 = 0 + 1; - stmp_var_.3_19 = stmp_var_.3_2 + 1; - stmp_var_.3_20 = stmp_var_.3_19 + 1; - vect_cst_.4_21 = {0, stmp_var_.3_2, stmp_var_.3_19, stmp_var_.3_20}; + stmp_var_.3_2 = 1; + stmp_var_.3_19 = 2; + stmp_var_.3_20 = 3; + vect_cst_.4_21 = { 0, 1, 2, 3 }; (ick, unfolded 0 + 1) so we expand vect_patt.11_29 = { 2, 3, 4, 5 } >> 31; vect_patt.12_30 = { -1, -1, -1, -1 } - vect_patt.11_29; vect_patt.13_32 = vect_patt.12_30 * { 3, 3, 3, 3 }; vect_patt.15_33 = { 2, 3, 4, 5 } - vect_patt.13_32; vect_var_.16_35 = vect_patt.15_33 + { 1, 1, 1, 1 }; vect_var_.18_36 = [vec_unpack_float_lo_expr] vect_var_.16_35; vect_var_.18_37 = [vec_unpack_float_hi_expr] vect_var_.16_35; MEM[(double[1024] *)&data] = vect_var_.18_36; MEM[(double[1024] *)&data + 16B] = vect_var_.18_37; _10 = data[0]; if (_10 != 3.0e+0) where I bet that unfolded constant expressions are somehow mis-handled.