[Bug tree-optimization/126028] GCC trunk vs ICX : Missed SLP vectorization

"rguenth at gcc dot gnu.org via Gcc-bugs" <[email protected]>
Newsgroups gmane.comp.gcc.bugs
Message-ID <[email protected]/bugzilla/>
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=126028

--- Comment #8 from Richard Biener <rguenth at gcc dot gnu.org> ---
The testcase is now vectorized.  What's missing is more optimal handling of


  pj_x_0 = p_1[jprev0].position.x;  pj_x_1 = p_1[jprev1].position.x;
  pj_y_0 = p_1[jprev0].position.y;  pj_y_1 = p_1[jprev1].position.y;
..
  for (;;)
...
     pj_x_0 = p_1[jprev0].position.x;  pj_x_1 = p_1[jprev1].position.x;
     pj_y_0 = p_1[jprev0].position.y;  pj_y_1 = p_1[jprev1].position.y;

where the three vectors {pj_x_1, pj_x_0}, {pj_y_1, pj_y_0} and {pj_z_1, pj_z_0
}
are constructed from scalar loads (because the vector SLP involves two
distinct load groups).  It's not clear whether two V2DF loads plus
shuffling would be more efficient.  I have a heuristic patch that moves
the CTORs to the latch and the preheader instead of constructing from the
PHI which removes an IV.
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.