Simplify vec_merge according to the mask.
authorAndrew Stubbs <ams@codesourcery.com>
Fri, 28 Sep 2018 10:54:34 +0000 (10:54 +0000)
committerAndrew Stubbs <ams@gcc.gnu.org>
Fri, 28 Sep 2018 10:54:34 +0000 (10:54 +0000)
commit2bd4ca7ad508ec9b94f8c3442a6e39d5276d7915
tree781b4e29be46dc92429d9d9fc342d8f4e12d388f
parent227efe870043c9e8b4c58a702e90698b2970ff75
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.

Co-Authored-By: Jan Hubicka <jh@suse.cz>
Co-Authored-By: Martin Jambor <mjambor@suse.cz>
From-SVN: r264688
gcc/ChangeLog
gcc/simplify-rtx.c