[Bug c++/84525] GCC7: generate movaps instruction when assign to unaligned __int128*

2018-02-23 Thread buaa.zhaoc at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=84525 --- Comment #6 from Zhao Chun --- (In reply to Jakub Jelinek from comment #5) > I wrote it above. memcpy or packed struct. And there is no reason to think > about memcpy as something inefficient, GCC will turn those single element > memcpy

[Bug c++/84525] GCC7: generate movaps instruction when assign to unaligned __int128*

2018-02-23 Thread jakub at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=84525 --- Comment #5 from Jakub Jelinek --- I wrote it above. memcpy or packed struct. And there is no reason to think about memcpy as something inefficient, GCC will turn those single element memcpy calls into efficient unaligned loads or stores.

[Bug c++/84525] GCC7: generate movaps instruction when assign to unaligned __int128*

2018-02-23 Thread buaa.zhaoc at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=84525 --- Comment #4 from Zhao Chun --- (In reply to Jakub Jelinek from comment #3) > (In reply to Zhao Chun from comment #2) > > Thanks for you explain. > > It looks some weird to me. > > If the type was int64_t or others, this can work. > > No, it

[Bug c++/84525] GCC7: generate movaps instruction when assign to unaligned __int128*

2018-02-23 Thread jakub at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=84525 --- Comment #3 from Jakub Jelinek --- (In reply to Zhao Chun from comment #2) > Thanks for you explain. > It looks some weird to me. > If the type was int64_t or others, this can work. No, it would be invalid too. It may appear to work. > Is

[Bug c++/84525] GCC7: generate movaps instruction when assign to unaligned __int128*

2018-02-23 Thread buaa.zhaoc at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=84525 --- Comment #2 from Zhao Chun --- Thanks for you explain. It looks some weird to me. If the type was int64_t or others, this can work. Is there some specs to say that __int128 is 16-byte aligned?

[Bug c++/84525] GCC7: generate movaps instruction when assign to unaligned __int128*

2018-02-22 Thread jakub at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=84525 Jakub Jelinek changed: What|Removed |Added Status|UNCONFIRMED |RESOLVED CC|