Re: Patch ping: Re: [PATCH] libgcc, i386, optabs, v2: Add __float{, un}tibf to libgcc and expand BF -> integral through SF intermediate [PR107703]

2023-03-11 Thread Jeff Law via Gcc-patches




On 3/1/23 05:32, Jakub Jelinek via Gcc-patches wrote:

Hi!

On Wed, Nov 16, 2022 at 12:51:14PM +0100, Jakub Jelinek via Gcc-patches wrote:

On Wed, Nov 16, 2022 at 10:06:17AM +0100, Jakub Jelinek via Gcc-patches wrote:

Thoughts on this?  I guess my preference would be the BF -> SF -> TI
path because we won't need to waste
 32: 00015e10   321 FUNCGLOBAL DEFAULT   13 
__fixbfti@@GCC_13.0.0
 89: 00015f60   299 FUNCGLOBAL DEFAULT   13 
__fixunsbfti@@GCC_13.0.0
If so, I'd need to cut the fix parts of the patch below and
do something in the middle-end.


Here is adjusted patch that does that.

2022-11-16  Jakub Jelinek  

PR target/107703
* optabs.cc (expand_fix): For conversions from BFmode to integral,
use shifts to convert it to SFmode first and then convert SFmode
to integral.

* soft-fp/floattibf.c: New file.
* soft-fp/floatuntibf.c: New file.
* config/i386/libgcc-glibc.ver: Export __float{,un}tibf @ GCC_13.0.0.
* config/i386/64/t-softfp (softfp_extras): Add floattibf and
floatuntibf.
(CFLAGS-floattibf.c, CFLAGS-floatunstibf.c): Add -msse2.


I'd like to ping the libgcc non-i386 part of this patch, Uros said the i386
part is ok but that one depends on the generic libgcc changes.
I'll ping the optabs.cc change separately.

https://gcc.gnu.org/pipermail/gcc-patches/2022-November/606398.html
with more info in
https://gcc.gnu.org/pipermail/gcc-patches/2022-November/606382.html

The optab changes are OK too.
jeff


Re: Patch ping: Re: [PATCH] libgcc, i386, optabs, v2: Add __float{, un}tibf to libgcc and expand BF -> integral through SF intermediate [PR107703]

2023-03-11 Thread Uros Bizjak via Gcc-patches
On Fri, Mar 10, 2023 at 7:11 PM Ian Lance Taylor  wrote:
>
> Jakub Jelinek  writes:
>
> > On Wed, Mar 01, 2023 at 01:32:43PM +0100, Jakub Jelinek via Gcc-patches 
> > wrote:
> >> On Wed, Nov 16, 2022 at 12:51:14PM +0100, Jakub Jelinek via Gcc-patches 
> >> wrote:
> >> > On Wed, Nov 16, 2022 at 10:06:17AM +0100, Jakub Jelinek via
> >> > Gcc-patches wrote:
> >> > > Thoughts on this?  I guess my preference would be the BF -> SF -> TI
> >> > > path because we won't need to waste
> >> > > 32: 00015e10 321 FUNC GLOBAL DEFAULT 13
> >> > > __fixbfti@@GCC_13.0.0
> >> > > 89: 00015f60 299 FUNC GLOBAL DEFAULT 13
> >> > > __fixunsbfti@@GCC_13.0.0
> >> > > If so, I'd need to cut the fix parts of the patch below and
> >> > > do something in the middle-end.
> >> >
> >> > Here is adjusted patch that does that.
> >> >
> >> > 2022-11-16  Jakub Jelinek  
> >> >
> >> >PR target/107703
> >> >* optabs.cc (expand_fix): For conversions from BFmode to integral,
> >> >use shifts to convert it to SFmode first and then convert SFmode
> >> >to integral.
> >> >
> >> >* soft-fp/floattibf.c: New file.
> >> >* soft-fp/floatuntibf.c: New file.
> >> >* config/i386/libgcc-glibc.ver: Export __float{,un}tibf @ GCC_13.0.0.
> >> >* config/i386/64/t-softfp (softfp_extras): Add floattibf and
> >> >floatuntibf.
> >> >(CFLAGS-floattibf.c, CFLAGS-floatunstibf.c): Add -msse2.
> >>
> >> I'd like to ping the libgcc non-i386 part of this patch, Uros said the i386
> >> part is ok but that one depends on the generic libgcc changes.
> >> I'll ping the optabs.cc change separately.
> >>
> >> https://gcc.gnu.org/pipermail/gcc-patches/2022-November/606398.html
> >> with more info in
> >> https://gcc.gnu.org/pipermail/gcc-patches/2022-November/606382.html
> >
> > I'd like to ping this again.  I've posted the previously added
> > bfloat16 changes as well as the above 2 new files to libc-alpha as well
> > https://sourceware.org/pipermail/libc-alpha/2023-March/146246.html
> > if it makes the review easier.
>
>
> The libgcc parts of this are fine.  Thanks.

Also OK for the x86 part.

Thanks,
Uros.


Re: Patch ping: Re: [PATCH] libgcc, i386, optabs, v2: Add __float{, un}tibf to libgcc and expand BF -> integral through SF intermediate [PR107703]

2023-03-10 Thread Ian Lance Taylor
Jakub Jelinek  writes:

> On Wed, Mar 01, 2023 at 01:32:43PM +0100, Jakub Jelinek via Gcc-patches wrote:
>> On Wed, Nov 16, 2022 at 12:51:14PM +0100, Jakub Jelinek via Gcc-patches 
>> wrote:
>> > On Wed, Nov 16, 2022 at 10:06:17AM +0100, Jakub Jelinek via
>> > Gcc-patches wrote:
>> > > Thoughts on this?  I guess my preference would be the BF -> SF -> TI
>> > > path because we won't need to waste
>> > > 32: 00015e10 321 FUNC GLOBAL DEFAULT 13
>> > > __fixbfti@@GCC_13.0.0
>> > > 89: 00015f60 299 FUNC GLOBAL DEFAULT 13
>> > > __fixunsbfti@@GCC_13.0.0
>> > > If so, I'd need to cut the fix parts of the patch below and
>> > > do something in the middle-end.
>> > 
>> > Here is adjusted patch that does that.
>> > 
>> > 2022-11-16  Jakub Jelinek  
>> > 
>> >PR target/107703
>> >* optabs.cc (expand_fix): For conversions from BFmode to integral,
>> >use shifts to convert it to SFmode first and then convert SFmode
>> >to integral.
>> > 
>> >* soft-fp/floattibf.c: New file.
>> >* soft-fp/floatuntibf.c: New file.
>> >* config/i386/libgcc-glibc.ver: Export __float{,un}tibf @ GCC_13.0.0.
>> >* config/i386/64/t-softfp (softfp_extras): Add floattibf and
>> >floatuntibf.
>> >(CFLAGS-floattibf.c, CFLAGS-floatunstibf.c): Add -msse2.
>> 
>> I'd like to ping the libgcc non-i386 part of this patch, Uros said the i386
>> part is ok but that one depends on the generic libgcc changes.
>> I'll ping the optabs.cc change separately.
>> 
>> https://gcc.gnu.org/pipermail/gcc-patches/2022-November/606398.html
>> with more info in
>> https://gcc.gnu.org/pipermail/gcc-patches/2022-November/606382.html
>
> I'd like to ping this again.  I've posted the previously added
> bfloat16 changes as well as the above 2 new files to libc-alpha as well
> https://sourceware.org/pipermail/libc-alpha/2023-March/146246.html
> if it makes the review easier.


The libgcc parts of this are fine.  Thanks.

Ian


Patch ping: Re: [PATCH] libgcc, i386, optabs, v2: Add __float{, un}tibf to libgcc and expand BF -> integral through SF intermediate [PR107703]

2023-03-10 Thread Jakub Jelinek via Gcc-patches
Hi!

On Wed, Mar 01, 2023 at 01:32:43PM +0100, Jakub Jelinek via Gcc-patches wrote:
> On Wed, Nov 16, 2022 at 12:51:14PM +0100, Jakub Jelinek via Gcc-patches wrote:
> > On Wed, Nov 16, 2022 at 10:06:17AM +0100, Jakub Jelinek via Gcc-patches 
> > wrote:
> > > Thoughts on this?  I guess my preference would be the BF -> SF -> TI
> > > path because we won't need to waste
> > > 32: 00015e10   321 FUNCGLOBAL DEFAULT   13 
> > > __fixbfti@@GCC_13.0.0
> > > 89: 00015f60   299 FUNCGLOBAL DEFAULT   13 
> > > __fixunsbfti@@GCC_13.0.0
> > > If so, I'd need to cut the fix parts of the patch below and
> > > do something in the middle-end.
> > 
> > Here is adjusted patch that does that.
> > 
> > 2022-11-16  Jakub Jelinek  
> > 
> > PR target/107703
> > * optabs.cc (expand_fix): For conversions from BFmode to integral,
> > use shifts to convert it to SFmode first and then convert SFmode
> > to integral.
> > 
> > * soft-fp/floattibf.c: New file.
> > * soft-fp/floatuntibf.c: New file.
> > * config/i386/libgcc-glibc.ver: Export __float{,un}tibf @ GCC_13.0.0.
> > * config/i386/64/t-softfp (softfp_extras): Add floattibf and
> > floatuntibf.
> > (CFLAGS-floattibf.c, CFLAGS-floatunstibf.c): Add -msse2.
> 
> I'd like to ping the libgcc non-i386 part of this patch, Uros said the i386
> part is ok but that one depends on the generic libgcc changes.
> I'll ping the optabs.cc change separately.
> 
> https://gcc.gnu.org/pipermail/gcc-patches/2022-November/606398.html
> with more info in
> https://gcc.gnu.org/pipermail/gcc-patches/2022-November/606382.html

I'd like to ping this again.  I've posted the previously added
bfloat16 changes as well as the above 2 new files to libc-alpha as well
https://sourceware.org/pipermail/libc-alpha/2023-March/146246.html
if it makes the review easier.

Thanks

Jakub



Patch ping: Re: [PATCH] libgcc, i386, optabs, v2: Add __float{, un}tibf to libgcc and expand BF -> integral through SF intermediate [PR107703]

2023-03-01 Thread Jakub Jelinek via Gcc-patches
Hi!

On Wed, Nov 16, 2022 at 12:51:14PM +0100, Jakub Jelinek via Gcc-patches wrote:
> On Wed, Nov 16, 2022 at 10:06:17AM +0100, Jakub Jelinek via Gcc-patches wrote:
> > Thoughts on this?  I guess my preference would be the BF -> SF -> TI
> > path because we won't need to waste
> > 32: 00015e10   321 FUNCGLOBAL DEFAULT   13 
> > __fixbfti@@GCC_13.0.0
> > 89: 00015f60   299 FUNCGLOBAL DEFAULT   13 
> > __fixunsbfti@@GCC_13.0.0
> > If so, I'd need to cut the fix parts of the patch below and
> > do something in the middle-end.
> 
> Here is adjusted patch that does that.
> 
> 2022-11-16  Jakub Jelinek  
> 
>   PR target/107703
>   * optabs.cc (expand_fix): For conversions from BFmode to integral,
>   use shifts to convert it to SFmode first and then convert SFmode
>   to integral.
> 
>   * soft-fp/floattibf.c: New file.
>   * soft-fp/floatuntibf.c: New file.
>   * config/i386/libgcc-glibc.ver: Export __float{,un}tibf @ GCC_13.0.0.
>   * config/i386/64/t-softfp (softfp_extras): Add floattibf and
>   floatuntibf.
>   (CFLAGS-floattibf.c, CFLAGS-floatunstibf.c): Add -msse2.

I'd like to ping the libgcc non-i386 part of this patch, Uros said the i386
part is ok but that one depends on the generic libgcc changes.
I'll ping the optabs.cc change separately.

https://gcc.gnu.org/pipermail/gcc-patches/2022-November/606398.html
with more info in
https://gcc.gnu.org/pipermail/gcc-patches/2022-November/606382.html

Thanks.

Jakub