]> git.ipfire.org Git - thirdparty/gcc.git/commit - gcc/c/c-typeck.c
expr.c (do_store_flag): Expand vector comparison by building an appropriate VEC_COND_...
authorArtjoms Sinkarovs <artyom.shinkaroff@gmail.com>
Thu, 29 Sep 2011 11:29:03 +0000 (11:29 +0000)
committerRichard Biener <rguenth@gcc.gnu.org>
Thu, 29 Sep 2011 11:29:03 +0000 (11:29 +0000)
commitd246ab4f578b2e3369963386bafd66b26de8e63d
tree288524066a797ac20c1839c796218ffa83932145
parent7c99ecef0b605466c522f4c170811761339dac16
expr.c (do_store_flag): Expand vector comparison by building an appropriate VEC_COND_EXPR.

2011-09-29  Artjoms Sinkarovs <artyom.shinkaroff@gmail.com>

* expr.c (do_store_flag): 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.

* gcc.c-torture/execute/vector-compare-1.c: New testcase.
* gcc.c-torture/execute/vector-compare-2.c: Likewise.
* gcc.dg/vector-compare-1.c: Likewise.
* gcc.dg/vector-compare-2.c: Likewise.

From-SVN: r179342
gcc/ChangeLog
gcc/c-typeck.c
gcc/config/i386/i386.c
gcc/doc/extend.texi
gcc/expr.c
gcc/testsuite/ChangeLog
gcc/testsuite/gcc.c-torture/execute/vector-compare-1.c [new file with mode: 0644]
gcc/testsuite/gcc.c-torture/execute/vector-compare-2.c [new file with mode: 0644]
gcc/testsuite/gcc.dg/vector-compare-1.c [new file with mode: 0644]
gcc/testsuite/gcc.dg/vector-compare-2.c [new file with mode: 0644]
gcc/tree-vect-generic.c