summaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorsegher <segher@138bc75d-0d04-0410-961f-82ee72b054a4>2015-10-29 19:24:48 +0000
committersegher <segher@138bc75d-0d04-0410-961f-82ee72b054a4>2015-10-29 19:24:48 +0000
commit556c2dd1a3c70cc3d285539b84eea31143005a91 (patch)
treefbc4bbbd9b64d127f2a42db6ce1e8d6038f2e6d1 /gcc
parent88778476b39d1f17164d815031ff594d88dbf44e (diff)
downloadgcc-556c2dd1a3c70cc3d285539b84eea31143005a91.tar.gz
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 <segher@kernel.crashing.org> * lra-constraints.c (process_address_1): Handle (mem:BLK (scratch)) by ignoring it. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@229551 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc')
-rw-r--r--gcc/ChangeLog5
-rw-r--r--gcc/lra-constraints.c5
2 files changed, 10 insertions, 0 deletions
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 <segher@kernel.crashing.org>
+
+ * lra-constraints.c (process_address_1): Handle (mem:BLK (scratch))
+ by ignoring it.
+
2015-10-29 Richard Henderson <rth@redhat.com>
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))