diff options
author | Vladimir Makarov <vmakarov@redhat.com> | 2013-04-19 19:55:57 +0000 |
---|---|---|
committer | Vladimir Makarov <vmakarov@gcc.gnu.org> | 2013-04-19 19:55:57 +0000 |
commit | 682303da799ead98af850842873bf9a66dd3ddb0 (patch) | |
tree | 1d8f66f38c6f1b93aa8a73bc538dc3047bc1962d /gcc/lra-constraints.c | |
parent | 79d8a2724290d3c6e14f9935b62993b90776aa4e (diff) | |
download | gcc-682303da799ead98af850842873bf9a66dd3ddb0.zip gcc-682303da799ead98af850842873bf9a66dd3ddb0.tar.gz gcc-682303da799ead98af850842873bf9a66dd3ddb0.tar.bz2 |
re PR rtl-optimization/56847 ('-fpie' triggers - internal compiler error: in gen_add2_insn, at optabs.c:4705)
2013-04-19 Vladimir Makarov <vmakarov@redhat.com>
PR rtl-optimization/56847
* lra-constraints.c (process_alt_operands): Discourage alternative
with non-matche doffsettable memory constraint fro memory with
known offset.
From-SVN: r198101
Diffstat (limited to 'gcc/lra-constraints.c')
-rw-r--r-- | gcc/lra-constraints.c | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/gcc/lra-constraints.c b/gcc/lra-constraints.c index e3b4add..9e4924c 100644 --- a/gcc/lra-constraints.c +++ b/gcc/lra-constraints.c @@ -1978,8 +1978,15 @@ process_alt_operands (int only_alternative) (op, this_alternative) == NO_REGS)))) reject += LRA_MAX_REJECT; - if (! ((const_to_mem && constmemok) - || (MEM_P (op) && offmemok))) + if (MEM_P (op) && offmemok) + { + /* If we know offset and this non-offsetable memory, + something wrong with this memory and it is better + to try other memory possibilities. */ + if (MEM_OFFSET_KNOWN_P (op)) + reject += LRA_MAX_REJECT; + } + else if (! (const_to_mem && constmemok)) { /* We prefer to reload pseudos over reloading other things, since such reloads may be able to be |