On 10/11/18 1:18 PM, Peter Bergner wrote: > Ok, after working in gdb, I see that the PA-RISC port still uses reload > and not LRA, but it too seems to have the same issue of reusing input > regs that have REG_DEAD notes, so the question still stands. It's just > that whatever fix we come up with will have to be to both LRA and reload.
On second thought, I'm thinking we should just leave reload alone and only fix this in LRA. That means we'd have to disable the reg copy handling when not using LRA though, which might be another reason to get targets to move to LRA? I've verified the following patch gets the PA-RISC test case to pass again. Thoughts? If ok, I still have to dig into the fails we're seeing on LRA targets. Peter * ira-lives (non_conflicting_reg_copy_p): Disable for non LRA targets. Index: gcc/ira-lives.c =================================================================== --- gcc/ira-lives.c (revision 264897) +++ gcc/ira-lives.c (working copy) @@ -1064,6 +1064,10 @@ find_call_crossed_cheap_reg (rtx_insn *i rtx non_conflicting_reg_copy_p (rtx_insn *insn) { + /* Disallow this for non LRA targets. */ + if (!targetm.lra_p ()) + return NULL_RTX; + rtx set = single_set (insn); /* Disallow anything other than a simple register to register copy