lra: Ignore debug insns and notes in combine_reload_insn [PR109179]
authorPeter Bergner <bergner@linux.ibm.com>
Sat, 18 Mar 2023 00:01:45 +0000 (19:01 -0500)
committerPeter Bergner <bergner@linux.ibm.com>
Sat, 18 Mar 2023 00:02:33 +0000 (19:02 -0500)
commit44a13125a0d56dbabb9bc61de7ff8bf94fb57928
treed4aaebc09bb2dcf9f2f85b665dc05e9ed6539fee
parentac81fea349b7af8a9aa1dc47b5f9a07a0f9a73f6
lra: Ignore debug insns and notes in combine_reload_insn [PR109179]

We ICE in combine_reload_insn if we've deleted the TO insn operand during
processing, because lra_get_insn_recog_data doesn't expect to see the note
that replaces the deleted insn.  The solution here is to exit early if TO
is a debug insn or note.

2023-03-17  Peter Bergner  <bergner@linux.ibm.com>

gcc/
PR rtl-optimization/109179
* lra-constraints.cc (combine_reload_insn): Enforce TO is not a debug
insn or note.  Move the tests earlier to guard lra_get_insn_recog_data.
gcc/lra-constraints.cc