Simplify vec_merge according to the mask.
commit5d580028ffedc93057f105ee6d5838ed18708b6c
authorams <ams@138bc75d-0d04-0410-961f-82ee72b054a4>
Fri, 28 Sep 2018 10:54:34 +0000 (28 10:54 +0000)
committerams <ams@138bc75d-0d04-0410-961f-82ee72b054a4>
Fri, 28 Sep 2018 10:54:34 +0000 (28 10:54 +0000)
tree781b4e29be46dc92429d9d9fc342d8f4e12d388f
parentb9abfabb761f33726c12c601bb8be245512dfb10
Simplify vec_merge according to the mask.

This patch was part of the original patch we acquired from Honza and Martin.

It simplifies nested vec_merge operations using the same mask.

Self-tests are included.

2018-09-28  Andrew Stubbs  <ams@codesourcery.com>
    Jan Hubicka  <jh@suse.cz>
    Martin Jambor  <mjambor@suse.cz>

* simplify-rtx.c (simplify_merge_mask): New function.
(simplify_ternary_operation): Use it, also see if VEC_MERGEs with the
same masks are used in op1 or op2.
(test_vec_merge): New function.
(test_vector_ops): Call test_vec_merge.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@264688 138bc75d-0d04-0410-961f-82ee72b054a4
gcc/ChangeLog
gcc/simplify-rtx.c