diff mbox

PR 66685: parallel returns being misclassified

Message ID 87h9ponuzs.fsf@e105548-lin.cambridge.arm.com
State New
Headers show

Commit Message

Richard Sandiford July 1, 2015, 8:27 a.m. UTC
This patch should restore bootstrap on hppa (and probably other targets
besides).  The change to use target-insns.def put more stress on the
emit()/classify_insn() group of functions, which were missing a case
for parallel returns.

Tested with a cross-compiler that it fixes the hppa problem.  Bootstrap
in progress on x86_64-linux-gnu.  OK to install?

Sorry for the slow response on this one.  I'd misread the PR and thought
that it was the bug fixed in r225000.

Thanks,
Richard


gcc/
	PR bootstrap/66685
	* rtl.c (classify_insn): Handle returns in PARALLELs.

Comments

Richard Biener July 1, 2015, 8:34 a.m. UTC | #1
On Wed, Jul 1, 2015 at 10:27 AM, Richard Sandiford
<richard.sandiford@arm.com> wrote:
> This patch should restore bootstrap on hppa (and probably other targets
> besides).  The change to use target-insns.def put more stress on the
> emit()/classify_insn() group of functions, which were missing a case
> for parallel returns.
>
> Tested with a cross-compiler that it fixes the hppa problem.  Bootstrap
> in progress on x86_64-linux-gnu.  OK to install?

Ok.

Richard.

> Sorry for the slow response on this one.  I'd misread the PR and thought
> that it was the bug fixed in r225000.
>
> Thanks,
> Richard
>
>
> gcc/
>         PR bootstrap/66685
>         * rtl.c (classify_insn): Handle returns in PARALLELs.
>
> Index: gcc/rtl.c
> ===================================================================
> --- gcc/rtl.c   2015-07-01 09:13:29.782160299 +0100
> +++ gcc/rtl.c   2015-07-01 09:13:29.778160333 +0100
> @@ -686,6 +686,8 @@ classify_insn (rtx x)
>        for (j = XVECLEN (x, 0) - 1; j >= 0; j--)
>         if (GET_CODE (XVECEXP (x, 0, j)) == CALL)
>           return CALL_INSN;
> +       else if (ANY_RETURN_P (XVECEXP (x, 0, j)))
> +         return JUMP_INSN;
>         else if (GET_CODE (XVECEXP (x, 0, j)) == SET
>                  && GET_CODE (SET_DEST (XVECEXP (x, 0, j))) == PC)
>           return JUMP_INSN;
>
diff mbox

Patch

Index: gcc/rtl.c
===================================================================
--- gcc/rtl.c	2015-07-01 09:13:29.782160299 +0100
+++ gcc/rtl.c	2015-07-01 09:13:29.778160333 +0100
@@ -686,6 +686,8 @@  classify_insn (rtx x)
       for (j = XVECLEN (x, 0) - 1; j >= 0; j--)
 	if (GET_CODE (XVECEXP (x, 0, j)) == CALL)
 	  return CALL_INSN;
+	else if (ANY_RETURN_P (XVECEXP (x, 0, j)))
+	  return JUMP_INSN;
 	else if (GET_CODE (XVECEXP (x, 0, j)) == SET
 		 && GET_CODE (SET_DEST (XVECEXP (x, 0, j))) == PC)
 	  return JUMP_INSN;