From 823bb05499a9f5bc0fc450ca21b17f16b65e6f00 Mon Sep 17 00:00:00 2001 From: Segher Boessenkool Date: Thu, 29 Oct 2015 20:24:48 +0100 Subject: [PATCH] lra: Don't remove the scratch in (mem:BLK (scratch)) LRA wants to replace SCRATCH registers with real registers. It should not do that with (mem:BLK (scratch)), which is special, not really a scratch register. 2015-10-29 Segher Boessenkool * lra-constraints.c (process_address_1): Handle (mem:BLK (scratch)) by ignoring it. From-SVN: r229551 --- gcc/ChangeLog | 5 +++++ gcc/lra-constraints.c | 5 +++++ 2 files changed, 10 insertions(+) diff --git a/gcc/ChangeLog b/gcc/ChangeLog index fa3e95651de..75ba2e83d44 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,8 @@ +2015-10-29 Segher Boessenkool + + * lra-constraints.c (process_address_1): Handle (mem:BLK (scratch)) + by ignoring it. + 2015-10-29 Richard Henderson PR target/68124 diff --git a/gcc/lra-constraints.c b/gcc/lra-constraints.c index 0f54b6c24ce..c2777e982a7 100644 --- a/gcc/lra-constraints.c +++ b/gcc/lra-constraints.c @@ -2874,6 +2874,11 @@ process_address_1 (int nop, bool check_only_p, enum constraint_num cn = lookup_constraint (constraint); bool change_p = false; + if (MEM_P (op) + && GET_MODE (op) == BLKmode + && GET_CODE (XEXP (op, 0)) == SCRATCH) + return false; + if (insn_extra_address_constraint (cn)) decompose_lea_address (&ad, curr_id->operand_loc[nop]); else if (MEM_P (op)) -- 2.30.2