This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug rtl-optimization/59880] ix86_avoid_lea_for_addr is buggy
- From: "ubizjak at gmail dot com" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Sun, 19 Jan 2014 18:25:28 +0000
- Subject: [Bug rtl-optimization/59880] ix86_avoid_lea_for_addr is buggy
- Auto-submitted: auto-generated
- References: <bug-59880-4 at http dot gcc dot gnu dot org/bugzilla/>
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;