2013-05-14 Marc Glisse <marc.glisse@inria.fr>
commit9be60878dd9809b21b883415636042afa4ed659a
authorglisse <glisse@138bc75d-0d04-0410-961f-82ee72b054a4>
Tue, 14 May 2013 17:06:46 +0000 (14 17:06 +0000)
committerglisse <glisse@138bc75d-0d04-0410-961f-82ee72b054a4>
Tue, 14 May 2013 17:06:46 +0000 (14 17:06 +0000)
tree6429a6c4487e6b5b3413637f8a610234ac156ab7
parent3adc0a9fac76c35061f3b404970e428a81a04a13
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.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@198893 138bc75d-0d04-0410-961f-82ee72b054a4
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