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 <[email protected]>
>
> 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
./gcc/testsuite/gcc.c-torture/execute/vector-compare-1.c: In function 'main':
./gcc/testsuite/gcc.c-torture/execute/vector-compare-1.c:109:5: error:
incompatible types when assigning to type '__vector(4) int' from type
'__vector(4) long int'
./gcc/testsuite/gcc.c-torture/execute/vector-compare-1.c:109:5: error:
incompatible types when assigning to type '__vector(4) int' from type
'__vector(4) long int'
./gcc/testsuite/gcc.c-torture/execute/vector-compare-1.c:109:5: error:
incompatible types when assigning to type '__vector(4) int' from type
'__vector(4) long int'
./gcc/testsuite/gcc.c-torture/execute/vector-compare-1.c:109:5: error:
incompatible types when assigning to type '__vector(4) int' from type
'__vector(4) long int'
./gcc/testsuite/gcc.c-torture/execute/vector-compare-1.c:109:5: error:
incompatible types when assigning to type '__vector(4) int' from type
'__vector(4) long int'
./gcc/testsuite/gcc.c-torture/execute/vector-compare-1.c:109:5: error:
incompatible types when assigning to type '__vector(4) int' from type
'__vector(4) long int'
./gcc/testsuite/gcc.c-torture/execute/vector-compare-1.c:118:5: error:
incompatible types when assigning to type '__vector(2) long long int' from type
'__vector(2) long int'
./gcc/testsuite/gcc.c-torture/execute/vector-compare-1.c:118:5: error:
incompatible types when assigning to type '__vector(2) long long int' from type
'__vector(2) long int'
./gcc/testsuite/gcc.c-torture/execute/vector-compare-1.c:118:5: error:
incompatible types when assigning to type '__vector(2) long long int' from type
'__vector(2) long int'
./gcc/testsuite/gcc.c-torture/execute/vector-compare-1.c:118:5: error:
incompatible types when assigning to type '__vector(2) long long int' from type
'__vector(2) long int'
./gcc/testsuite/gcc.c-torture/execute/vector-compare-1.c:118:5: error:
incompatible types when assigning to type '__vector(2) long long int' from type
'__vector(2) long int'
./gcc/testsuite/gcc.c-torture/execute/vector-compare-1.c:118:5: error:
incompatible types when assigning to type '__vector(2) long long int' from type
'__vector(2) long int'
compiler exited with status 1
output is:
./gcc/testsuite/gcc.c-torture/execute/vector-compare-1.c: In function 'main':
./gcc/testsuite/gcc.c-torture/execute/vector-compare-1.c:109:5: error:
incompatible types when assigning to type '__vector(4) int' from type
'__vector(4) long int'
./gcc/testsuite/gcc.c-torture/execute/vector-compare-1.c:109:5: error:
incompatible types when assigning to type '__vector(4) int' from type
'__vector(4) long int'
./gcc/testsuite/gcc.c-torture/execute/vector-compare-1.c:109:5: error:
incompatible types when assigning to type '__vector(4) int' from type
'__vector(4) long int'
./gcc/testsuite/gcc.c-torture/execute/vector-compare-1.c:109:5: error:
incompatible types when assigning to type '__vector(4) int' from type
'__vector(4) long int'
./gcc/testsuite/gcc.c-torture/execute/vector-compare-1.c:109:5: error:
incompatible types when assigning to type '__vector(4) int' from type
'__vector(4) long int'
./gcc/testsuite/gcc.c-torture/execute/vector-compare-1.c:109:5: error:
incompatible types when assigning to type '__vector(4) int' from type
'__vector(4) long int'
./gcc/testsuite/gcc.c-torture/execute/vector-compare-1.c:118:5: error:
incompatible types when assigning to type '__vector(2) long long int' from type
'__vector(2) long int'
./gcc/testsuite/gcc.c-torture/execute/vector-compare-1.c:118:5: error:
incompatible types when assigning to type '__vector(2) long long int' from type
'__vector(2) long int'
./gcc/testsuite/gcc.c-torture/execute/vector-compare-1.c:118:5: error:
incompatible types when assigning to type '__vector(2) long long int' from type
'__vector(2) long int'
./gcc/testsuite/gcc.c-torture/execute/vector-compare-1.c:118:5: error:
incompatible types when assigning to type '__vector(2) long long int' from type
'__vector(2) long int'
./gcc/testsuite/gcc.c-torture/execute/vector-compare-1.c:118:5: error:
incompatible types when assigning to type '__vector(2) long long int' from type
'__vector(2) long int'
./gcc/testsuite/gcc.c-torture/execute/vector-compare-1.c:118:5: error:
incompatible types when assigning to type '__vector(2) long long int' from type
'__vector(2) long int'
FAIL: gcc.c-torture/execute/vector-compare-1.c compilation, -O3
-fomit-frame-pointer -funroll-loops
UNRESOLVED: gcc.c-torture/execute/vector-compare-1.c execution, -O3
-fomit-frame-pointer -funroll-loops
./gcc/testsuite/gcc.c-torture/execute/vector-compare-1.c: In function 'main':
./gcc/testsuite/gcc.c-torture/execute/vector-compare-1.c:109:5: error:
incompatible types when assigning to type '__vector(4) int' from type
'__vector(4) long int'
./gcc/testsuite/gcc.c-torture/execute/vector-compare-1.c:109:5: error:
incompatible types when assigning to type '__vector(4) int' from type
'__vector(4) long int'
./gcc/testsuite/gcc.c-torture/execute/vector-compare-1.c:109:5: error:
incompatible types when assigning to type '__vector(4) int' from type
'__vector(4) long int'
./gcc/testsuite/gcc.c-torture/execute/vector-compare-1.c:109:5: error:
incompatible types when assigning to type '__vector(4) int' from type
'__vector(4) long int'
./gcc/testsuite/gcc.c-torture/execute/vector-compare-1.c:109:5: error:
incompatible types when assigning to type '__vector(4) int' from type
'__vector(4) long int'
./gcc/testsuite/gcc.c-torture/execute/vector-compare-1.c:109:5: error:
incompatible types when assigning to type '__vector(4) int' from type
'__vector(4) long int'
./gcc/testsuite/gcc.c-torture/execute/vector-compare-1.c:118:5: error:
incompatible types when assigning to type '__vector(2) long long int' from type
'__vector(2) long int'
./gcc/testsuite/gcc.c-torture/execute/vector-compare-1.c:118:5: error:
incompatible types when assigning to type '__vector(2) long long int' from type
'__vector(2) long int'
./gcc/testsuite/gcc.c-torture/execute/vector-compare-1.c:118:5: error:
incompatible types when assigning to type '__vector(2) long long int' from type
'__vector(2) long int'
./gcc/testsuite/gcc.c-torture/execute/vector-compare-1.c:118:5: error:
incompatible types when assigning to type '__vector(2) long long int' from type
'__vector(2) long int'
./gcc/testsuite/gcc.c-torture/execute/vector-compare-1.c:118:5: error:
incompatible types when assigning to type '__vector(2) long long int' from type
'__vector(2) long int'
./gcc/testsuite/gcc.c-torture/execute/vector-compare-1.c:118:5: error:
incompatible types when assigning to type '__vector(2) long long int' from type
'__vector(2) long int'
compiler exited with status 1
output is:
./gcc/testsuite/gcc.c-torture/execute/vector-compare-1.c: In function 'main':
./gcc/testsuite/gcc.c-torture/execute/vector-compare-1.c:109:5: error:
incompatible types when assigning to type '__vector(4) int' from type
'__vector(4) long int'
./gcc/testsuite/gcc.c-torture/execute/vector-compare-1.c:109:5: error:
incompatible types when assigning to type '__vector(4) int' from type
'__vector(4) long int'
./gcc/testsuite/gcc.c-torture/execute/vector-compare-1.c:109:5: error:
incompatible types when assigning to type '__vector(4) int' from type
'__vector(4) long int'
./gcc/testsuite/gcc.c-torture/execute/vector-compare-1.c:109:5: error:
incompatible types when assigning to type '__vector(4) int' from type
'__vector(4) long int'
./gcc/testsuite/gcc.c-torture/execute/vector-compare-1.c:109:5: error:
incompatible types when assigning to type '__vector(4) int' from type
'__vector(4) long int'
./gcc/testsuite/gcc.c-torture/execute/vector-compare-1.c:109:5: error:
incompatible types when assigning to type '__vector(4) int' from type
'__vector(4) long int'
./gcc/testsuite/gcc.c-torture/execute/vector-compare-1.c:118:5: error:
incompatible types when assigning to type '__vector(2) long long int' from type
'__vector(2) long int'
./gcc/testsuite/gcc.c-torture/execute/vector-compare-1.c:118:5: error:
incompatible types when assigning to type '__vector(2) long long int' from type
'__vector(2) long int'
./gcc/testsuite/gcc.c-torture/execute/vector-compare-1.c:118:5: error:
incompatible types when assigning to type '__vector(2) long long int' from type
'__vector(2) long int'
./gcc/testsuite/gcc.c-torture/execute/vector-compare-1.c:118:5: error:
incompatible types when assigning to type '__vector(2) long long int' from type
'__vector(2) long int'
./gcc/testsuite/gcc.c-torture/execute/vector-compare-1.c:118:5: error:
incompatible types when assigning to type '__vector(2) long long int' from type
'__vector(2) long int'
./gcc/testsuite/gcc.c-torture/execute/vector-compare-1.c:118:5: error:
incompatible types when assigning to type '__vector(2) long long int' from type
'__vector(2) long int'
FAIL: gcc.c-torture/execute/vector-compare-1.c compilation, -O3
-fomit-frame-pointer -funroll-all-loops -finline-functions
UNRESOLVED: gcc.c-torture/execute/vector-compare-1.c execution, -O3
-fomit-frame-pointer -funroll-all-loops -finline-functions
./gcc/testsuite/gcc.c-torture/execute/vector-compare-1.c: In function 'main':
./gcc/testsuite/gcc.c-torture/execute/vector-compare-1.c:109:5: error:
incompatible types when assigning to type '__vector(4) int' from type
'__vector(4) long int'
./gcc/testsuite/gcc.c-torture/execute/vector-compare-1.c:109:5: error:
incompatible types when assigning to type '__vector(4) int' from type
'__vector(4) long int'
./gcc/testsuite/gcc.c-torture/execute/vector-compare-1.c:109:5: error:
incompatible types when assigning to type '__vector(4) int' from type
'__vector(4) long int'
./gcc/testsuite/gcc.c-torture/execute/vector-compare-1.c:109:5: error:
incompatible types when assigning to type '__vector(4) int' from type
'__vector(4) long int'
./gcc/testsuite/gcc.c-torture/execute/vector-compare-1.c:109:5: error:
incompatible types when assigning to type '__vector(4) int' from type
'__vector(4) long int'
./gcc/testsuite/gcc.c-torture/execute/vector-compare-1.c:109:5: error:
incompatible types when assigning to type '__vector(4) int' from type
'__vector(4) long int'
./gcc/testsuite/gcc.c-torture/execute/vector-compare-1.c:118:5: error:
incompatible types when assigning to type '__vector(2) long long int' from type
'__vector(2) long int'
./gcc/testsuite/gcc.c-torture/execute/vector-compare-1.c:118:5: error:
incompatible types when assigning to type '__vector(2) long long int' from type
'__vector(2) long int'
./gcc/testsuite/gcc.c-torture/execute/vector-compare-1.c:118:5: error:
incompatible types when assigning to type '__vector(2) long long int' from type
'__vector(2) long int'
./gcc/testsuite/gcc.c-torture/execute/vector-compare-1.c:118:5: error:
incompatible types when assigning to type '__vector(2) long long int' from type
'__vector(2) long int'
./gcc/testsuite/gcc.c-torture/execute/vector-compare-1.c:118:5: error:
incompatible types when assigning to type '__vector(2) long long int' from type
'__vector(2) long int'
./gcc/testsuite/gcc.c-torture/execute/vector-compare-1.c:118:5: error:
incompatible types when assigning to type '__vector(2) long long int' from type
'__vector(2) long int'
compiler exited with status 1
output is:
./gcc/testsuite/gcc.c-torture/execute/vector-compare-1.c: In function 'main':
./gcc/testsuite/gcc.c-torture/execute/vector-compare-1.c:109:5: error:
incompatible types when assigning to type '__vector(4) int' from type
'__vector(4) long int'
./gcc/testsuite/gcc.c-torture/execute/vector-compare-1.c:109:5: error:
incompatible types when assigning to type '__vector(4) int' from type
'__vector(4) long int'
./gcc/testsuite/gcc.c-torture/execute/vector-compare-1.c:109:5: error:
incompatible types when assigning to type '__vector(4) int' from type
'__vector(4) long int'
./gcc/testsuite/gcc.c-torture/execute/vector-compare-1.c:109:5: error:
incompatible types when assigning to type '__vector(4) int' from type
'__vector(4) long int'
./gcc/testsuite/gcc.c-torture/execute/vector-compare-1.c:109:5: error:
incompatible types when assigning to type '__vector(4) int' from type
'__vector(4) long int'
./gcc/testsuite/gcc.c-torture/execute/vector-compare-1.c:109:5: error:
incompatible types when assigning to type '__vector(4) int' from type
'__vector(4) long int'
./gcc/testsuite/gcc.c-torture/execute/vector-compare-1.c:118:5: error:
incompatible types when assigning to type '__vector(2) long long int' from type
'__vector(2) long int'
./gcc/testsuite/gcc.c-torture/execute/vector-compare-1.c:118:5: error:
incompatible types when assigning to type '__vector(2) long long int' from type
'__vector(2) long int'
./gcc/testsuite/gcc.c-torture/execute/vector-compare-1.c:118:5: error:
incompatible types when assigning to type '__vector(2) long long int' from type
'__vector(2) long int'
./gcc/testsuite/gcc.c-torture/execute/vector-compare-1.c:118:5: error:
incompatible types when assigning to type '__vector(2) long long int' from type
'__vector(2) long int'
./gcc/testsuite/gcc.c-torture/execute/vector-compare-1.c:118:5: error:
incompatible types when assigning to type '__vector(2) long long int' from type
'__vector(2) long int'
./gcc/testsuite/gcc.c-torture/execute/vector-compare-1.c:118:5: error:
incompatible types when assigning to type '__vector(2) long long int' from type
'__vector(2) long int'
FAIL: gcc.c-torture/execute/vector-compare-1.c compilation, -O3 -g
UNRESOLVED: gcc.c-torture/execute/vector-compare-1.c execution, -O3 -g
./gcc/testsuite/gcc.c-torture/execute/vector-compare-1.c: In function 'main':
./gcc/testsuite/gcc.c-torture/execute/vector-compare-1.c:109:5: error:
incompatible types when assigning to type '__vector(4) int' from type
'__vector(4) long int'
./gcc/testsuite/gcc.c-torture/execute/vector-compare-1.c:109:5: error:
incompatible types when assigning to type '__vector(4) int' from type
'__vector(4) long int'
./gcc/testsuite/gcc.c-torture/execute/vector-compare-1.c:109:5: error:
incompatible types when assigning to type '__vector(4) int' from type
'__vector(4) long int'
./gcc/testsuite/gcc.c-torture/execute/vector-compare-1.c:109:5: error:
incompatible types when assigning to type '__vector(4) int' from type
'__vector(4) long int'
./gcc/testsuite/gcc.c-torture/execute/vector-compare-1.c:109:5: error:
incompatible types when assigning to type '__vector(4) int' from type
'__vector(4) long int'
./gcc/testsuite/gcc.c-torture/execute/vector-compare-1.c:109:5: error:
incompatible types when assigning to type '__vector(4) int' from type
'__vector(4) long int'
./gcc/testsuite/gcc.c-torture/execute/vector-compare-1.c:118:5: error:
incompatible types when assigning to type '__vector(2) long long int' from type
'__vector(2) long int'
./gcc/testsuite/gcc.c-torture/execute/vector-compare-1.c:118:5: error:
incompatible types when assigning to type '__vector(2) long long int' from type
'__vector(2) long int'
./gcc/testsuite/gcc.c-torture/execute/vector-compare-1.c:118:5: error:
incompatible types when assigning to type '__vector(2) long long int' from type
'__vector(2) long int'
./gcc/testsuite/gcc.c-torture/execute/vector-compare-1.c:118:5: error:
incompatible types when assigning to type '__vector(2) long long int' from type
'__vector(2) long int'
./gcc/testsuite/gcc.c-torture/execute/vector-compare-1.c:118:5: error:
incompatible types when assigning to type '__vector(2) long long int' from type
'__vector(2) long int'
./gcc/testsuite/gcc.c-torture/execute/vector-compare-1.c:118:5: error:
incompatible types when assigning to type '__vector(2) long long int' from type
'__vector(2) long int'
compiler exited with status 1
output is:
./gcc/testsuite/gcc.c-torture/execute/vector-compare-1.c: In function 'main':
./gcc/testsuite/gcc.c-torture/execute/vector-compare-1.c:109:5: error:
incompatible types when assigning to type '__vector(4) int' from type
'__vector(4) long int'
./gcc/testsuite/gcc.c-torture/execute/vector-compare-1.c:109:5: error:
incompatible types when assigning to type '__vector(4) int' from type
'__vector(4) long int'
./gcc/testsuite/gcc.c-torture/execute/vector-compare-1.c:109:5: error:
incompatible types when assigning to type '__vector(4) int' from type
'__vector(4) long int'
./gcc/testsuite/gcc.c-torture/execute/vector-compare-1.c:109:5: error:
incompatible types when assigning to type '__vector(4) int' from type
'__vector(4) long int'
./gcc/testsuite/gcc.c-torture/execute/vector-compare-1.c:109:5: error:
incompatible types when assigning to type '__vector(4) int' from type
'__vector(4) long int'
./gcc/testsuite/gcc.c-torture/execute/vector-compare-1.c:109:5: error:
incompatible types when assigning to type '__vector(4) int' from type
'__vector(4) long int'
./gcc/testsuite/gcc.c-torture/execute/vector-compare-1.c:118:5: error:
incompatible types when assigning to type '__vector(2) long long int' from type
'__vector(2) long int'
./gcc/testsuite/gcc.c-torture/execute/vector-compare-1.c:118:5: error:
incompatible types when assigning to type '__vector(2) long long int' from type
'__vector(2) long int'
./gcc/testsuite/gcc.c-torture/execute/vector-compare-1.c:118:5: error:
incompatible types when assigning to type '__vector(2) long long int' from type
'__vector(2) long int'
./gcc/testsuite/gcc.c-torture/execute/vector-compare-1.c:118:5: error:
incompatible types when assigning to type '__vector(2) long long int' from type
'__vector(2) long int'
./gcc/testsuite/gcc.c-torture/execute/vector-compare-1.c:118:5: error:
incompatible types when assigning to type '__vector(2) long long int' from type
'__vector(2) long int'
./gcc/testsuite/gcc.c-torture/execute/vector-compare-1.c:118:5: error:
incompatible types when assigning to type '__vector(2) long long int' from type
'__vector(2) long int'