fold-const.c (fold_negate_expr): Handle vectors.
commit418d1b87fb06b2df9aecb5b8b6abf1f0a1919a88
authorMarc Glisse <marc.glisse@inria.fr>
Tue, 14 May 2013 17:06:46 +0000 (14 19:06 +0200)
committerMarc Glisse <glisse@gcc.gnu.org>
Tue, 14 May 2013 17:06:46 +0000 (14 17:06 +0000)
tree6429a6c4487e6b5b3413637f8a610234ac156ab7
parenta5244b2ed5ccd1d1697ac1e288a9e1acc4a335cc
fold-const.c (fold_negate_expr): Handle vectors.

2013-05-14  Marc Glisse  <marc.glisse@inria.fr>

gcc/
* fold-const.c (fold_negate_expr): Handle vectors.
(fold_truth_not_expr): Make it static.
(fold_invert_truthvalue): New static function.
(invert_truthvalue_loc): Handle vectors. Do not call
fold_truth_not_expr directly.
(fold_unary_loc) <BIT_NOT_EXPR>: Handle comparisons.
<TRUTH_NOT_EXPR>: Do not cast to boolean.
(fold_comparison): Handle vector constants.
(fold_binary_loc) <TRUTH_XOR_EXPR>: Remove redundant code.
(fold_ternary_loc) <VEC_COND_EXPR>: Adapt more COND_EXPR optimizations.
* tree.h (fold_truth_not_expr): Remove declaration.

gcc/testsuite/
* g++.dg/ext/vector22.C: New testcase.
* gcc.dg/binop-xor3.c: Remove xfail.

From-SVN: r198893
gcc/ChangeLog
gcc/fold-const.c
gcc/testsuite/ChangeLog
gcc/testsuite/g++.dg/ext/vector22.C [new file with mode: 0644]
gcc/testsuite/gcc.dg/binop-xor3.c
gcc/tree.h