On Fri, Dec 11, 2020 at 05:38:30PM +0800, Xionghu Luo wrote:
> On 2020/12/11 15:47, Richard Biener wrote:
> >> Note that the add/sub sequence is different for (3) and (4) since
> >> -funsafe-math-optimizations is implicitly true. "fp-contract=fast" in
> >> (1) and (2) could avoid Inf as fmads
On Fri, Dec 11, 2020 at 03:54:44PM +0800, Xionghu Luo wrote:
> +cc.
>
>
> On 2020/12/11 14:25, Xionghu Luo via Gcc wrote:
> >Thanks,
> >
> >On 2020/12/10 17:12, Richard Biener wrote:
> >>>2) From PR90070:
> >>>
> >>>double temp1 = (double)r->red;
> >>>double temp2 =
On Fri, Dec 11, 2020 at 10:44 AM Xionghu Luo wrote:
>
>
> On 2020/12/11 15:47, Richard Biener wrote:
> >> Note that the add/sub sequence is different for (3) and (4) since
> >> -funsafe-math-optimizations is implicitly true. "fp-contract=fast" in
> >> (1) and (2) could avoid Inf as fmads could
On 2020/12/11 15:47, Richard Biener wrote:
>> Note that the add/sub sequence is different for (3) and (4) since
>> -funsafe-math-optimizations is implicitly true. "fp-contract=fast" in
>> (1) and (2) could avoid Inf as fmads could handle float overflow (verified
>> it on Power, not sure other
On 2020/12/11 15:47, Richard Biener wrote:
>> Note that the add/sub sequence is different for (3) and (4) since
>> -funsafe-math-optimizations is implicitly true. "fp-contract=fast" in
>> (1) and (2) could avoid Inf as fmads could handle float overflow (verified
>> it on Power, not sure other
+cc.
On 2020/12/11 14:25, Xionghu Luo via Gcc wrote:
Thanks,
On 2020/12/10 17:12, Richard Biener wrote:
2) From PR90070:
double temp1 = (double)r->red;
double temp2 = (double)aggregate.red;
double temp3 = temp2 + (temp1 * 5.0);
temp1 * 5 could be not representable in float but
On Fri, Dec 11, 2020 at 7:26 AM Xionghu Luo wrote:
>
> Thanks,
>
> On 2020/12/10 17:12, Richard Biener wrote:
> >> 2) From PR90070:
> >>
> >>double temp1 = (double)r->red;
> >>double temp2 = (double)aggregate.red;
> >>double temp3 = temp2 + (temp1 * 5.0);
> > temp1 * 5 could be not
Thanks,
On 2020/12/10 17:12, Richard Biener wrote:
>> 2) From PR90070:
>>
>>double temp1 = (double)r->red;
>>double temp2 = (double)aggregate.red;
>>double temp3 = temp2 + (temp1 * 5.0);
> temp1 * 5 could be not representable in float but the
> result of the add could so the transform
On Thu, 10 Dec 2020, Xionghu Luo via Gcc wrote:
I have a maybe silly question about whether there is any *standard*
or *options* (like -ffast-math) for GCC that allow double to float
demotion optimization? For example,
1) from PR22326:
#include
float foo(float f, float x, float y) {
return
On Thu, Dec 10, 2020 at 9:47 AM Xionghu Luo via Gcc wrote:
>
> Hi,
>
> I have a maybe silly question about whether there is any *standard*
> or *options* (like -ffast-math) for GCC that allow double to float
> demotion optimization? For example,
The only option we have to this effect would be
Hi,
I have a maybe silly question about whether there is any *standard*
or *options* (like -ffast-math) for GCC that allow double to float
demotion optimization? For example,
1) from PR22326:
#include
float foo(float f, float x, float y) {
return (fabs(f)*x+y);
}
The fabs will return
11 matches
Mail list logo