On 11/07/15 06:40, Jeff Law wrote:
> On 07/09/2015 05:08 PM, Kugan wrote:
>
>> Done. Bootstrapped and regression tested on x86-64-none-linux-gnu with
>> no new regressions. Is this OK for trunk?
> Thanks for the additional testcases.
>
>
>
>> + else
>> + {
>> + /* If arg1 is an INTEGER_CST, fold it to new type. */
>> + if (INTEGRAL_TYPE_P (TREE_TYPE (new_arg0))
>> + && int_fits_type_p (arg1, TREE_TYPE (new_arg0)))
>> + {
>> + if (gimple_assign_cast_p (arg0_def_stmt))
>> + new_arg1 = fold_convert (TREE_TYPE (new_arg0), arg1);
>> + else
>> + return false;
>> + }
>> + else
>> + return false;
>> + }
> Something looks goofy here formatting-wise. Can you please check for
> horizontal whitespace consistency before committing.
>
>
>
>> +
>> + /* If types of new_arg0 and new_arg1 are different bailout. */
>> + if (TREE_TYPE (new_arg0) != TREE_TYPE (new_arg1))
>> + return false;
> Seems like this should use types_compatible_p here. You're testing
> pointer equality, but as long as the types are compatible, we should be
> able to make the transformation.
>
> With the horizontal whitespace fixed and using types_compatible_p this
> is OK for the trunk. So pre-approved with those two changes and a final
> bootstrap/regression test (due to the types_compatible_p change).
>
> jeff
>
Thanks. Committed as r225722 with the changes. Also did a fresh
bootstrap and regression testing on x86_64-none-linux-gnu before committing.
Thanks,
Kugan