)]}'
{
  "commit": "50e2a7df756c1cd89b37ff6882e1bdb6ebe3697f",
  "tree": "d0c64627b615ca995f8889620712695599621553",
  "parents": [
    "7647c00b77ee1aefcd3dbd7aed9c1a7553d83f94"
  ],
  "author": {
    "name": "John David Anglin",
    "email": "danglin@gcc.gnu.org",
    "time": "Fri Nov 13 17:11:18 2026 -0500"
  },
  "committer": {
    "name": "John David Anglin",
    "email": "danglin@gcc.gnu.org",
    "time": "Fri Nov 13 17:11:18 2026 -0500"
  },
  "message": "hppa: Fix LRA spill failures involving R1_REGS (%r1) [PR127142]\n\nWith LRA enabled on PA-RISC, explicit (clobber (reg 1)) RTL on call\npatterns caused LRA to treat %r1 as live across call boundaries, while\npatterns restricted solely to the singleton R1_REGS class (\u003da) such as\nPIC label loads and HIGH symbolic address loads could fail to find a\nspill register when %r1 was contended.\n\nTo resolve these spill failures without regressing code quality:\n- Remove redundant %r1 clobbers from call and sibcall patterns since %r1\n  is already call-used in the ABI.\n- Merge the 32-bit and 64-bit PIC label address patterns into a single\n  Pmode pattern, fix the %r1 operand reference after addil, and add a\n  disparaged general-register (\u0027r\u0027) fallback alternative using the frame\n  marker scratch slot.\n- Add disparaged general-register (\u0027r\u0027) fallback alternatives to the\n  32-bit and 64-bit PIC HIGH patterns and split the 32-bit non-PIC HIGH\n  pattern by TARGET_LONG_LOAD_STORE with an emergency \u0027r\u0027 alternative.\n- Add post-reload define_peephole2 patterns to rewrite general-register\n  HIGH and PIC label reloads back to %r1 when %r1 is dead, eliminating\n  frame marker saves when uncontended.\n- Implement TARGET_PREFERRED_RELOAD_CLASS to prefer R1_REGS for HIGH and\n  pic_label_operand reloads, route R1_REGS spills through GENERAL_REGS\n  in pa_spill_class, and lower GENERAL_REGS/R1_REGS \u003c-\u003e FP_REGS move\n  costs to 8 in hppa_register_move_cost so LRA can use FP registers as\n  an alternate spill area under high integer register pressure.\n\n2026-11-13  John David Anglin  \u003cdanglin@gcc.gnu.org\u003e\n\ngcc/ChangeLog:\n\n\tPR target/127142\n\t* config/pa/pa.cc (pa_preferred_reload_class): New function.\n\t(TARGET_PREFERRED_RELOAD_CLASS): Define.\n\t(hppa_register_move_cost): Set cost to 2 for moves between\n\tR1_REGS and GENERAL_REGS, and 8 for moves between\n\tGENERAL_REGS/R1_REGS and FP_REGS.\n\t(pa_secondary_reload): Remove redundant sri-\u003eicode assignment.\n\t(pa_spill_class): Return GENERAL_REGS when spilling R1_REGS.\n\t* config/pa/pa.md: Merge 32-bit and 64-bit PIC label address\n\tpatterns into a single Pmode define_insn, fix %r1 operand in\n\taddil sequences, and add a disparaged \u0027r\u0027 alternative.\n\tAdd disparaged \u0027r\u0027 alternatives to 32-bit and 64-bit PIC HIGH\n\tpatterns.  Split 32-bit non-PIC HIGH pattern into\n\tTARGET_LONG_LOAD_STORE and !TARGET_LONG_LOAD_STORE patterns with\n\tdisparaged \u0027r\u0027 alternatives.  Add define_peephole2 patterns to\n\tuse %r1 for HIGH and PIC label loads when %r1 is dead.\n\t(call_symref, call_symref_pic, call_symref_pic_post_reload)\n\t(call_symref_64bit, call_symref_64bit_post_reload, call_reg)\n\t(call_reg_pic, call_reg_pic_post_reload, call_value_symref)\n\t(call_value_symref_pic, call_value_symref_pic_post_reload)\n\t(call_value_symref_64bit, call_value_symref_64bit_post_reload)\n\t(call_value_reg, call_value_reg_pic, call_value_reg_pic_post_reload)\n\t(sibcall_internal_symref, sibcall_internal_symref_64bit)\n\t(sibcall_value_internal_symref, sibcall_value_internal_symref_64bit):\n\tRemove (clobber (reg 1)) and update corresponding define_splits.\n",
  "tree_diff": [
    {
      "type": "modify",
      "old_id": "1bf30c86ee29e0fd7e23c1d66deee1377d9cd750",
      "old_mode": 33188,
      "old_path": "gcc/config/pa/pa.cc",
      "new_id": "f5a7bb7f8e267831341cc06593b5a1cab312cb74",
      "new_mode": 33188,
      "new_path": "gcc/config/pa/pa.cc"
    },
    {
      "type": "modify",
      "old_id": "a94b2eaf8ea45cc51cce906452f3fb5ec4a8db73",
      "old_mode": 33188,
      "old_path": "gcc/config/pa/pa.md",
      "new_id": "727c6b878d7a44e5c2a025c9b435e4e99cd1590a",
      "new_mode": 33188,
      "new_path": "gcc/config/pa/pa.md"
    }
  ]
}
