Re: [PATCH, middle-end]: Fix PR50083: All 32-bit fortran tests fail on 32-bit Solaris

2011-08-26 Thread Rainer Orth
Uros,

> I will wait for the confirmation from Rainer before committing the patch.

an i386-pc-solaris2.9 bootstrap just finished, and all the failures are
gone.

Thanks.
Rainer

-- 
-
Rainer Orth, Center for Biotechnology, Bielefeld University


Re: [PATCH, middle-end]: Fix PR50083: All 32-bit fortran tests fail on 32-bit Solaris

2011-08-26 Thread Uros Bizjak
On Fri, Aug 26, 2011 at 9:30 AM, Richard Guenther  wrote:

>> >> As noted in the PR, we also have to protect conversion from
>> >> round->lround for non-TARGET_C99_FUNCTIONS targets. Otherwise, gcc
>> >> chokes in fold_fixed_mathfn, trying to canonicalize iround to
>> >> (non-existent) lround. It looks to me, that we can trigger the same
>> >> problem trying to convert (long long) round -> llround -> lround on
>> >> non-TARGET_C99_FUNCTIONS LP64 targets, so this fix probably applies to
>> >> other release branches as well.
>> >>
>> >> 2011-08-25  Uros Bizjak  
>> >>
>> >>       PR middle-end/50083
>> >>       * convert.c (convert_to_integer) : Convert
>> >>       only when TARGET_C99_FUNCTIONS.
>> >>       : Ditto.
>> >>       : Ditto.
>> >>
>> >> Bootstrapped on x86_64-pc-linux-gnu, regtesting in progress.
>> >>
>> >> OK for SVN and 4.6?
>> >
>> > Hmm.  In builtins.c we usually check if the target has support to
>> > expand the builtins directly in case we have named patterns for them.
>> > IMHO these convert.c optimizations belong somewhere else (so that
>> > they trigger for all languages).  Somewhere else these days would
>> > be tree-ssa-forwprop.c.
>> >
>> > I'm not asking you to do this move but please consider also doing
>> > the optimization when the target can expand the function directly.
>>
>> Yes, I know from our previous communication (ilogb handling) that this
>> whole convert.c part is fishy, but my attached patch fixes the
>> unwanted conversion in the same way as other similar builtins are
>> handled.
>
> Hmm, right, I see that now.
>
> Well, patch is ok then.

I will wait for the confirmation from Rainer before committing the patch.

Uros.


Re: [PATCH, middle-end]: Fix PR50083: All 32-bit fortran tests fail on 32-bit Solaris

2011-08-26 Thread Richard Guenther
On Fri, 26 Aug 2011, Uros Bizjak wrote:

> On Fri, Aug 26, 2011 at 9:05 AM, Richard Guenther  wrote:
> 
> >> As noted in the PR, we also have to protect conversion from
> >> round->lround for non-TARGET_C99_FUNCTIONS targets. Otherwise, gcc
> >> chokes in fold_fixed_mathfn, trying to canonicalize iround to
> >> (non-existent) lround. It looks to me, that we can trigger the same
> >> problem trying to convert (long long) round -> llround -> lround on
> >> non-TARGET_C99_FUNCTIONS LP64 targets, so this fix probably applies to
> >> other release branches as well.
> >>
> >> 2011-08-25  Uros Bizjak  
> >>
> >>       PR middle-end/50083
> >>       * convert.c (convert_to_integer) : Convert
> >>       only when TARGET_C99_FUNCTIONS.
> >>       : Ditto.
> >>       : Ditto.
> >>
> >> Bootstrapped on x86_64-pc-linux-gnu, regtesting in progress.
> >>
> >> OK for SVN and 4.6?
> >
> > Hmm.  In builtins.c we usually check if the target has support to
> > expand the builtins directly in case we have named patterns for them.
> > IMHO these convert.c optimizations belong somewhere else (so that
> > they trigger for all languages).  Somewhere else these days would
> > be tree-ssa-forwprop.c.
> >
> > I'm not asking you to do this move but please consider also doing
> > the optimization when the target can expand the function directly.
> 
> Yes, I know from our previous communication (ilogb handling) that this
> whole convert.c part is fishy, but my attached patch fixes the
> unwanted conversion in the same way as other similar builtins are
> handled.

Hmm, right, I see that now.

Well, patch is ok then.

Thanks,
Richard.

Re: [PATCH, middle-end]: Fix PR50083: All 32-bit fortran tests fail on 32-bit Solaris

2011-08-26 Thread Uros Bizjak
On Fri, Aug 26, 2011 at 9:05 AM, Richard Guenther  wrote:

>> As noted in the PR, we also have to protect conversion from
>> round->lround for non-TARGET_C99_FUNCTIONS targets. Otherwise, gcc
>> chokes in fold_fixed_mathfn, trying to canonicalize iround to
>> (non-existent) lround. It looks to me, that we can trigger the same
>> problem trying to convert (long long) round -> llround -> lround on
>> non-TARGET_C99_FUNCTIONS LP64 targets, so this fix probably applies to
>> other release branches as well.
>>
>> 2011-08-25  Uros Bizjak  
>>
>>       PR middle-end/50083
>>       * convert.c (convert_to_integer) : Convert
>>       only when TARGET_C99_FUNCTIONS.
>>       : Ditto.
>>       : Ditto.
>>
>> Bootstrapped on x86_64-pc-linux-gnu, regtesting in progress.
>>
>> OK for SVN and 4.6?
>
> Hmm.  In builtins.c we usually check if the target has support to
> expand the builtins directly in case we have named patterns for them.
> IMHO these convert.c optimizations belong somewhere else (so that
> they trigger for all languages).  Somewhere else these days would
> be tree-ssa-forwprop.c.
>
> I'm not asking you to do this move but please consider also doing
> the optimization when the target can expand the function directly.

Yes, I know from our previous communication (ilogb handling) that this
whole convert.c part is fishy, but my attached patch fixes the
unwanted conversion in the same way as other similar builtins are
handled.

Uros.


Re: [PATCH, middle-end]: Fix PR50083: All 32-bit fortran tests fail on 32-bit Solaris

2011-08-26 Thread Richard Guenther
On Thu, 25 Aug 2011, Uros Bizjak wrote:

> Hello!
> 
> As noted in the PR, we also have to protect conversion from
> round->lround for non-TARGET_C99_FUNCTIONS targets. Otherwise, gcc
> chokes in fold_fixed_mathfn, trying to canonicalize iround to
> (non-existent) lround. It looks to me, that we can trigger the same
> problem trying to convert (long long) round -> llround -> lround on
> non-TARGET_C99_FUNCTIONS LP64 targets, so this fix probably applies to
> other release branches as well.
> 
> 2011-08-25  Uros Bizjak  
> 
>   PR middle-end/50083
>   * convert.c (convert_to_integer) : Convert
>   only when TARGET_C99_FUNCTIONS.
>   : Ditto.
>   : Ditto.
> 
> Bootstrapped on x86_64-pc-linux-gnu, regtesting in progress.
> 
> OK for SVN and 4.6?

Hmm.  In builtins.c we usually check if the target has support to
expand the builtins directly in case we have named patterns for them.
IMHO these convert.c optimizations belong somewhere else (so that
they trigger for all languages).  Somewhere else these days would
be tree-ssa-forwprop.c.

I'm not asking you to do this move but please consider also doing
the optimization when the target can expand the function directly.

Thanks,
Richard.