Re: [PATCH] [x86]Don't optimize cmp mem, 0 to load mem, reg + test reg, reg

2022-09-19 Thread Hongtao Liu via Gcc-patches
On Fri, Sep 16, 2022 at 9:38 PM Alexander Monakov via Gcc-patches wrote: > > On Fri, 16 Sep 2022, Uros Bizjak via Gcc-patches wrote: > > > On Fri, Sep 16, 2022 at 3:32 AM Jeff Law via Gcc-patches > > wrote: > > > > > > > > > On 9/15/22 19:06, liuhongt via Gcc-patches wrote: > > > > There's peepho

Re: [PATCH] [x86]Don't optimize cmp mem, 0 to load mem, reg + test reg, reg

2022-09-16 Thread Alexander Monakov via Gcc-patches
On Fri, 16 Sep 2022, Uros Bizjak via Gcc-patches wrote: > On Fri, Sep 16, 2022 at 3:32 AM Jeff Law via Gcc-patches > wrote: > > > > > > On 9/15/22 19:06, liuhongt via Gcc-patches wrote: > > > There's peephole2 submit in 1990s which split cmp mem, 0 to load mem, > > > reg + test reg, reg. I don't

Re: [PATCH] [x86]Don't optimize cmp mem, 0 to load mem, reg + test reg, reg

2022-09-15 Thread Uros Bizjak via Gcc-patches
On Fri, Sep 16, 2022 at 3:32 AM Jeff Law via Gcc-patches wrote: > > > On 9/15/22 19:06, liuhongt via Gcc-patches wrote: > > There's peephole2 submit in 1990s which split cmp mem, 0 to load mem, > > reg + test reg, reg. I don't know exact reason why gcc do this. > > > > For latest x86 processors, c

Re: [PATCH] [x86]Don't optimize cmp mem, 0 to load mem, reg + test reg, reg

2022-09-15 Thread Jeff Law via Gcc-patches
On 9/15/22 19:06, liuhongt via Gcc-patches wrote: There's peephole2 submit in 1990s which split cmp mem, 0 to load mem, reg + test reg, reg. I don't know exact reason why gcc do this. For latest x86 processors, ciscization should help processor frontend also codesize, for processor backend, th

Re: [PATCH] [x86]Don't optimize cmp mem, 0 to load mem, reg + test reg, reg

2022-09-15 Thread Hongtao Liu via Gcc-patches
On Fri, Sep 16, 2022 at 9:09 AM liuhongt via Gcc-patches wrote: > > There's peephole2 submit in 1990s which split cmp mem, 0 to load mem, > reg + test reg, reg. I don't know exact reason why gcc do this. > > For latest x86 processors, ciscization should help processor frontend > also codesize, for

[PATCH] [x86]Don't optimize cmp mem, 0 to load mem, reg + test reg, reg

2022-09-15 Thread liuhongt via Gcc-patches
There's peephole2 submit in 1990s which split cmp mem, 0 to load mem, reg + test reg, reg. I don't know exact reason why gcc do this. For latest x86 processors, ciscization should help processor frontend also codesize, for processor backend, they should be the same(has same uops). So the patch de