Re: How to avoid some built-in expansions in gcc?

2024-06-05 Thread Richard Biener via Gcc
> Am 05.06.2024 um 16:08 schrieb Michael Matz : > > Hey, > >> On Wed, 5 Jun 2024, David Brown wrote: >> >> The ideal here would be to have some way to tell gcc that a given >> function has the semantics of a different function. For example, a >> programmer might have several

Re: How to avoid some built-in expansions in gcc?

2024-06-05 Thread Michael Matz via Gcc
Hey, On Wed, 5 Jun 2024, David Brown wrote: > The ideal here would be to have some way to tell gcc that a given > function has the semantics of a different function. For example, a > programmer might have several implementations of "memcpy" that are > optimised for different purposes based

Re: How to avoid some built-in expansions in gcc?

2024-06-05 Thread Michael Matz via Gcc
Hello, On Tue, 4 Jun 2024, Jakub Jelinek wrote: > On Tue, Jun 04, 2024 at 07:43:40PM +0200, Michael Matz via Gcc wrote: > > (Well, and without reverse-recognition of isfinite-like idioms in the > > sources. That's orthogonal as well.) > > Why? If isfinite is better done by a libcall, why

Re: How to avoid some built-in expansions in gcc?

2024-06-05 Thread David Brown via Gcc
On 04/06/2024 19:43, Michael Matz via Gcc wrote: Hello, On Tue, 4 Jun 2024, Richard Biener wrote: A pragmatic solution might be a new target hook, indicating a specified builtin is not to be folded into an open-coded form. Well, that's what the mechanism behind -fno-builtin-foobar is

Re: How to avoid some built-in expansions in gcc?

2024-06-04 Thread Jakub Jelinek via Gcc
On Tue, Jun 04, 2024 at 07:43:40PM +0200, Michael Matz via Gcc wrote: > (Well, and without reverse-recognition of isfinite-like idioms in the > sources. That's orthogonal as well.) Why? If isfinite is better done by a libcall, why isn't isfinite-like idiom also better done as a libcall?

Re: How to avoid some built-in expansions in gcc?

2024-06-04 Thread Richard Biener via Gcc
> Am 04.06.2024 um 16:56 schrieb Michael Matz : > > Hello, > > On Sat, 1 Jun 2024, Richard Biener via Gcc wrote: > > You have a pointer how to define a target optab? I looked into optabs > code but found no appropriate hook. For isinf is seems is is > enough to provide a

Re: How to avoid some built-in expansions in gcc?

2024-06-04 Thread Michael Matz via Gcc
Hello, On Sat, 1 Jun 2024, Richard Biener via Gcc wrote: > >>> You have a pointer how to define a target optab? I looked into optabs > >>> code but found no appropriate hook. For isinf is seems is is > >>> enough to provide a failing expander, but other functions like isnan > >>> don't have

Re: How to avoid some built-in expansions in gcc?

2024-06-01 Thread Richard Biener via Gcc
> Am 01.06.2024 um 17:41 schrieb Georg-Johann Lay : > >  > > Am 31.05.24 um 22:12 schrieb Richard Biener: Am 31.05.2024 um 20:56 schrieb Georg-Johann Lay : >>> >>>  >>> >>> Am 31.05.24 um 19:32 schrieb Richard Biener: >> Am 31.05.2024 um 17:25 schrieb Paul Koning via Gcc : >

Re: How to avoid some built-in expansions in gcc?

2024-06-01 Thread Georg-Johann Lay
Am 31.05.24 um 22:12 schrieb Richard Biener: Am 31.05.2024 um 20:56 schrieb Georg-Johann Lay :  Am 31.05.24 um 19:32 schrieb Richard Biener: Am 31.05.2024 um 17:25 schrieb Paul Koning via Gcc :  On May 31, 2024, at 11:06 AM, Georg-Johann Lay wrote: Am 31.05.24 um 17:00 schrieb

Re: How to avoid some built-in expansions in gcc?

2024-05-31 Thread Richard Biener via Gcc
> Am 31.05.2024 um 20:56 schrieb Georg-Johann Lay : > >  > > Am 31.05.24 um 19:32 schrieb Richard Biener: Am 31.05.2024 um 17:25 schrieb Paul Koning via Gcc : >>> >>>  >>> On May 31, 2024, at 11:06 AM, Georg-Johann Lay wrote: Am 31.05.24 um 17:00 schrieb

Re: How to avoid some built-in expansions in gcc?

2024-05-31 Thread Georg-Johann Lay
Am 31.05.24 um 19:32 schrieb Richard Biener: Am 31.05.2024 um 17:25 schrieb Paul Koning via Gcc :  On May 31, 2024, at 11:06 AM, Georg-Johann Lay wrote: Am 31.05.24 um 17:00 schrieb Paul Koning: On May 31, 2024, at 9:52 AM, Georg-Johann Lay wrote: What's the recommended way to

Re: How to avoid some built-in expansions in gcc?

2024-05-31 Thread Richard Biener via Gcc
> Am 31.05.2024 um 17:25 schrieb Paul Koning via Gcc : > >  > >> On May 31, 2024, at 11:06 AM, Georg-Johann Lay wrote: >> >> >> >> Am 31.05.24 um 17:00 schrieb Paul Koning: > On May 31, 2024, at 9:52 AM, Georg-Johann Lay wrote: > > What's the recommended way to stop

Re: How to avoid some built-in expansions in gcc?

2024-05-31 Thread Paul Koning via Gcc
> On May 31, 2024, at 11:06 AM, Georg-Johann Lay wrote: > > > > Am 31.05.24 um 17:00 schrieb Paul Koning: >>> On May 31, 2024, at 9:52 AM, Georg-Johann Lay wrote: >>> >>> What's the recommended way to stop built-in expansions in gcc? >>> >>> For example, avr-gcc expands isinff() to a

Re: How to avoid some built-in expansions in gcc?

2024-05-31 Thread Georg-Johann Lay
Am 31.05.24 um 17:00 schrieb Paul Koning: On May 31, 2024, at 9:52 AM, Georg-Johann Lay wrote: What's the recommended way to stop built-in expansions in gcc? For example, avr-gcc expands isinff() to a bloated version of an isinff() implementation that's written in asm (PR115307).

Re: How to avoid some built-in expansions in gcc?

2024-05-31 Thread Paul Koning via Gcc
> On May 31, 2024, at 9:52 AM, Georg-Johann Lay wrote: > > What's the recommended way to stop built-in expansions in gcc? > > For example, avr-gcc expands isinff() to a bloated version of an isinff() > implementation that's written in asm (PR115307). > > Johann Isn't that up to the target

Re: How to avoid some built-in expansions in gcc?

2024-05-31 Thread Jonathan Wakely via Gcc
On Fri, 31 May 2024 at 15:53, Georg-Johann Lay wrote: > > > > Am 31.05.24 um 15:56 schrieb Jonathan Wakely: > > On Fri, 31 May 2024 at 14:52, Georg-Johann Lay wrote: > >> > >> What's the recommended way to stop built-in expansions in gcc? > >> > >> For example, avr-gcc expands isinff() to a

Re: How to avoid some built-in expansions in gcc?

2024-05-31 Thread Georg-Johann Lay
Am 31.05.24 um 15:56 schrieb Jonathan Wakely: On Fri, 31 May 2024 at 14:52, Georg-Johann Lay wrote: What's the recommended way to stop built-in expansions in gcc? For example, avr-gcc expands isinff() to a bloated version of an isinff() implementation that's written in asm (PR115307).

Re: How to avoid some built-in expansions in gcc?

2024-05-31 Thread Jonathan Wakely via Gcc
On Fri, 31 May 2024 at 14:52, Georg-Johann Lay wrote: > > What's the recommended way to stop built-in expansions in gcc? > > For example, avr-gcc expands isinff() to a bloated version of an > isinff() implementation that's written in asm (PR115307). Did you try -fno-builtin-isinff ?

How to avoid some built-in expansions in gcc?

2024-05-31 Thread Georg-Johann Lay
What's the recommended way to stop built-in expansions in gcc? For example, avr-gcc expands isinff() to a bloated version of an isinff() implementation that's written in asm (PR115307). Johann