Re: [RFC] rs6000: Add builtins for fegetround, feclearexcept and feraiseexcept [PR94193]

2020-06-29 Thread Marc Glisse
On Mon, 29 Jun 2020, Richard Biener via Gcc-patches wrote: At least without -frounding-math fegetround could be constant folded to FE_TONEAREST for which we'd need the actual value of FE_TONEAREST. That will break existing code which, since -frounding-math doesn't work for that, protects all

Re: [RFC] rs6000: Add builtins for fegetround, feclearexcept and feraiseexcept [PR94193]

2020-06-29 Thread Joseph Myers
On Mon, 29 Jun 2020, Richard Biener via Gcc-patches wrote: > I'm not sure if the actual choice of macro values for the fe* builtins > need glueing logic or if we want them to be determined statically > by the target configuration - see how we handle folding of > fpclassify. At least without -frou

Re: [RFC] rs6000: Add builtins for fegetround, feclearexcept and feraiseexcept [PR94193]

2020-06-29 Thread Segher Boessenkool
On Mon, Jun 29, 2020 at 11:45:41PM +0200, Marc Glisse wrote: > On Mon, 29 Jun 2020, Segher Boessenkool wrote: > > >Another question. How do these builtins prevent other FP insns from > >being moved (or optimised) "over" them? > > At the GIMPLE level they don't. And not at RTL level, either. >

Re: [RFC] rs6000: Add builtins for fegetround, feclearexcept and feraiseexcept [PR94193]

2020-06-29 Thread Marc Glisse
On Mon, 29 Jun 2020, Segher Boessenkool wrote: Another question. How do these builtins prevent other FP insns from being moved (or optimised) "over" them? At the GIMPLE level they don't. They prevent other function calls from moving across, just because function calls where at least one is n

Re: [RFC] rs6000: Add builtins for fegetround, feclearexcept and feraiseexcept [PR94193]

2020-06-29 Thread Segher Boessenkool
Hi! On Mon, Jun 29, 2020 at 08:49:05AM +0200, Richard Biener via Gcc-patches wrote: > On Fri, Jun 26, 2020 at 10:12 PM Raoni Fassina Firmino via Gcc-patches > wrote: > > This is an early draft I'm working on to add fegetround , feclearexcept > > and feraiseexcept as builtins on rs6000. This is m

Re: [RFC] rs6000: Add builtins for fegetround, feclearexcept and feraiseexcept [PR94193]

2020-06-29 Thread Richard Biener via Gcc-patches
On Fri, Jun 26, 2020 at 10:12 PM Raoni Fassina Firmino via Gcc-patches wrote: > > Hi all, > > > This is an early draft I'm working on to add fegetround , feclearexcept > and feraiseexcept as builtins on rs6000. This is my first patch so I > welcome any and all feedback. Foremost I have some ques

[RFC] rs6000: Add builtins for fegetround, feclearexcept and feraiseexcept [PR94193]

2020-06-26 Thread Raoni Fassina Firmino via Gcc-patches
Hi all, This is an early draft I'm working on to add fegetround , feclearexcept and feraiseexcept as builtins on rs6000. This is my first patch so I welcome any and all feedback. Foremost I have some questions to ask as I got stuck on some problems. Q1) How to implement a target specific buil