[Bug c/102062] powerpc suboptimal unrolling simple array sum

2021-08-25 Thread segher at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=102062 --- Comment #12 from Segher Boessenkool --- We can backport Hao Chen's patch, it has proven to cause no problems at all. We don't normally backport patches that aren't bugfixes, but we could do it for important enough things (we did it for most

[Bug c/102062] powerpc suboptimal unrolling simple array sum

2021-08-25 Thread dje at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=102062 --- Comment #11 from David Edelsohn --- We could backport Haochen's patch to AT.

[Bug c/102062] powerpc suboptimal unrolling simple array sum

2021-08-25 Thread wschmidt at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=102062 --- Comment #10 from Bill Schmidt --- Well, the problem is that we still generate suboptimal code on GCC 11. I don't know whether we want to address that or not. I suppose we aren't going to backport Haochen's lovely patch for sign extensions,

[Bug c/102062] powerpc suboptimal unrolling simple array sum

2021-08-25 Thread segher at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=102062 --- Comment #9 from Segher Boessenkool --- Thanks for the detective work! So the variable expansion code could be improved to handle sign extensions better (or maybe zero extensions as well?) In either case that won't help rs6000 much anymore

[Bug c/102062] powerpc suboptimal unrolling simple array sum

2021-08-25 Thread linkw at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=102062 Kewen Lin changed: What|Removed |Added CC||linkw at gcc dot gnu.org --- Comment #8 fro

[Bug c/102062] powerpc suboptimal unrolling simple array sum

2021-08-25 Thread segher at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=102062 --- Comment #7 from Segher Boessenkool --- Btw, -ftree-loop-vectorize -fvect-cost-model=cheap makes this 8 vectors per iteration (and very-cheap doesn't vectorise it). Maybe overkill, esp. when you look at the tail code, but that 8 vector core

[Bug c/102062] powerpc suboptimal unrolling simple array sum

2021-08-25 Thread segher at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=102062 --- Comment #6 from Segher Boessenkool --- (In reply to Nicholas Piggin from comment #0) > I may be unaware of a constraint of C standard here, but maintaining the two > base addresses seems pointless, This is an ordering problem. The unroller

[Bug c/102062] powerpc suboptimal unrolling simple array sum

2021-08-25 Thread npiggin at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=102062 --- Comment #5 from Nicholas Piggin --- (In reply to Bill Schmidt from comment #2) > As expected, I get similar code when compiling either for P9 or P10. Oh I should have specified, -O2 is the only option. If I add -fvariable-expansion-in-unrol

[Bug c/102062] powerpc suboptimal unrolling simple array sum

2021-08-25 Thread wschmidt at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=102062 Bill Schmidt changed: What|Removed |Added Status|UNCONFIRMED |NEW Ever confirmed|0

[Bug c/102062] powerpc suboptimal unrolling simple array sum

2021-08-25 Thread npiggin at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=102062 --- Comment #3 from Nicholas Piggin --- (In reply to Bill Schmidt from comment #2) > As expected, I get similar code when compiling either for P9 or P10. Oh I should have specified, -O2 is the only option. If I add -fvariable-expansion-in-unrol

[Bug c/102062] powerpc suboptimal unrolling simple array sum

2021-08-25 Thread wschmidt at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=102062 --- Comment #2 from Bill Schmidt --- As expected, I get similar code when compiling either for P9 or P10.

[Bug c/102062] powerpc suboptimal unrolling simple array sum

2021-08-25 Thread wschmidt at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=102062 Bill Schmidt changed: What|Removed |Added CC||wschmidt at gcc dot gnu.org --- Comment