This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: combine_conversions int->double->int


On Thu, Apr 26, 2012 at 8:43 PM, Marc Glisse <marc.glisse@inria.fr> wrote:
> On Thu, 26 Apr 2012, Richard Guenther wrote:
>
>> On Wed, Apr 25, 2012 at 3:58 PM, Marc Glisse <marc.glisse@inria.fr> wrote:
>>>
>>> Here is take 2 on this patch, which seems cleaner. Bootstrapped and
>>> regression tested.
>>>
>>> gcc/ChangeLog
>>>
>>> 2012-04-25 ?Marc Glisse ?<marc.glisse@inria.fr>
>>>
>>> ? ? ? ?PR middle-end/27139
>>> ? ? ? ?* tree-ssa-forwprop.c (combine_conversions): Handle INT->FP->INT.
>>>
>>> gcc/testsuite/ChangeLog
>>>
>>> 2012-04-25 ?Marc Glisse ?<marc.glisse@inria.fr>
>>>
>>> ? ? ? ?PR middle-end/27139
>>> ? ? ? ?* gcc.dg/tree-ssa/forwprop-18.c: New test.
>>>
>>>
>>> In my patch, the lines with gimple_assign_* are vaguely guessed from what
>>> is
>>> around, I don't pretend to understand them.
>>
>>
>> ;)
>>
>> The patch looks good to me - on a 2nd thought folding the case back in
>> to the if (CONVERT_EXPR_CODE_P (gimple_assign_rhs_code (def_stmt)))
>> block to benefit from the local vars therein makes sense (but as separate
>> sub-if () as it is now).
>
>
> Like the attached? (c,c++ bootstrapped, make -k check, no regression)
>
> I changed the types in the testcase to make it really unlikely that a
> platform needs to skip it (it would require a long double that can't
> represent all signed char, or a float that can represent all unsigned long
> long).

Yes.  Do you have a copyright assignment on file?

Thanks,
Richard.

> --
> Marc Glisse


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]