Re: [PATCH] [vect]Use intermiediate integer type for float_expr/fix_trunc_expr when direct optab is not existed.

2023-07-12 Thread Robin Dapp via Gcc-patches
> int32_t x = (int32_t)0x1.0p32; > int32_t y = (int32_t)(int64_t)0x1.0p32; > > sets x to 2147483647 and y to 0. >>> >>> Hmm, good question. GENERIC has a direct truncation to unsigned char >>> for example, the C standard generally says if the integral part cannot >>> be

Re: [PATCH] [vect]Use intermiediate integer type for float_expr/fix_trunc_expr when direct optab is not existed.

2023-06-22 Thread Thiago Jung Bauermann via Gcc-patches
Hello, liuhongt via Gcc-patches writes: > I notice there's some refactor in vectorizable_conversion > for code_helper,so I've adjusted my patch to that. > Here's the patch I'm going to commit. > > We have already use intermidate type in case WIDEN, but not for NONE, > this patch extended

Re: [PATCH] [vect]Use intermiediate integer type for float_expr/fix_trunc_expr when direct optab is not existed.

2023-06-22 Thread Richard Biener via Gcc-patches
On Wed, Jun 21, 2023 at 10:39 PM Joseph Myers wrote: > > On Wed, 21 Jun 2023, Richard Biener via Gcc-patches wrote: > > > > > int32_t x = (int32_t)0x1.0p32; > > > > int32_t y = (int32_t)(int64_t)0x1.0p32; > > > > > > > > sets x to 2147483647 and y to 0. > > > > Hmm, good question. GENERIC has a

Re: [PATCH] [vect]Use intermiediate integer type for float_expr/fix_trunc_expr when direct optab is not existed.

2023-06-21 Thread Joseph Myers
On Wed, 21 Jun 2023, Richard Biener via Gcc-patches wrote: > > > int32_t x = (int32_t)0x1.0p32; > > > int32_t y = (int32_t)(int64_t)0x1.0p32; > > > > > > sets x to 2147483647 and y to 0. > > Hmm, good question. GENERIC has a direct truncation to unsigned char > for example, the C standard

Re: [PATCH] [vect]Use intermiediate integer type for float_expr/fix_trunc_expr when direct optab is not existed.

2023-06-21 Thread Uros Bizjak via Gcc-patches
On Wed, Jun 21, 2023 at 10:22 AM Richard Biener wrote: > > > + /* For conversions between float and smaller integer types try > > > whether we > > > +can use intermediate signed integer types to support the > > > +conversion. */ > > > > I'm trying to enhance testcase

Re: [PATCH] [vect]Use intermiediate integer type for float_expr/fix_trunc_expr when direct optab is not existed.

2023-06-21 Thread Richard Sandiford via Gcc-patches
Richard Biener writes: > On Wed, Jun 21, 2023 at 11:32 AM Richard Sandiford > wrote: >> >> Richard Sandiford writes: >> > Richard Biener via Gcc-patches writes: >> >> On Fri, Jun 2, 2023 at 3:01 AM liuhongt via Gcc-patches >> >> wrote: >> >>> >> >>> We have already use intermidate type in

Re: [PATCH] [vect]Use intermiediate integer type for float_expr/fix_trunc_expr when direct optab is not existed.

2023-06-21 Thread Richard Biener via Gcc-patches
On Wed, Jun 21, 2023 at 11:32 AM Richard Sandiford wrote: > > Richard Sandiford writes: > > Richard Biener via Gcc-patches writes: > >> On Fri, Jun 2, 2023 at 3:01 AM liuhongt via Gcc-patches > >> wrote: > >>> > >>> We have already use intermidate type in case WIDEN, but not for NONE, > >>>

Re: [PATCH] [vect]Use intermiediate integer type for float_expr/fix_trunc_expr when direct optab is not existed.

2023-06-21 Thread Richard Sandiford via Gcc-patches
Richard Sandiford writes: > Richard Biener via Gcc-patches writes: >> On Fri, Jun 2, 2023 at 3:01 AM liuhongt via Gcc-patches >> wrote: >>> >>> We have already use intermidate type in case WIDEN, but not for NONE, >>> this patch extended that. >>> >>> I didn't do that in pattern recog since we

Re: [PATCH] [vect]Use intermiediate integer type for float_expr/fix_trunc_expr when direct optab is not existed.

2023-06-21 Thread Richard Sandiford via Gcc-patches
Richard Biener via Gcc-patches writes: > On Fri, Jun 2, 2023 at 3:01 AM liuhongt via Gcc-patches > wrote: >> >> We have already use intermidate type in case WIDEN, but not for NONE, >> this patch extended that. >> >> I didn't do that in pattern recog since we need to know whether the >> stmt

Re: [PATCH] [vect]Use intermiediate integer type for float_expr/fix_trunc_expr when direct optab is not existed.

2023-06-21 Thread Richard Biener via Gcc-patches
On Wed, Jun 21, 2023 at 9:50 AM Uros Bizjak via Gcc-patches wrote: > > On Tue, Jun 20, 2023 at 6:11 PM liuhongt via Gcc-patches > wrote: > > > > I notice there's some refactor in vectorizable_conversion > > for code_helper,so I've adjusted my patch to that. > > Here's the patch I'm going to

Re: [PATCH] [vect]Use intermiediate integer type for float_expr/fix_trunc_expr when direct optab is not existed.

2023-06-21 Thread Uros Bizjak via Gcc-patches
On Tue, Jun 20, 2023 at 6:11 PM liuhongt via Gcc-patches wrote: > > I notice there's some refactor in vectorizable_conversion > for code_helper,so I've adjusted my patch to that. > Here's the patch I'm going to commit. > > We have already use intermidate type in case WIDEN, but not for NONE, >

[PATCH] [vect]Use intermiediate integer type for float_expr/fix_trunc_expr when direct optab is not existed.

2023-06-20 Thread liuhongt via Gcc-patches
I notice there's some refactor in vectorizable_conversion for code_helper,so I've adjusted my patch to that. Here's the patch I'm going to commit. We have already use intermidate type in case WIDEN, but not for NONE, this patch extended that. gcc/ChangeLog: PR target/110018 *

Re: [PATCH] [vect]Use intermiediate integer type for float_expr/fix_trunc_expr when direct optab is not existed.

2023-06-20 Thread Richard Biener via Gcc-patches
On Tue, Jun 20, 2023 at 11:02 AM Hongtao Liu wrote: > > On Tue, Jun 20, 2023 at 4:41 PM Richard Biener > wrote: > > > > On Fri, Jun 2, 2023 at 3:01 AM liuhongt via Gcc-patches > > wrote: > > > > > > We have already use intermidate type in case WIDEN, but not for NONE, > > > this patch extended

Re: [PATCH] [vect]Use intermiediate integer type for float_expr/fix_trunc_expr when direct optab is not existed.

2023-06-20 Thread Hongtao Liu via Gcc-patches
On Tue, Jun 20, 2023 at 4:41 PM Richard Biener wrote: > > On Fri, Jun 2, 2023 at 3:01 AM liuhongt via Gcc-patches > wrote: > > > > We have already use intermidate type in case WIDEN, but not for NONE, > > this patch extended that. > > > > I didn't do that in pattern recog since we need to know

Re: [PATCH] [vect]Use intermiediate integer type for float_expr/fix_trunc_expr when direct optab is not existed.

2023-06-20 Thread Richard Biener via Gcc-patches
On Fri, Jun 2, 2023 at 3:01 AM liuhongt via Gcc-patches wrote: > > We have already use intermidate type in case WIDEN, but not for NONE, > this patch extended that. > > I didn't do that in pattern recog since we need to know whether the > stmt belongs to any slp_node to decide the vectype, the

[PATCH] [vect]Use intermiediate integer type for float_expr/fix_trunc_expr when direct optab is not existed.

2023-06-01 Thread liuhongt via Gcc-patches
We have already use intermidate type in case WIDEN, but not for NONE, this patch extended that. I didn't do that in pattern recog since we need to know whether the stmt belongs to any slp_node to decide the vectype, the related optabs are checked according to vectype_in and vectype_out. For