re PR target/86753 (gcc.target/aarch64/sve/vcond_[45].c fail after recent combine...
authorPrathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
Fri, 18 Oct 2019 05:13:26 +0000 (05:13 +0000)
committerPrathamesh Kulkarni <prathamesh3492@gcc.gnu.org>
Fri, 18 Oct 2019 05:13:26 +0000 (05:13 +0000)
commitcc1facefe3b4e3b067d95291a7dba834b830ff18
tree656904edfbf10a3b87dfff157ab33cc839fa0460
parent4aa255f52588be89a56b2d30ebada235c7bb7c15
re PR target/86753 (gcc.target/aarch64/sve/vcond_[45].c fail after recent combine patch)

2019-10-18  Prathamesh Kulkarni  <prathamesh.kulkarni@linaro.org>
    Richard Sandiford  <richard.sandiford@arm.com>

PR target/86753
* tree-vectorizer.h (scalar_cond_masked_key): New struct,
and define hashmap traits for it.
(loop_vec_info::scalar_cond_masked_set): New member.
(vect_record_loop_mask): Adjust prototype.
* tree-vectorizer.c (scalar_cond_masked_key::get_cond_ops_from_tree):
Implement method.
* tree-vect-loop.c (vectorizable_reduction): Pass NULL as last arg to
vect_record_loop_mask.
(vectorizable_live_operation): Likewise.
(vect_record_loop_mask): New param scalar_mask. Add entry
cond, loop_mask to scalar_cond_masked_set if scalar_mask is non NULL.
* tree-vect-stmts.c (check_load_store_masking): New param scalar_mask.
Pass it as last arg to vect_record_loop_mask.
(vectorizable_call): Pass scalar_mask as last arg to
vect_record_loop_mask.
(vectorizable_store): Likewise.
(vectorizable_load): Likewise.
(vectorizable_condition): Check if another part of vectorized code
applies loop_mask to condition or to it's inverse, and if yes,
apply loop_mask to result of vector comparison.

testsuite/
* gcc.target/aarch64/sve/cond_cnot_2.c: Remove XFAIL
from { scan-assembler-not {\tsel\t}.
* gcc.target/aarch64/sve/cond_convert_1.c: Adjust to make
only one load conditional.
* gcc.target/aarch64/sve/cond_convert_4.c: Likewise.
* gcc.target/aarch64/sve/cond_unary_2.c: Likewise.
* gcc.target/aarch64/sve/vcond_4.c: Remove XFAIL's.
* gcc.target/aarch64/sve/vcond_5.c: Likewise.

Co-Authored-By: Richard Sandiford <richard.sandiford@arm.com>
From-SVN: r277141
12 files changed:
gcc/ChangeLog
gcc/testsuite/ChangeLog
gcc/testsuite/gcc.target/aarch64/sve/cond_cnot_2.c
gcc/testsuite/gcc.target/aarch64/sve/cond_convert_1.c
gcc/testsuite/gcc.target/aarch64/sve/cond_convert_4.c
gcc/testsuite/gcc.target/aarch64/sve/cond_unary_2.c
gcc/testsuite/gcc.target/aarch64/sve/vcond_4.c
gcc/testsuite/gcc.target/aarch64/sve/vcond_5.c
gcc/tree-vect-loop.c
gcc/tree-vect-stmts.c
gcc/tree-vectorizer.c
gcc/tree-vectorizer.h