diff options
author | Richard Sandiford <richard.sandiford@linaro.org> | 2018-01-02 18:27:15 +0000 |
---|---|---|
committer | Richard Sandiford <rsandifo@gcc.gnu.org> | 2018-01-02 18:27:15 +0000 |
commit | 1a1c441dbe5933ebf9180831236aa5be7d70a434 (patch) | |
tree | 1666d763225f1b16cafb34b101ec4e31817f8679 /gcc/selftest-run-tests.c | |
parent | d980067b1e9394b2b8482b3fc888ac5e8e3ebe59 (diff) | |
download | gcc-1a1c441dbe5933ebf9180831236aa5be7d70a434.zip gcc-1a1c441dbe5933ebf9180831236aa5be7d70a434.tar.gz gcc-1a1c441dbe5933ebf9180831236aa5be7d70a434.tar.bz2 |
Rework VEC_PERM_EXPR folding
This patch reworks the VEC_PERM_EXPR folding so that more of it
works for variable-length vectors. E.g. it means that we can
now recognise variable-length permutes that reduce to a single
vector, or cases in which a variable-length permute only needs
one input. There should be no functional change for fixed-length
vectors.
2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
gcc/
* selftest.h (selftest::vec_perm_indices_c_tests): Declare.
* selftest-run-tests.c (selftest::run_tests): Call it.
* vector-builder.h (vector_builder::operator ==): New function.
(vector_builder::operator !=): Likewise.
* vec-perm-indices.h (vec_perm_indices::series_p): Declare.
(vec_perm_indices::all_from_input_p): New function.
* vec-perm-indices.c (vec_perm_indices::series_p): Likewise.
(test_vec_perm_12, selftest::vec_perm_indices_c_tests): Likewise.
* fold-const.c (fold_ternary_loc): Use tree_to_vec_perm_builder
instead of reading the VECTOR_CST directly. Detect whether both
vector inputs are the same before constructing the vec_perm_indices,
and update the number of inputs argument accordingly. Use the
utility functions added above. Only construct sel2 if we need to.
From-SVN: r256098
Diffstat (limited to 'gcc/selftest-run-tests.c')
-rw-r--r-- | gcc/selftest-run-tests.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/gcc/selftest-run-tests.c b/gcc/selftest-run-tests.c index 63d6e07..6af0f02 100644 --- a/gcc/selftest-run-tests.c +++ b/gcc/selftest-run-tests.c @@ -73,6 +73,7 @@ selftest::run_tests () /* Mid-level data structures. */ input_c_tests (); + vec_perm_indices_c_tests (); tree_c_tests (); gimple_c_tests (); rtl_tests_c_tests (); |