https://gcc.gnu.org/bugzilla/show_bug.cgi?id=118957
--- Comment #6 from Filip Kastl <pheeck at gcc dot gnu.org> --- I've measured this again. I used -O2 -march=generic -flto PGO on an AMD Zen4 machine. Between r15-7400-gd3ff498c478ace r15-7852-ge836d80374aa03 the slowdown disappears. So, as with pr118959, I think the issue is fixed and once that is confirmed by our automatic benchmarking, I'll close this PR.