[Bug tree-optimization/86530] Vectorization failure for a simple loop
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=86530 --- Comment #8 from Tamar Christina --- (In reply to Andrew Pinski from comment #6) > With my patch for V4QI, we still don't get the best code: > vect_perm_even_271 = VEC_PERM_EXPR 4, 6 }>; > vect_perm_even_273 = VEC_PERM_EXPR 4, 6 }>; > vect_perm_even_275 = VEC_PERM_EXPR vect_perm_even_273, { 0, 2, 4, 6 }>; > > _275={_264[0], _264[2], _268[0], _268[2]} or > VEC_PERM<_264, _268, {0, 2, 4, 6}> > > but for some reason we don't reduce it to that perm > > And there is still a lot of extra PERMS than there should be. Because this loop is not something that can be fixed by using V4QI (we tried before). This loop requires improvements to SCEV and SLP. It's loading 16 sequential bytes as there's no gap between the p1 and p2 values across iterations.. so this loop should vectorized with V16QI and widening additions. So I don't think this is related to the other example. So I'll take it back as it requires actual vectorizer work and part of things we're trying to address in GCC 15.
[Bug tree-optimization/86530] Vectorization failure for a simple loop
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=86530 --- Comment #7 from Andrew Pinski --- The whole PERM<0,2,1,3> shows up a few times in many other places too.
[Bug tree-optimization/86530] Vectorization failure for a simple loop
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=86530 --- Comment #6 from Andrew Pinski --- With my patch for V4QI, we still don't get the best code: vect_perm_even_271 = VEC_PERM_EXPR ; vect_perm_even_273 = VEC_PERM_EXPR ; vect_perm_even_275 = VEC_PERM_EXPR ; _275={_264[0], _264[2], _268[0], _268[2]} or VEC_PERM<_264, _268, {0, 2, 4, 6}> but for some reason we don't reduce it to that perm And there is still a lot of extra PERMS than there should be.
[Bug tree-optimization/86530] Vectorization failure for a simple loop
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=86530 Andrew Pinski changed: What|Removed |Added See Also||https://gcc.gnu.org/bugzill ||a/show_bug.cgi?id=113458 Assignee|tnfchris at gcc dot gnu.org|pinskia at gcc dot gnu.org --- Comment #5 from Andrew Pinski --- Actually I have a patch for this (PR 113458 also) which I will be submitting for GCC 15.
[Bug tree-optimization/86530] Vectorization failure for a simple loop
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=86530 Eric Gallager changed: What|Removed |Added CC||egallager at gcc dot gnu.org See Also||https://gcc.gnu.org/bugzill ||a/show_bug.cgi?id=65930, ||https://gcc.gnu.org/bugzill ||a/show_bug.cgi?id=88492 Blocks||26163 --- Comment #4 from Eric Gallager --- (In reply to Tamar Christina from comment #3) > I'll take this one as part of GCC10. Reconfirmed at Cauldron, where it was also mentioned that this bug is related to bug 65930 and bug 88492 Referenced Bugs: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=26163 [Bug 26163] [meta-bug] missed optimization in SPEC (2k17, 2k and 2k6 and 95)
[Bug tree-optimization/86530] Vectorization failure for a simple loop
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=86530 Tamar Christina changed: What|Removed |Added Status|NEW |ASSIGNED CC||tnfchris at gcc dot gnu.org Assignee|unassigned at gcc dot gnu.org |tnfchris at gcc dot gnu.org --- Comment #3 from Tamar Christina --- I'll take this one as part of GCC10.
[Bug tree-optimization/86530] Vectorization failure for a simple loop
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=86530 ktkachov at gcc dot gnu.org changed: What|Removed |Added Keywords||missed-optimization Status|UNCONFIRMED |NEW Last reconfirmed||2018-07-16 CC||ktkachov at gcc dot gnu.org Ever confirmed|0 |1 --- Comment #2 from ktkachov at gcc dot gnu.org --- Confirmed
[Bug tree-optimization/86530] Vectorization failure for a simple loop
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=86530 --- Comment #1 from Jiangning Liu --- Created attachment 44396 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=44396=edit vectorization failure Attached is -O3 result for aarch64, in which no vectorization code generated at all.