aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorVladimir N. Makarov <vmakarov@redhat.com>2021-01-18 16:41:39 -0500
committerVladimir N. Makarov <vmakarov@redhat.com>2021-01-18 16:47:15 -0500
commita89c5d3539c36f160ca5b997324ebcd3d601d56e (patch)
treed737c54193b47dcfbb12f08af22f6519b136ead0
parent32b6e917ac4c6e6db1f84b02afd070055b70d1dc (diff)
downloadgcc-a89c5d3539c36f160ca5b997324ebcd3d601d56e.zip
gcc-a89c5d3539c36f160ca5b997324ebcd3d601d56e.tar.gz
gcc-a89c5d3539c36f160ca5b997324ebcd3d601d56e.tar.bz2
[PR97847] IRA: Skip abnormal critical edge splitting
PPC64 can generate jumps with clobbered pseudo-regs and a BB with such jump can have abnormal output edges. IRA hits an assert when trying to split abnormal critical edge to deal with asm goto output reloads later. The patch just skips splitting abnormal edges. It is assumed that asm-goto with output reloads can not be in BB with output abnormal edges. gcc/ChangeLog: PR target/97847 * ira.c (ira): Skip abnormal critical edge splitting.
-rw-r--r--gcc/ira.c12
1 files changed, 11 insertions, 1 deletions
diff --git a/gcc/ira.c b/gcc/ira.c
index 725b0ff..f0bdbc8 100644
--- a/gcc/ira.c
+++ b/gcc/ira.c
@@ -5433,12 +5433,22 @@ ira (FILE *f)
for (int i = 0; i < recog_data.n_operands; i++)
if (recog_data.operand_type[i] != OP_IN)
{
+ bool skip_p = false;
+ FOR_EACH_EDGE (e, ei, bb->succs)
+ if (EDGE_CRITICAL_P (e)
+ && e->dest != EXIT_BLOCK_PTR_FOR_FN (cfun)
+ && (e->flags & EDGE_ABNORMAL))
+ {
+ skip_p = true;
+ break;
+ }
+ if (skip_p)
+ break;
output_jump_reload_p = true;
FOR_EACH_EDGE (e, ei, bb->succs)
if (EDGE_CRITICAL_P (e)
&& e->dest != EXIT_BLOCK_PTR_FOR_FN (cfun))
{
- ira_assert (!(e->flags & EDGE_ABNORMAL));
start_sequence ();
/* We need to put some no-op insn here. We can
not put a note as commit_edges insertion will