This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

patch to fix PR 56847


 The following patch fixes

          http://gcc.gnu.org/bugzilla/show_bug.cgi?id=56847

Reload pass is lucky choosing alternative without offsettable memory in movti_internal pattern as this alternative for some reason has reject value less by one than alternative with offsettable memory. LRA chooses offsettable memory alternative as it looks cheaper and don't need secondary reload in alternative chosen by reload pass (and reload pass completely ignores this fact). LRA choice results in failure to generate insns for reloading address to make it offsettable.

  After several tries, I think I found a good solution for the problem.

The patch was successfully bootstrapped on x86 and x86-64 (with and without -fpie). I tried 500K lines of test code and did not find any difference in generated code using different options including -fpie. So the patch will not affect huge majority of the code.

  Committed as rev. 198101.

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.

2013-04-19  Vladimir Makarov  <vmakarov@redhat.com>

        PR rtl-optimization/56847
        * gcc.dg/pr56847.c: New test.

Attachment: pr56847.patch
Description: Text document


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]