aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorVladimir N. Makarov <vmakarov@redhat.com>2020-11-18 10:07:56 -0500
committerVladimir N. Makarov <vmakarov@redhat.com>2020-11-18 10:11:33 -0500
commit2f2709e691148160e4f88090eaf48d3e4915b0e4 (patch)
treeb1e745d915941a53d47cfbc001a3bbefe4884480
parentcb1a4876a0e724ca3962ec14dce9e7819fa72ea5 (diff)
downloadgcc-2f2709e691148160e4f88090eaf48d3e4915b0e4.zip
gcc-2f2709e691148160e4f88090eaf48d3e4915b0e4.tar.gz
gcc-2f2709e691148160e4f88090eaf48d3e4915b0e4.tar.bz2
[PR97870] LRA: don't remove asm goto, just nullify it.
gcc/ 2020-11-18 Vladimir Makarov <vmakarov@redhat.com> PR target/97870 * lra-constraints.c (curr_insn_transform): Do not delete asm goto with wrong constraints. Nullify it saving CFG.
-rw-r--r--gcc/lra-constraints.c15
1 files changed, 12 insertions, 3 deletions
diff --git a/gcc/lra-constraints.c b/gcc/lra-constraints.c
index f034c77..80ca1e0 100644
--- a/gcc/lra-constraints.c
+++ b/gcc/lra-constraints.c
@@ -4104,9 +4104,18 @@ curr_insn_transform (bool check_only_p)
error_for_asm (curr_insn,
"inconsistent operand constraints in an %<asm%>");
lra_asm_error_p = true;
- /* Avoid further trouble with this insn. Don't generate use
- pattern here as we could use the insn SP offset. */
- lra_set_insn_deleted (curr_insn);
+ if (! JUMP_P (curr_insn))
+ {
+ /* Avoid further trouble with this insn. Don't generate use
+ pattern here as we could use the insn SP offset. */
+ lra_set_insn_deleted (curr_insn);
+ }
+ else
+ {
+ lra_invalidate_insn_data (curr_insn);
+ ira_nullify_asm_goto (curr_insn);
+ lra_update_insn_regno_info (curr_insn);
+ }
return true;
}