[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 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 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] New: GCC7: generate movaps instruction when assign to unaligned __int128*

2018-02-22 Thread buaa.zhaoc at gmail dot com
Priority: P3 Component: c++ Assignee: unassigned at gcc dot gnu.org Reporter: buaa.zhaoc at gmail dot com Target Milestone: --- compiling the following code. Run the binary will cause a segment fault. GCC version is 7.3, Target: x86_64-pc-linux-gnu