[Bug tree-optimization/98908] Failure to optimize arithmetic involving struct members into operating on the entire struct

2021-09-02 Thread gabravier at gmail dot com via Gcc-bugs
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 ?

[Bug tree-optimization/98908] Failure to optimize arithmetic involving struct members into operating on the entire struct

2021-09-02 Thread gabravier at gmail dot com via Gcc-bugs
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

[Bug tree-optimization/98908] Failure to optimize arithmetic involving struct members into operating on the entire struct

2021-09-02 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=98908 Andrew Pinski changed: What|Removed |Added Status|WAITING |RESOLVED Target Milestone|---

[Bug tree-optimization/98908] Failure to optimize arithmetic involving struct members into operating on the entire struct

2021-09-02 Thread gabravier at gmail dot com via Gcc-bugs
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.

[Bug tree-optimization/98908] Failure to optimize arithmetic involving struct members into operating on the entire struct

2021-09-02 Thread gabravier at gmail dot com via Gcc-bugs
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.

[Bug tree-optimization/98908] Failure to optimize arithmetic involving struct members into operating on the entire struct

2021-09-02 Thread pinskia at gcc dot gnu.org via Gcc-bugs
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 *)];

[Bug tree-optimization/98908] Failure to optimize arithmetic involving struct members into operating on the entire struct

2021-09-02 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=98908 Andrew Pinski changed: What|Removed |Added Status|NEW |WAITING --- Comment #3 from Andrew

[Bug tree-optimization/98908] Failure to optimize arithmetic involving struct members into operating on the entire struct

2021-09-02 Thread gabravier at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=98908 --- Comment #2 from Gabriel Ravier --- This seems to have been fixed in trunk.

[Bug tree-optimization/98908] Failure to optimize arithmetic involving struct members into operating on the entire struct

2021-02-01 Thread rguenth at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=98908 Richard Biener changed: What|Removed |Added Blocks||53947 Status|UNCONFIRMED