Artem Shinkarov schrieb:
> On Fri, Sep 30, 2011 at 4:01 PM, Georg-Johann Lay <a...@gjlay.de> wrote:
>> Artem Shinkarov schrieb:
>>> 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.
>>>        * expr.c (expand_expr_real_2): Expand vector comparison by
>>>        building an appropriate VEC_COND_EXPR.
>>>        * c-typeck.c (build_binary_op): Typecheck vector comparisons.
>>>        (c_objc_common_truthvalue_conversion): Adjust.
>>>        * tree-vect-generic.c (do_compare): Helper function.
>>>        (expand_vector_comparison): Check if hardware supports
>>>        vector comparison of the given type or expand vector
>>>        piecewise.
>>>        (expand_vector_operation): Treat comparison as binary
>>>        operation of vector type.
>>>        (expand_vector_operations_1): Adjust.
>>>        * tree-cfg.c (verify_gimple_comparison): Adjust.
>>>
>>>        gcc/config/i386
>>>        * i386.c (ix86_expand_sse_movcc): Consider a case when
>>>        vcond operators are {-1,..} and {0,..}.
>>>
>>>        gcc/doc
>>>        * extend.texi: Adjust.
>>>
>>>        gcc/testsuite
>>>        * gcc.c-torture/execute/vector-compare-1.c: New test.
>>>        * gcc.c-torture/execute/vector-compare-2.c: New test.
>>>        * gcc.dg/vector-compare-1.c: New test.
>>>        * gcc.dg/vector-compare-2.c: New test.
>>>
>>> bootstrapped and tested on x86_64-unknown-linux-gnu.
>>>
>>>
>>> Thanks,
>>> Artem.
>> Hi Artem,
>>
>> the new test case gcc.c-torture/execute/vector-compare-1.c causes bunch of
>> FAILS in regression tests for avr-unknown-none (see attachment).
>>
>> The target has
>>
>> 2 = sizeof (short)
>> 2 = sizeof (int)
>> 4 = sizeof (long int)
>> 8 = sizeof (long long int)
>>
>> Could you fix that? I.e. parametrize sizeof(int) out or skip the test by 
>> means of
>>
>> /* { dg-require-effective-target int32plus } */
>>
>> or similar.
>>
>> Thanks, Johann
>>
>> [...]
>>
> Hi
> 
> The problem actually happens when we compare float vector with float
> vector, it is assumed that we should get int vector as a result, but
> it turns out that we are getting long int.
> 
> The same with double, we assume that sizeof (double) == sizeof (long
> long). But as it seems double has the same size as float.

Yes.

sizeof(double) = sizeof(float) = 4

> Hm, I can put conditional of sort:
> if (sizeof (doulbe) == sizeof (long long)) and others. Or may be there
> is more elegant way of solving this?

That's too late because this won't prevent the compiler from error.
The error already happens at compile time, not at run time.

> I can fix it, but keep in mind that I don't have a permission to
> commit to the trunk.

You could browse ./testsuite/lib/target-supports.exp and try to find some gate
functions that fit the test case's requirement like
check_effective_target_large_double, check_effective_target_double64,
check_effective_target_x32 or a combination of them.

Johann

> Artem.

Reply via email to