On Thu, Sep 8, 2011 at 2:41 PM, Richard Guenther
<richard.guent...@gmail.com> wrote:
> On Wed, Sep 7, 2011 at 3:15 PM, Artem Shinkarov
> <artyom.shinkar...@gmail.com> wrote:
>> On Tue, Sep 6, 2011 at 3:56 PM, Richard Guenther
>> <richard.guent...@gmail.com> wrote:
>>> On Tue, Sep 6, 2011 at 4:50 PM, Artem Shinkarov
>>> <artyom.shinkar...@gmail.com> wrote:
>>>> Here is a new version of the patch which considers the changes from
>>>> 2011-09-02  Richard Guenther
>>>>
>>>>
>>>> ChangeLog
>>>>
>>>> 20011-09-06 Artjoms Sinkarovs <artyom.shinkar...@gmail.com>
>>>>
>>>>       gcc/
>>>>       * fold-const.c (constant_boolean_node): Adjust the meaning
>>>>       of boolean for vector types: true = {-1,..}, false = {0,..}.
>>>>       (fold_unary_loc): Avoid conversion of vector comparison to
>>>>       boolean type.
>>>
>>> Both changes have already been done.
>>
>> I missed the way you applied constant_boolean node, sorry for that.
>> But fold_unary_loc seems confusing to me. We have the following code:
>>
>>          else if (!INTEGRAL_TYPE_P (type))
>>            return build3_loc (loc, COND_EXPR, type, op0,
>>                               constant_boolean_node (true, type),
>>                               constant_boolean_node (false, type));
>>
>> But this is wrong for the vector types, because it should construct
>> VEC_COND_EXPR, not COND_EXPR. That is why I had a special case for
>> vectors.
>
> Ah, yeah.  I'll fix that.

OTOH, we require that vectors are converted with VIEW_CONVERT_EXPRs,
so the code shouldn't trigger anyway.

Richard.

> The patch looks ok to me from a middle-end point of view.  Thus, if
> Joseph is fine with it and Uros is, with the i386 piece the patch is ok.
>
> Thanks,
> Richard.

Reply via email to