size optimization for x86

Richard Henderson rth@cygnus.com
Tue Feb 2 17:05:00 GMT 1999


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~


More information about the Gcc-patches mailing list