Re: [PATCH] -fftz-math: assume that denorms _must_ be flushed to zero optimizations

2017-08-22 Thread Richard Biener
On Tue, Aug 22, 2017 at 3:28 PM, Pekka Jääskeläinen wrote: > Hi Richard and Joseph, > > Replies for both inline: > > I wrote: >>> Both the inputs and outputs must be flushed to zero in the HSAIL’s >>> ‘ftz’ semantics. >>> FTZ operations were previously always “explicit” in the

Re: [PATCH] -fftz-math: assume that denorms _must_ be flushed to zero optimizations

2017-08-22 Thread Pekka Jääskeläinen
Hi Richard and Joseph, Replies for both inline: I wrote: >> Both the inputs and outputs must be flushed to zero in the HSAIL’s >> ‘ftz’ semantics. >> FTZ operations were previously always “explicit” in the BRIG FE output, like >> you >> propose here; there were builtin calls injected for all

Re: [PATCH] -fftz-math: assume that denorms _must_ be flushed to zero optimizations

2017-08-14 Thread Joseph Myers
On Mon, 14 Aug 2017, Pekka Jääskeläinen wrote: > Both the inputs and outputs must be flushed to zero in the HSAIL’s > ‘ftz’ semantics. Presumably this means that constant folding needs to know about those semantics, both for operations with a subnormal floating-point argument (whether or not

Re: [PATCH] -fftz-math: assume that denorms _must_ be flushed to zero optimizations

2017-08-14 Thread Richard Biener
On Mon, Aug 14, 2017 at 12:45 PM, Pekka Jääskeläinen wrote: > Hi Richard, > > The base idea of the patch is to optimize for the (common) situation > where FTZ/DAZ > is controlled by a CPU-wide flag and we then need to only avoid compile-time > optimizations that assume

Re: [PATCH] -fftz-math: assume that denorms _must_ be flushed to zero optimizations

2017-08-14 Thread Pekka Jääskeläinen
Hi Richard, The base idea of the patch is to optimize for the (common) situation where FTZ/DAZ is controlled by a CPU-wide flag and we then need to only avoid compile-time optimizations that assume semantics where denorm handling is on to support the ‘forced FTZ/DAZ semantics’. > This suggests

Re: [PATCH] -fftz-math: assume that denorms _must_ be flushed to zero optimizations

2017-08-14 Thread Richard Biener
On Thu, Aug 10, 2017 at 6:39 PM, Pekka Jääskeläinen wrote: > Hi, > > The attached patch adds a new switch -fftz-math which makes certain > optimizations > assume that "flush to zero" behavior of denormal inputs and outputs is > not an optimization > hint, but required behavior

[PATCH] -fftz-math: assume that denorms _must_ be flushed to zero optimizations

2017-08-10 Thread Pekka Jääskeläinen
Hi, The attached patch adds a new switch -fftz-math which makes certain optimizations assume that "flush to zero" behavior of denormal inputs and outputs is not an optimization hint, but required behavior for semantical correctness. The need for this was initiated by HSAIL (BRIG). With HSAIL,