https://gcc.gnu.org/bugzilla/show_bug.cgi?id=98908
--- Comment #9 from Gabriel Ravier ---
PS: I had missed at the time that the bug wasn't present in GCC 10/9/8 though,
so perhaps it should be considered as having been a GCC 11 regression that got
fixed in trunk ?
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=98908
--- Comment #8 from Gabriel Ravier ---
Well, fixing a bug filed in 2021 in GCC 9 seems quite hard. Are you confused
about the nature of the bug ? The first example in the description *is* the one
whose optimization the bug is about, and it is
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=98908
Andrew Pinski changed:
What|Removed |Added
Status|WAITING |RESOLVED
Target Milestone|---
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=98908
--- Comment #6 from Gabriel Ravier ---
Also the second example wasn't misoptimized, on the contrary it was the most
reasonable portable function I could write that would work equivalently to the
first *and* that GCC would optimize ideally.
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=98908
--- Comment #5 from Gabriel Ravier ---
It may have been doing it in GCC 8 (and 9, and 10), but it didn't in 11, and
presumably this was also the case in trunk back in February.
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=98908
--- Comment #4 from Andrew Pinski ---
The second function is able to be optimized since GCC 9 with bswap producing:
load_dst_16 = MEM [(unsigned char *)];
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=98908
Andrew Pinski changed:
What|Removed |Added
Status|NEW |WAITING
--- Comment #3 from Andrew
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=98908
--- Comment #2 from Gabriel Ravier ---
This seems to have been fixed in trunk.
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=98908
Richard Biener changed:
What|Removed |Added
Blocks||53947
Status|UNCONFIRMED