This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCH], PR target/65614, Prefer to use LFD on powerpc for constants
- From: David Edelsohn <dje dot gcc at gmail dot com>
- To: Michael Meissner <meissner at linux dot vnet dot ibm dot com>, GCC Patches <gcc-patches at gcc dot gnu dot org>
- Date: Fri, 3 Apr 2015 15:21:22 -0400
- Subject: Re: [PATCH], PR target/65614, Prefer to use LFD on powerpc for constants
- Authentication-results: sourceware.org; auth=none
- References: <20150403190739 dot GA24779 at ibm-tiger dot the-meissners dot org>
On Fri, Apr 3, 2015 at 3:07 PM, Michael Meissner
<meissner@linux.vnet.ibm.com> wrote:
> In my fix for PR target/65240, I removed the special -ffast-math code that
> delayed dealing with constants until reload time. In this patch, constants are
> now pushed to memory earlier, and the compiler uses LFS (load floating point
> single) to load double precision constants. When you use the LRA register
> allocator (-mlra), it uses the Altivec registers for scalar data more
> frequently, and there appears to be interactions between values loaded up as
> single constants that are moved to the Altivec registers via XXLOR.
>
> This patch makes (float_extend (mem)) slightly more costly than just (mem) and
> the code in expr.c will not compress the constant. In addition, for scalar
> single precision moves it uses copy sign instead of or to move the data. The
> copy sign instruction deals with single precision values that would create
> denormals. While working in the code, I also noticed that truncdfsf2 did not
> have support for ISA 2.07, so I added support for it.
>
> I have done bootstraps and make check with no regressions (after fixing the two
> tests that were checking that LFS was used). I have also built and run the
> Spec 2006 benchmark bwaves with the patch, and it now runs when compiled with
> -mlra and upper register support. Is the patch ok to commit to trunk?
The FLOAT_EXTEND cost should be based on the processor tuning, not the ISA.
- David