This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: size optimization for x86
- To: law at cygnus dot com, egcs-patches at cygnus dot com
- Subject: Re: size optimization for x86
- From: Richard Henderson <rth at cygnus dot com>
- Date: Tue, 2 Feb 1999 17:04:38 -0800
- References: <7380.917977303@hurl.cygnus.com>
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~