On 25/09/12 14:45, Ian Bolton wrote:
Hi all,

This patch corrects what seemed to be a typo in expand_mov_immediate
in aarch64.c, where we had || instead of an&&  in our original code.

if (offset != const0_rtx
       &&  (targetm.cannot_force_const_mem (mode, imm)
          || (can_create_pseudo_p ())))  //<----- should have been&&

At any given time, this code would have treated all input the same
and will have caused all non-zero offsets to have been forced to
temporaries, and made us never run the code in the remainder of the
function.

In terms of measurable impact, this patch provides a better fix to the
problem I was trying to solve with this patch:

http://gcc.gnu.org/ml/gcc-patches/2012-08/msg02072.html

Almost all credit should go to Richard Henderson for this patch.
It is all his, but for a minor change I made to some predicates which
now become relevant when we execute more of the expand_mov_immediate
function.

My testing showed no regressions for bare-metal or linux.

OK for aarch64-branch and aarch64-4.7-branch?

Cheers,
Ian


2012-09-25  Richard Henderson<r...@redhat.com>
             Ian Bolton<ian.bol...@arm.com>

        * config/aarch64/aarch64.c (aarch64_expand_mov_immediate): Fix a
        functional typo and refactor code in switch statement.
        * config/aarch64/aarch64.md (add_losym): Handle symbol + offset.
        * config/aarch64/predicates.md (aarch64_tls_ie_symref): Match const.
        (aarch64_tls_le_symref): Likewise.

OK for aarch64-branch and backport to aarch64-4.7-branch.
/Marcus

Reply via email to