* [COMMITTED] Patch fixing PR97870
@ 2020-11-18 15:22 Vladimir Makarov
0 siblings, 0 replies; only message in thread
From: Vladimir Makarov @ 2020-11-18 15:22 UTC (permalink / raw)
To: gcc-patches
[-- Attachment #1: Type: text/plain, Size: 143 bytes --]
The following patch fixes
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=97870
The patch was successfully bootstrapped and tested on x86-64.
[-- Attachment #2: pr97870.patch --]
[-- Type: text/x-patch, Size: 1187 bytes --]
[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.
diff --git a/gcc/lra-constraints.c b/gcc/lra-constraints.c
index f034c7749e9..80ca1e06e31 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;
}
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2020-11-18 15:22 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-11-18 15:22 [COMMITTED] Patch fixing PR97870 Vladimir Makarov
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).