http://gcc.gnu.org/bugzilla/show_bug.cgi?id=57051
Richard Biener <rguenth at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|UNCONFIRMED |NEW Known to work| |4.7.3 Version|unknown |4.8.0 Keywords| |missed-optimization Last reconfirmed| |2013-04-24 CC| |glisse at gcc dot gnu.org, | |rguenth at gcc dot gnu.org Ever Confirmed|0 |1 Summary|Optimization regression in |[4.8/4.9 Regression] |4.8.0 from 4.7.2 |Optimization regression in | |4.8.0 from 4.7.2 Target Milestone|--- |4.8.1 --- Comment #3 from Richard Biener <rguenth at gcc dot gnu.org> 2013-04-24 08:30:06 UTC --- It seems scev_cprop doesn't do its job here. (get_scalar_evolution (scalar = total.1_8) (scalar_evolution = {pretmp_14, +, _6 + 10}_1)) that's ok - SCCP doesn't provide any info in dumps, but I suppose it fails to compute the number of iterations here(!?). And we don't constant-fold the vectorized code: pretmp_14 = total; vect_total.18_44 = { 40, 60, 80, 100 } v>> 64; vect_total.18_45 = vect_total.18_44 + { 40, 60, 80, 100 }; vect_total.18_46 = vect_total.18_45 v>> 32; vect_total.18_47 = vect_total.18_46 + vect_total.18_45; stmp_total.17_48 = BIT_FIELD_REF <vect_total.18_47, 32, 0>; vect_total.19_49 = stmp_total.17_48 + pretmp_14; total.1_9 = vect_total.19_49 + 80; total.1_20 = vect_total.19_49 + 170; total = total.1_20; because we do not constant-fold vector shifts. Two ways to attack the problem (SCCP failure needs to be analyzed). In 4.7 SCCP works.