[Bug tree-optimization/44976] reductions with short variables do not get vectorized
--- Comment #2 from rguenth at gcc dot gnu dot org 2010-07-20 14:48 --- t.c:6: note: reduction: not commutative/associative: sum_13 = (short int) D.2726_12; this is because sum = (short)((int)sum + (int)a[i]); cannot be folded to sum = sum + a[i]; as that exposes new undefined overflow. Instead we fold it to sum = (short)((unsigned short)sum + (unsigned short)a[i]); which the pattern detection does not handle explicitly. -- rguenth at gcc dot gnu dot org changed: What|Removed |Added Status|UNCONFIRMED |NEW Ever Confirmed|0 |1 GCC build triplet|elf | GCC host triplet|linux | GCC target triplet|ia64| Keywords||missed-optimization Last reconfirmed|-00-00 00:00:00 |2010-07-20 14:48:32 date|| Summary|short variables do not get |reductions with short |vectorized |variables do not get ||vectorized http://gcc.gnu.org/bugzilla/show_bug.cgi?id=44976
[Bug tree-optimization/44976] reductions with short variables do not get vectorized
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=44976 Richard Biener changed: What|Removed |Added Known to work||10.1.0 Resolution|--- |FIXED Status|NEW |RESOLVED --- Comment #4 from Richard Biener --- Fixed in GCC 10.
[Bug tree-optimization/44976] reductions with short variables do not get vectorized
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=44976 Jorn Wolfgang Rennecke changed: What|Removed |Added CC||amylaar at gcc dot gnu.org --- Comment #3 from Jorn Wolfgang Rennecke --- Ironically, this is a case where -fwrapv improves optimization.