diff mbox

[Darwin,PPC] Remove use of LR in restore_world.

Message ID 113F4011-14E9-4B23-89DA-2FC4B2DBBEF8@codesourcery.com
State New
Headers show

Commit Message

Iain Sandoe Dec. 11, 2016, 8 p.m. UTC
Hi Folks,

another from my darwin-ppc stack...

 r239866 removed most of the uses of LR in returns and sibcalls

Darwin had an additional use of LR in the restore_world machinery.  This patch removes it
from the pattern in altivec.md and the relevant predicate.

OK / Comments?

Iain

gcc/

2016-12-11  Iain Sandoe  <iain@codesourcery.com>

	* config/rs6000/altivec.md (*restore_world): Remove LR use.
	* config/rs6000/predicates.md (restore_world_operation): Adjust op
	count, remove one USE.
---
 gcc/config/rs6000/altivec.md    | 1 -
 gcc/config/rs6000/predicates.md | 3 +--
 2 files changed, 1 insertion(+), 3 deletions(-)

Comments

Segher Boessenkool Dec. 12, 2016, 12:09 p.m. UTC | #1
Hi Iain,

On Sun, Dec 11, 2016 at 08:00:02PM +0000, Iain Sandoe wrote:
>  r239866 removed most of the uses of LR in returns and sibcalls
> 
> Darwin had an additional use of LR in the restore_world machinery.  This patch removes it
> from the pattern in altivec.md and the relevant predicate.
> 
> OK / Comments?

Okay for trunk.  Sorry I missed this one.  It is a big splatter of ICEs
without the patch, I guess?


Segher
diff mbox

Patch

diff --git a/gcc/config/rs6000/altivec.md b/gcc/config/rs6000/altivec.md
index 802aa74..0646f4c 100644
--- a/gcc/config/rs6000/altivec.md
+++ b/gcc/config/rs6000/altivec.md
@@ -406,7 +406,6 @@ 
 (define_insn "*restore_world"
  [(match_parallel 0 "restore_world_operation"
                   [(return)
-		   (use (reg:SI LR_REGNO))
                    (use (match_operand:SI 1 "call_operand" "s"))
                    (clobber (match_operand:SI 2 "gpc_reg_operand" "=r"))])]
  "TARGET_MACHO && (DEFAULT_ABI == ABI_DARWIN) && TARGET_32BIT"
diff --git a/gcc/config/rs6000/predicates.md b/gcc/config/rs6000/predicates.md
index 57a463b..0716c46 100644
--- a/gcc/config/rs6000/predicates.md
+++ b/gcc/config/rs6000/predicates.md
@@ -1338,13 +1338,12 @@ 
   rtx elt;
   int count = XVECLEN (op, 0);
 
-  if (count != 59)
+  if (count != 58)
     return 0;
 
   index = 0;
   if (GET_CODE (XVECEXP (op, 0, index++)) != RETURN
       || GET_CODE (XVECEXP (op, 0, index++)) != USE
-      || GET_CODE (XVECEXP (op, 0, index++)) != USE
       || GET_CODE (XVECEXP (op, 0, index++)) != CLOBBER)
     return 0;