[Bug target/81572] [7/8 Regression] gcc-7 regression: unnecessary vector regmove on compare

bergner at gcc dot gnu.org gcc-bugzilla@gcc.gnu.org
Sat Aug 19 08:20:00 GMT 2017


https://gcc.gnu.org/bugzilla/show_bug.cgi?id=81572

Peter Bergner <bergner at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |NEW
   Last reconfirmed|                            |2017-08-18
                 CC|                            |bergner at gcc dot gnu.org
     Ever confirmed|0                           |1

--- Comment #1 from Peter Bergner <bergner at gcc dot gnu.org> ---
Confirmed.

GCC 6, GCC 7 and trunk all generate the same RTL going into IRA.  This includes
a register copy of the incoming formal arg reg r79 into a pseudo reg.  IRA also
assigns the same hard registers to the same pseudos for all three gcc versions,
which also includes the destination of the above copy insn getting assigned r79
making the copy a nop.

The difference is that starting with GCC 7, LRA decides that the assigning the
destination of the copy insn to r79 is "risky":

    Spill r129 after risky transformations
  Reassigning non-reload pseudos
           Assign 77 to r129 (freq=3000)

so it ends up re-assigning it to r77.  This now means the copy insn is no
longer a nop and cannot be deleted.  Looking at the debugger, I see that at
some point, r79 gets added to:

  lra_reg_info[129].conflict_hard_regs

...which forces us to reassign pseudo 129.  I'm tracking down where r79 is
added to pseudo's conflist_hard_regs.


More information about the Gcc-bugs mailing list