[Bug tree-optimization/102494] Failure to optimize out vector reduction properly especially when using OpenMP

2021-09-26 Thread crazylht at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=102494

--- Comment #2 from Hongtao.liu  ---
It seems x86 doesn't supports optab reduc_plus_scal_v8hi yet.

[Bug tree-optimization/102494] Failure to optimize out vector reduction properly especially when using OpenMP

2021-09-26 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=102494

Andrew Pinski  changed:

   What|Removed |Added

 Target||x86_64-*-*
   Keywords||missed-optimization

--- Comment #1 from Andrew Pinski  ---
Both with and without -fopenmp-simd works on aarch64-linux-gnu which has a
reduction addition.

Just looks like how reduction addition is handled for x86_64 really.

Also we have:
  MEM  [(short int *)] = vect__21.35_111;
  MEM  [(short int *) + 8B] = vect__21.35_112;
  vect__24.24_88 = MEM  [(short int *)];