https://gcc.gnu.org/bugzilla/show_bug.cgi?id=79571

--- Comment #15 from Vladimir Makarov <vmakarov at gcc dot gnu.org> ---
My approach is to fix it in LRA by using a reload pass behaviour.

We have 

(define_insn "*movti_internal"
  [(set (match_operand:TI 0 "nonimmediate_operand" "=!r ,o ,v,v ,v ,m")
        (match_operand:TI 1 "general_operand"      "riFo,re,C,BC,vm,v"))]

LRA rejects the 1st alternative as very costly ('!') when the memory ('o') is
not offsetable.  Reload pass just reload the memory address in this case and
does not count the first alternative as costly.  I believe LRA should take '!'
into account when the whole memory operand (or other operand) is reloaded (not
its address).

Reply via email to