This is the mail archive of the gcc-bugs@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]

[Bug rtl-optimization/59880] ix86_avoid_lea_for_addr is buggy


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

--- Comment #4 from UroÅ Bizjak <ubizjak at gmail dot com> ---
(In reply to Jakub Jelinek from comment #2)
> Ah, indeed, it is split because of the:
> (define_insn_and_split "*lea<mode>"
>   [(set (match_operand:SWI48 0 "register_operand" "=r")
>         (match_operand:SWI48 1 "address_no_seg_operand" "Ts"))]
> splitter.  I'd say it is a bug in ix86_avoid_lea_for_addr, that shouldn't
> have returned true in this case, where the second operand is (zero_extend:DI
> (reg:SI)).

It shouldn't split this RTX, ix86_avoid_lea_for_addr has:

  /* There should be at least two components in the address.  */
  if ((parts.base != NULL_RTX) + (parts.index != NULL_RTX)
      + (parts.disp != NULL_RTX) + (parts.scale > 1) < 2)
    return false;

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