https://gcc.gnu.org/bugzilla/show_bug.cgi?id=63679
--- Comment #34 from rguenther at suse dot de <rguenther at suse dot de> --- On Tue, 28 Jul 2015, pinskia at gcc dot gnu.org wrote: > https://gcc.gnu.org/bugzilla/show_bug.cgi?id=63679 > > --- Comment #33 from Andrew Pinski <pinskia at gcc dot gnu.org> --- > (In reply to alalaw01 from comment #32) > > and the optimized tree is: > > > > foo () > > { > > int vect_sum_9.6; > > int stmp_sum_9.5; > > vector(4) int vect_sum_9.4; > > const vector(4) int vect__8.3; > > const int a[8]; > > > > <bb 2>: > > MEM[(int[8] *)&a] = { 0, 1, 2, 3 }; > > MEM[(int[8] *)&a + 16B] = { 4, 5, 6, 7 }; > > vect__8.3_20 = MEM[(int *)&a]; > > vect__8.3_18 = MEM[(int *)&a + 16B]; > > So a missing constant prop here. Yes, but DOM should have handled this. > > > vect_sum_9.4_23 = vect__8.3_18 + vect__8.3_20; > > Also most likely we don't have much constant folding for this. We do. > > stmp_sum_9.5_25 = [reduc_plus_expr] vect_sum_9.4_23; > > Or even this. Likewise. > But once those are resolved, this whole function will resolve itself :). RTL CSE should catch the constant prop I think but I doubt we have much vector op simplify_rtx support.