On Tue, 10 May 2022, Christophe Lyon via Gcc-patches wrote:

> > Note that for conversion from DFP to HFmode, double rounding (going via
> > SFmode) probably produces incorrectly rounded results in some cases
> > (though we already have such incorrect results in the other direction for
> > DPD; see bug 97635).
> 
> Thanks for the pointer.
> I was aware of such imprecision in the code I introduce, but not in existing
> one. I don't think this is a blocker for this patch, is it?

I don't think it's a blocker.

> > Wouldn't it be better to have tests that apply for all targets supporting
> > both HFmode and BID DFP, which includes x86 / x86_64 (with SSE2 support)
> > as well, using _Float16 as the type name (and the float16 /
> > float16_runtime effective-target keywords to test for the relevant support
> > and dg-add-options float16)?
> > 
> Indeed! What would be the appropriate directory for such tests?

Maybe gcc.dg/dfp, or gcc.dg/torture if it's useful to run the tests for 
multiple choices of optimization options.

> > That seems wrong; the __fp16 name is specific to Arm / AArch64.  I'd
> > expect the typedef alone to be specific; in any case, the "mode" attribute
> > is the appropriate way to define this type.
> > 
> I'll change that to __float16 (like __float128 we have a few lines below for
> TFtype).

There's _Float16, but no such type as __float16.

-- 
Joseph S. Myers
jos...@codesourcery.com

Reply via email to