https://gcc.gnu.org/bugzilla/show_bug.cgi?id=77308
--- Comment #54 from Bernd Edlinger <bernd.edlinger at hotmail dot de> --- (In reply to richard.earnshaw from comment #53) > On 02/11/16 11:57, bernd.edlinger at hotmail dot de wrote: > > https://gcc.gnu.org/bugzilla/show_bug.cgi?id=77308 > > > > --- Comment #52 from Bernd Edlinger <bernd.edlinger at hotmail dot de> --- > > (In reply to wilco from comment #51) > >> > >> Indeed, that's the reason behind the existing check. However it disables > >> all > >> profitable bswap cases while still generating unaligned accesses if no > >> bswap > >> is needed. So I am looking for a callback that gives the correct answer. It > >> would need to check -mno-unaligned-access and the target capabilities (eg. > >> if unaligned accesses are supported in hardware but really expensive we > >> want > >> to avoid them). > > > > Yes. I think ARM is becoming a non-strict-alignment platform. > > While x86_64 is moving in the opposite direction. > > It can never be a non-strict alignment platform while some memory access > instructions do not support unaligned accesses. > > However, it is progressively becoming a less slow unaligned access platform. > But isn't that exactly the same situation for x86_64: Most instructions support unaligned memory accesses, and a few data types need a movmisalign_optab ?