On Fri, Apr 3, 2015 at 3:07 PM, Michael Meissner <meiss...@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