Support for vectorizing conditional expressions
authorAlan Hayward <alan.hayward@arm.com>
Fri, 23 Oct 2015 12:40:33 +0000 (12:40 +0000)
committerAlan Hayward <alahay01@gcc.gnu.org>
Fri, 23 Oct 2015 12:40:33 +0000 (12:40 +0000)
commitaf29617a50b430ad3e9f2842fe31335d4488d1d3
treeec11a15022b2040f90b22b7cbb903f7113eb29ec
parentf3bf0d9a5805754b9cc449b8d8d5c64d9e98361a
Support for vectorizing conditional expressions

2015-10-23  Alan Hayward <alan.hayward@arm.com>

gcc/
PR tree-optimization/65947
* tree-vect-loop.c
(vect_is_simple_reduction_1): Find condition reductions.
(vect_model_reduction_cost): Add condition reduction costs.
(get_initial_def_for_reduction): Add condition reduction initial var.
(vect_create_epilog_for_reduction): Add condition reduction epilog.
(vectorizable_reduction): Condition reduction support.
* tree-vect-stmts.c (vectorizable_condition): Add vect reduction arg
* doc/sourcebuild.texi (Vector-specific attributes): Document
vect_max_reduc

gcc/testsuite
PR tree-optimization/65947
* lib/target-supports.exp
(check_effective_target_vect_max_reduc): Add.
* gcc.dg/vect/pr65947-1.c: New test.
* gcc.dg/vect/pr65947-2.c: New test.
* gcc.dg/vect/pr65947-3.c: New test.
* gcc.dg/vect/pr65947-4.c: New test.
* gcc.dg/vect/pr65947-5.c: New test.
* gcc.dg/vect/pr65947-6.c: New test.
* gcc.dg/vect/pr65947-7.c: New test.
* gcc.dg/vect/pr65947-8.c: New test.
* gcc.dg/vect/pr65947-9.c: New test.
* gcc.dg/vect/pr65947-10.c: New test.
* gcc.dg/vect/pr65947-11.c: New test.

From-SVN: r229245
18 files changed:
gcc/ChangeLog
gcc/doc/sourcebuild.texi
gcc/testsuite/ChangeLog
gcc/testsuite/gcc.dg/vect/pr65947-1.c [new file with mode: 0644]
gcc/testsuite/gcc.dg/vect/pr65947-10.c [new file with mode: 0644]
gcc/testsuite/gcc.dg/vect/pr65947-11.c [new file with mode: 0644]
gcc/testsuite/gcc.dg/vect/pr65947-2.c [new file with mode: 0644]
gcc/testsuite/gcc.dg/vect/pr65947-3.c [new file with mode: 0644]
gcc/testsuite/gcc.dg/vect/pr65947-4.c [new file with mode: 0644]
gcc/testsuite/gcc.dg/vect/pr65947-5.c [new file with mode: 0644]
gcc/testsuite/gcc.dg/vect/pr65947-6.c [new file with mode: 0644]
gcc/testsuite/gcc.dg/vect/pr65947-7.c [new file with mode: 0644]
gcc/testsuite/gcc.dg/vect/pr65947-8.c [new file with mode: 0644]
gcc/testsuite/gcc.dg/vect/pr65947-9.c [new file with mode: 0644]
gcc/testsuite/lib/target-supports.exp
gcc/tree-vect-loop.c
gcc/tree-vect-stmts.c
gcc/tree-vectorizer.h