diff options
author | Vladimir N. Makarov <vmakarov@redhat.com> | 2025-02-26 11:28:08 -0500 |
---|---|---|
committer | Vladimir N. Makarov <vmakarov@redhat.com> | 2025-02-26 11:28:52 -0500 |
commit | 7ce3a8e872d945d537a7e7ba1bd3f45b1cf9a6d2 (patch) | |
tree | b152859dbde5be91fb744ce201bdec18c9e47231 | |
parent | [testsuite] add x86 effective target (diff) |
[PR119021][LRA]: Fix rtl correctness check failure in LRA.
Patch to fix PR115458 contained a code change in dealing with asm
errors to avoid cycling in reporting the error for asm gotos. This
code was wrong and resulted in checking RTL correctness failure. This
patch reverts the code change and solves cycling in asm error
reporting in a different way.
gcc/ChangeLog:
PR middle-end/119021
* lra.cc (lra_asm_insn_error): Use lra_invalidate_insn_data
instead of lra_update_insn_regno_info.
* lra-assigns.cc (lra_split_hard_reg_for): Restore old code.
-rw-r--r-- | gcc/lra-assigns.cc | 5 | ||||
-rw-r--r-- | gcc/lra.cc | 2 |
2 files changed, 1 insertions, 6 deletions
diff --git a/gcc/lra-assigns.cc b/gcc/lra-assigns.cc index 480925ad8943..46f9c9d20e25 100644 --- a/gcc/lra-assigns.cc +++ b/gcc/lra-assigns.cc | |||
@@ -1856,11 +1856,6 @@ lra_split_hard_reg_for (bool fail_p) | |||
1856 | { | 1856 | { |
1857 | asm_p = true; | 1857 | asm_p = true; |
1858 | lra_asm_insn_error (insn); | 1858 | lra_asm_insn_error (insn); |
1859 | if (JUMP_P (insn)) | ||
1860 | ira_nullify_asm_goto (insn); | ||
1861 | else | ||
1862 | PATTERN (insn) = gen_rtx_USE (VOIDmode, const0_rtx); | ||
1863 | lra_invalidate_insn_data (insn); | ||
1864 | } | 1859 | } |
1865 | else if (!asm_p) | 1860 | else if (!asm_p) |
1866 | { | 1861 | { |
diff --git a/gcc/lra.cc b/gcc/lra.cc index b753729d43d9..8f30284e9daa 100644 --- a/gcc/lra.cc +++ b/gcc/lra.cc | |||
@@ -549,7 +549,7 @@ lra_asm_insn_error (rtx_insn *insn) | |||
549 | if (JUMP_P (insn)) | 549 | if (JUMP_P (insn)) |
550 | { | 550 | { |
551 | ira_nullify_asm_goto (insn); | 551 | ira_nullify_asm_goto (insn); |
552 | lra_update_insn_regno_info (insn); | 552 | lra_invalidate_insn_data (insn); |
553 | } | 553 | } |
554 | else | 554 | else |
555 | { | 555 | { |