diff options
author | Segher Boessenkool <segher@kernel.crashing.org> | 2015-10-29 20:24:48 +0100 |
---|---|---|
committer | Segher Boessenkool <segher@gcc.gnu.org> | 2015-10-29 20:24:48 +0100 |
commit | 823bb05499a9f5bc0fc450ca21b17f16b65e6f00 (patch) | |
tree | fbc4bbbd9b64d127f2a42db6ce1e8d6038f2e6d1 | |
parent | 0bb7645daa5ad298b195f8a79410620cdd99eacc (diff) | |
download | gcc-823bb05499a9f5bc0fc450ca21b17f16b65e6f00.zip gcc-823bb05499a9f5bc0fc450ca21b17f16b65e6f00.tar.gz gcc-823bb05499a9f5bc0fc450ca21b17f16b65e6f00.tar.bz2 |
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.
From-SVN: r229551
-rw-r--r-- | gcc/ChangeLog | 5 | ||||
-rw-r--r-- | gcc/lra-constraints.c | 5 |
2 files changed, 10 insertions, 0 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog index fa3e956..75ba2e8 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 0f54b6c..c2777e9 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)) |