[Bug tree-optimization/126398] Missed optimization in byte swapping

"rguenth at gcc dot gnu.org via Gcc-bugs" <[email protected]>
Newsgroups gmane.comp.gcc.bugs
Message-ID <[email protected]/bugzilla/>
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=126398

Richard Biener <rguenth at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
     Ever confirmed|0                           |1
   Last reconfirmed|                            |2026-07-27
             Status|UNCONFIRMED                 |NEW

--- Comment #1 from Richard Biener <rguenth at gcc dot gnu.org> ---
Note for 'byteswap' this would be loop distribution given it's memory-based.

For both loops complete unrolling would likely help expose this to our
scalar-code bswap matchers but even for -O3 this is considered only at late
cunroll.

I also see a _gfortran_internal_pack remaining for byteswap.

le_to_be should recognize this at store-merging time iff we'd run scalar
bswap recognition again (at -O3).
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.