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]

Re: size optimization for x86


On Tue, Feb 02, 1999 at 10:41:43AM -0700, Jeffrey A Law wrote:
> Basically when optimizing for size on the x86, using lea to implement
> shifts loses.

Yep.  I'd make one other change as well --

> ! (define_insn ""
>     [(set (match_operand:SI 0 "nonimmediate_operand" "=r,rm")
>   	(ashift:SI (match_operand:SI 1 "nonimmediate_operand" "r,0")
>   		   (match_operand:SI 2 "nonmemory_operand" "M,cI")))]
> !   "! optimize_size"

Swap these alternatives so that we prefer sal when src & dest do match.


r~


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