On Tue, Jun 02, 2020 at 12:52:31PM +0200, Richard Biener wrote:
> On Tue, Jun 2, 2020 at 11:43 AM Xionghu Luo via Gcc-patches
> <gcc-patches@gcc.gnu.org> wrote:
> > Double array in structure as function arguments or return value is accessed
> > by BLKmode, they are stored to stack and load from stack with redundant
> > conversion from DF->DI->DF.  This patch checks the homogeneous type and
> > use the actual element type to do block move to by pass the conversions.
> 
> Is it correct to do this when the actual data in the place is DImode?
> We generally
> avoid using any floating point modes here because the DImode data could
> for example correspond to a signalling NaN or a non-canonical NaN.

On PowerPC, load and store insns do not ever trap for FP reasons.  Also,
all possible IEEE binary FP bit patterns have a defined meaning, and on
PowerPC a NaN is never converted to a default NaN.  You can load a DP
(or SP or QP) float and store it again, and get the same bit pattern out
always, and no traps.

It isn't necessarily very fast on all cores though, subnormals can be
very slow on some cores, as the prime (maybe only?) example -- but even
those are not a problem on any existing core AFAIR, not for DP at least.

Things are different if more is done then just moving the data, there
are issues with using SP data in DP insns for example (and OTOH, on
older cores using DP data in SP insns isn't actually supported).

Maybe I am missing something...  I'll look at the patch in detail ;-)


Segher

Reply via email to