On Thu, Apr 6, 2023 at 1:07 PM Liu, Hongtao via Gcc-patches <gcc-patches@gcc.gnu.org> wrote: > > > > > -----Original Message----- > > From: Vladimir Makarov <vmaka...@redhat.com> > > Sent: Wednesday, April 5, 2023 8:59 PM > > To: Jeff Law <jeffreya...@gmail.com>; Liu, Hongtao > > <hongtao....@intel.com>; gcc-patches@gcc.gnu.org > > Subject: Re: [PATCH] Check hard_regno_mode_ok before setting lowest > > memory move cost for the mode with different reg classes. > > > > > > On 4/4/23 21:29, Jeff Law wrote: > > > > > > > > > On 4/3/23 23:13, liuhongt via Gcc-patches wrote: > > >> There's a potential performance issue when backend returns some > > >> unreasonable value for the mode which can be never be allocate with > > >> reg class. > > >> > > >> Bootstrapped and regtested on x86_64-pc-linux-gnu{-m32,}. > > >> Ok for trunk(or GCC14 stage1)? > > >> > > >> gcc/ChangeLog: > > >> > > >> PR rtl-optimization/109351 > > >> * ira.cc (setup_class_subset_and_memory_move_costs): Check > > >> hard_regno_mode_ok before setting lowest memory move cost for > > >> the mode with different reg classes. > > > Not a regression *and* changing register allocation. This seems like > > > it should defer to gcc-14. > > > > > Yes, I am agree. It should wait for gcc-14, especially when we are close > > to the > > release. Also the testing x86-64 is not enough for such changes (although I > > tried ppc64le and did not find any problem). > > > > Cost related patches for RA frequently result in new testsuite failures on > > some targets. Even if the change seems obvious and expected to improve > > the generated code. > > > > Target dependent code sometimes defines correctly the costs only for some > > possible cases and making less dependent from this pitfall is good. So I > > think > > the patch moves us to the right direction. > > > > The patch is ok for me to commit it to the trunk after the gcc-13 release > > and if > > arm64 testing shows no GCC testsuite regression. > Bootstrapped and regtested on aarch64-unknown-linux-gnu. > Waiting for GCC14. Committed. > > > > Thank you for working on this issue. > > >
-- BR, Hongtao