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]
Other format: [Raw text]

Re: [PATCH, i386]: Fix PR target/26915: -1 should be loaded as fld1;fchs


Hi Uros,

On Sat, 4 Nov 2006, Uros Bizjak wrote:
> 2006-11-04  Uros Bizjak  <ubizjak@gmail.com>
>
>         PR target/26915
>         * config/i386/i386.c (standard_80387_constant_p): When optimizing
>         for size, treat -1 as a valid 80387 constant.
>         (standard_80387_constant_opcode): Return "#" for constant -1.
>         * config/i386/i386.md (unnamed splitter): When optimizing for size,
>         split load of constant -1 into load of 1 and negation sequence.
>
>         * gcc.target/i386/387-12.c: New test.

Cool.  PR26915 was one of the PRs on my list.  This is Ok for mainline.

Two minor things though.  The first is that I believe that a near
identical fix should also allow us to handle -0.0 (not very common
but should keep the IEEE conscious people happy).  I'll pre-approve
either a follow-up or a revised version of your patch with that
change.  Secondly, have you done any benchmarking with this change
enabled for !optimize_size?  Although it's clearly a size win, there's
also the possibility that avoiding the memory traffic, and reducing
code size may be faster on some cores.  If the numbers are in the noise,
we should leave the optimize_size tests in, but we should at least
check.  Perhaps H.J., Evandro or Honza might know the answer?

Thanks for taking care of this.

Roger
--


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