Re: [PATCH] X86: Add an option -muse-unaligned-vector-move

2021-10-21 Thread H.J. Lu via Gcc-patches
On Thu, Oct 21, 2021 at 12:15 AM Richard Biener wrote: > > On Wed, Oct 20, 2021 at 8:34 PM H.J. Lu wrote: > > > > On Wed, Oct 20, 2021 at 9:58 AM Richard Biener > > wrote: > > > > > > On October 20, 2021 3:19:28 PM GMT+02:00, "H.J. Lu" > > > wrote: > > > >On Wed, Oct 20, 2021 at 4:18 AM Richar

Re: [PATCH] X86: Add an option -muse-unaligned-vector-move

2021-10-21 Thread Richard Biener via Gcc-patches
On Wed, Oct 20, 2021 at 8:34 PM H.J. Lu wrote: > > On Wed, Oct 20, 2021 at 9:58 AM Richard Biener > wrote: > > > > On October 20, 2021 3:19:28 PM GMT+02:00, "H.J. Lu" > > wrote: > > >On Wed, Oct 20, 2021 at 4:18 AM Richard Biener > > > wrote: > > >> > > >> On Wed, Oct 20, 2021 at 12:40 PM Xu Di

Re: [PATCH] X86: Add an option -muse-unaligned-vector-move

2021-10-20 Thread H.J. Lu via Gcc-patches
On Wed, Oct 20, 2021 at 9:58 AM Richard Biener wrote: > > On October 20, 2021 3:19:28 PM GMT+02:00, "H.J. Lu" > wrote: > >On Wed, Oct 20, 2021 at 4:18 AM Richard Biener > > wrote: > >> > >> On Wed, Oct 20, 2021 at 12:40 PM Xu Dianhong wrote: > >> > > >> > Many thanks for your explanation. I got

Re: [PATCH] X86: Add an option -muse-unaligned-vector-move

2021-10-20 Thread Richard Biener via Gcc-patches
On October 20, 2021 3:19:28 PM GMT+02:00, "H.J. Lu" wrote: >On Wed, Oct 20, 2021 at 4:18 AM Richard Biener > wrote: >> >> On Wed, Oct 20, 2021 at 12:40 PM Xu Dianhong wrote: >> > >> > Many thanks for your explanation. I got the meaning of operands. >> > The "addpd b(%rip), %xmm0" instruction need

Re: [PATCH] X86: Add an option -muse-unaligned-vector-move

2021-10-20 Thread H.J. Lu via Gcc-patches
On Wed, Oct 20, 2021 at 4:18 AM Richard Biener wrote: > > On Wed, Oct 20, 2021 at 12:40 PM Xu Dianhong wrote: > > > > Many thanks for your explanation. I got the meaning of operands. > > The "addpd b(%rip), %xmm0" instruction needs "b(%rip)" aligned otherwise it > > will rise a "Real-Address Mod

Re: [PATCH] X86: Add an option -muse-unaligned-vector-move

2021-10-20 Thread Richard Biener via Gcc-patches
On Wed, Oct 20, 2021 at 12:40 PM Xu Dianhong wrote: > > Many thanks for your explanation. I got the meaning of operands. > The "addpd b(%rip), %xmm0" instruction needs "b(%rip)" aligned otherwise it > will rise a "Real-Address Mode Exceptions". > I haven't considered this situation "b(%rip)" has

Re: [PATCH] X86: Add an option -muse-unaligned-vector-move

2021-10-20 Thread Xu Dianhong via Gcc-patches
Many thanks for your explanation. I got the meaning of operands. The "addpd b(%rip), %xmm0" instruction needs "b(%rip)" aligned otherwise it will rise a "Real-Address Mode Exceptions". I haven't considered this situation "b(%rip)" has an address dependence of "a(%rip)" before. I think this situati

Re: [PATCH] X86: Add an option -muse-unaligned-vector-move

2021-10-20 Thread Richard Biener via Gcc-patches
On Wed, Oct 20, 2021 at 9:48 AM Xu Dianhong wrote: > > Thanks for the comments. > > > And does it even work? > It works, I checked it in the test case, and when using this option, it can > emit an unaligned vector move. > >I fail to see adjustments to memory operands of > SSE/AVX instructions tha

Re: [PATCH] X86: Add an option -muse-unaligned-vector-move

2021-10-20 Thread Xu Dianhong via Gcc-patches
Thanks for the comments. >Why would you ever want to have such option?! I need to ask @H. J. Lu for help to answer this question. He knows more about the background. I may not explain it clearly. >Should the documentation at least read "emit unaligned vector moves even for aligned storage or when

Re: [PATCH] X86: Add an option -muse-unaligned-vector-move

2021-10-20 Thread Xu Dianhong via Gcc-patches
Thanks for the comments. > And does it even work? It works, I checked it in the test case, and when using this option, it can emit an unaligned vector move. >I fail to see adjustments to memory operands of SSE/AVX instructions that have to be aligned I changed all vector move in "get_ssemov" witho

Re: [PATCH] X86: Add an option -muse-unaligned-vector-move

2021-10-20 Thread Richard Biener via Gcc-patches
On Wed, Oct 20, 2021 at 9:02 AM Richard Biener wrote: > > On Wed, Oct 20, 2021 at 7:31 AM dianhong.xu--- via Gcc-patches > wrote: > > > > From: dianhong xu > > > > Add -muse-unaligned-vector-move option to emit unaligned vector move > > instaructions. > > Why would you ever want to have such opt

Re: [PATCH] X86: Add an option -muse-unaligned-vector-move

2021-10-20 Thread Richard Biener via Gcc-patches
On Wed, Oct 20, 2021 at 7:31 AM dianhong.xu--- via Gcc-patches wrote: > > From: dianhong xu > > Add -muse-unaligned-vector-move option to emit unaligned vector move > instaructions. Why would you ever want to have such option?! Should the documentation at least read "emit unaligned vector moves

[PATCH] X86: Add an option -muse-unaligned-vector-move

2021-10-19 Thread dianhong.xu--- via Gcc-patches
From: dianhong xu Add -muse-unaligned-vector-move option to emit unaligned vector move instaructions. gcc/ChangeLog: * config/i386/i386-options.c (ix86_target_string): Add -muse-unaligned-vector-move. * config/i386/i386.c (ix86_get_ssemov): Emit unaligned vector if use