— Jojo 在 2021年11月16日 +0800 PM8:12,Richard Biener <richard.guent...@gmail.com>,写道: > On Tue, Nov 16, 2021 at 12:45 PM Jojo R via Gcc-patches > <gcc-patches@gcc.gnu.org> wrote: > > > > Skip renaming if instruction is noop move, and it will > > been removed for performance. > > Is there any (target specific) testcase you can add? Such commits are > problematic > when later bisected to since the intent isn't clear.
I made a issue in bugzilla, please check it, thanks. https://gcc.gnu.org/bugzilla/show_bug.cgi?id=103296 > > > gcc/ > > * regrename.c (find_rename_reg): Return satisfied regno > > if instruction is noop move. > > --- > > gcc/regrename.c | 3 +++ > > 1 file changed, 3 insertions(+) > > > > diff --git a/gcc/regrename.c b/gcc/regrename.c > > index b8a9ca36f22..cb605f5176b 100644 > > --- a/gcc/regrename.c > > +++ b/gcc/regrename.c > > @@ -394,6 +394,9 @@ find_rename_reg (du_head_p this_head, enum reg_class > > super_class, > > this_head, *unavailable)) > > return this_head->tied_chain->regno; > > > > + if (noop_move_p (this_head->first->insn)) > > + return best_new_reg; > > + > > /* If PREFERRED_CLASS is not NO_REGS, we iterate in the first pass > > over registers that belong to PREFERRED_CLASS and try to find the > > best register within the class. If that failed, we iterate in > > -- > > 2.24.3 (Apple Git-128)