https://gcc.gnu.org/bugzilla/show_bug.cgi?id=70751
Vladimir Makarov <vmakarov at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |vmakarov at gcc dot gnu.org --- Comment #3 from Vladimir Makarov <vmakarov at gcc dot gnu.org> --- (In reply to Jiong Wang from comment #2) > Vlad, > > Do you have any comments on this regression? > > *arm_movsi_insn has the following operand constraints: > > operand 0: "=rk,r,r,r,rk,m" > operand 1: "rk, I,K,j,mi,rk" > > As r235184 won't explicitly refuse an unmatch CT_MEMORY operand, > alternative (alt) 4 got a chance to compete with alt 0, and eventually be > the winner as it's with rld_nregs=0 while alt 0 is with rld_nregs=1. > > I am thinking it's OK to give alt 4 a chance here, but we should calculate > the cost correctly > > For alt 4, it should be treated as a "Spill pseudo into memory" then there > will be reject+=3, but unfortunately the check for spill to memory is: > Sorry, I missed the PR. Yes, I think you are right. Probably the condition should be if (no_regs_p && ! (REG_P (op) && hard_regno[nop] < 0)) or just if (no_regs_p) as the control never reaches this point for a spilled pseudo. Of course, the print info should be changed inside the if-stmt as it is not only pseudo anymore. It would be nice if you prepare the patch. But we should be ready for new PRs as the code change might affect other targets (unfortunately, it is a very sensitive code). Thank you for the analysis. It saved a lot of my time. > if (no_regs_p && REG_P (op) && hard_regno[nop] >= 0) > > While the op for this case is not REG_P after equiv substitution. > > (plus:SI (reg/f:SI 102 sfp) > (const_int 4 [0x4])) > > >