[PATCH 2/3] rs6000: Use LR_REGNO instead of constant 65

Iain Sandoe iain@codesourcery.com
Thu Sep 1 08:50:00 GMT 2016


Hi,

> On 1 Sep 2016, at 01:49, Segher Boessenkool <segher@kernel.crashing.org> wrote:

> I left it in *restore_world because Iain will remove it there soon.

Here is the patch to fix up Darwin,
I guess it’s both Darwin-local and reasonably obvious now, but OK?
Iain

[PATCH] rs6000,Darwin: Remove uses of LR in restore_world.

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.  Many thanks to Segher for detailed pointers to the solutions.

2016-09-01  Iain Sandoe  <iain@codesourcery.com>
	Segher Boessenkool  <segher@kernel.crashing.org>

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

diff --git a/gcc/config/rs6000/altivec.md b/gcc/config/rs6000/altivec.md
index c39a0b6..3f7312e 100644
--- a/gcc/config/rs6000/altivec.md
+++ b/gcc/config/rs6000/altivec.md
@@ -407,7 +407,6 @@
 (define_insn "*restore_world"
  [(match_parallel 0 "restore_world_operation"
                   [(return)
-		   (use (reg:SI 65))
                    (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 a7d66ad..7d0a6d6 100644
--- a/gcc/config/rs6000/predicates.md
+++ b/gcc/config/rs6000/predicates.md
@@ -1332,13 +1332,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;
 
-- 
2.8.1




More information about the Gcc-patches mailing list