Re: unfused fma question

2015-02-24 Thread Richard Biener
On Tue, Feb 24, 2015 at 2:56 PM, Andrew Haley wrote: > On 02/24/2015 12:14 PM, Richard Biener wrote: >> These concerns are correct. Btw, as an answer to Steve - within >> -funsafe-math-optimizations FMA_EXPR basically can be either >> fused or not fused (but yes, bad as to Josephs concern). >> So

Re: unfused fma question

2015-02-24 Thread Andrew Haley
On 02/24/2015 12:14 PM, Richard Biener wrote: > These concerns are correct. Btw, as an answer to Steve - within > -funsafe-math-optimizations FMA_EXPR basically can be either > fused or not fused (but yes, bad as to Josephs concern). > So you could guard the pattern by flag_unsafe_math_optimizatio

Re: unfused fma question

2015-02-24 Thread Richard Biener
On Mon, Feb 23, 2015 at 7:59 PM, Marc Glisse wrote: > On Mon, 23 Feb 2015, Jeff Law wrote: > >> On 02/23/15 11:38, Joseph Myers wrote: >>> >>> >>> (I wonder if convert_mult_to_fma is something that should move to >>> match-and-simplify infrastructure.) >> >> Yea, it probably should. > > > Currentl

Re: unfused fma question

2015-02-23 Thread Marc Glisse
On Mon, 23 Feb 2015, Jeff Law wrote: On 02/23/15 11:38, Joseph Myers wrote: (I wonder if convert_mult_to_fma is something that should move to match-and-simplify infrastructure.) Yea, it probably should. Currently, it happens in a pass that is quite late. If it moves to match-and-simplify,

Re: unfused fma question

2015-02-23 Thread Jeff Law
On 02/23/15 11:38, Joseph Myers wrote: (I wonder if convert_mult_to_fma is something that should move to match-and-simplify infrastructure.) Yea, it probably should. Jeff

Re: unfused fma question

2015-02-23 Thread Joseph Myers
On Fri, 20 Feb 2015, Steve Ellcey wrote: > Or one could change convert_mult_to_fma to add a check if fma is fused > vs. non-fused in addition to the check for the flag_fp_contract_mode in > order to decide whether to convert expressions into an fma and then > define fma instructions in the md fil

Re: unfused fma question

2015-02-23 Thread Jeff Law
On 02/23/15 10:42, Steve Ellcey wrote: No, I am thinking about the case where there are only non-fused multiply add instructions available. To make sure I am using the right terminology, I am using a non-fused multiply-add to mean a single fma instruction that does '(a + (b * c))' but which roun

RE: unfused fma question

2015-02-23 Thread Steve Ellcey
On Sun, 2015-02-22 at 10:30 -0800, Matthew Fortune wrote: > Steve Ellcey writes: > > Or one could change convert_mult_to_fma to add a check if fma is fused > > vs. non-fused in addition to the check for the flag_fp_contract_mode > > in order to decide whether to convert expressions into an fma and

Re: unfused fma question

2015-02-22 Thread Jeff Law
On 02/20/15 17:56, Steve Ellcey wrote: I have a question about *unfused* fma instructions. MIPS has processors with both fused and unfused multiple and add instructions and for fused madd's it is clear what to do; define 'fma' instructions in the md file and let convert_mult_to_fma decide wheth

RE: unfused fma question

2015-02-22 Thread Matthew Fortune
Steve Ellcey writes: > Or one could change convert_mult_to_fma to add a check if fma is fused > vs. non-fused in addition to the check for the flag_fp_contract_mode > in order to decide whether to convert expressions into an fma and then > define fma instructions in the md file. I was about to sa