[Bug tree-optimization/111791] RISC-V: Strange loop vectorizaion on popcount function

2023-10-18 Thread juzhe.zhong at rivai dot ai via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=111791 --- Comment #7 from JuzheZhong --- I don't think this is popcount vectorization issue. This code should not be vectorized. It's true this code won' be vectorized if we use default COST model. So this is not an issue.

[Bug tree-optimization/111791] RISC-V: Strange loop vectorizaion on popcount function

2023-10-18 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=111791 --- Comment #6 from Andrew Pinski --- (In reply to Vineet Gupta from comment #5) > (In reply to Robin Dapp from comment #4) > > > Analyzing loop at pr111791.c:8 > > pr111791.c:8:25: note: === analyze_loop_nest === > > pr111791.c:8:25: note:

[Bug tree-optimization/111791] RISC-V: Strange loop vectorizaion on popcount function

2023-10-18 Thread vineetg at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=111791 --- Comment #5 from Vineet Gupta --- (In reply to Robin Dapp from comment #4) > Analyzing loop at pr111791.c:8 > pr111791.c:8:25: note: === analyze_loop_nest === > pr111791.c:8:25: note: === vect_analyze_loop_form === > pr111791.c:8:25:

[Bug tree-optimization/111791] RISC-V: Strange loop vectorizaion on popcount function

2023-10-18 Thread rdapp at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=111791 --- Comment #4 from Robin Dapp --- This is a scalar popcount and as Kito already noted we will just emit cpop a0, a0 once the zbb extension is present. As to the question what is actually being vectorized here, I'm not so sure :D It looks

[Bug tree-optimization/111791] RISC-V: Strange loop vectorizaion on popcount function

2023-10-13 Thread juzhe.zhong at rivai dot ai via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=111791 JuzheZhong changed: What|Removed |Added CC||juzhe.zhong at rivai dot ai --- Comment

[Bug tree-optimization/111791] RISC-V: Strange loop vectorizaion on popcount function

2023-10-13 Thread rguenth at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=111791 --- Comment #2 from Richard Biener --- It does do that (if there's a POPCOUNT optab, that is). Replacing with __builtin_popcount would eventually lead to an infinite recursion in this case ;) (see that old memcpy + ldist bug)

[Bug tree-optimization/111791] RISC-V: Strange loop vectorizaion on popcount function

2023-10-12 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=111791 Andrew Pinski changed: What|Removed |Added Last reconfirmed||2023-10-12 CC|