Make CONST_VECTOR_ELT handle implicitly-encoded elements
commit0f78b37a1a502b2f2ce4ab2a8aee0d307e3785a6
authorrsandifo <rsandifo@138bc75d-0d04-0410-961f-82ee72b054a4>
Tue, 2 Jan 2018 18:28:14 +0000 (2 18:28 +0000)
committerrsandifo <rsandifo@138bc75d-0d04-0410-961f-82ee72b054a4>
Tue, 2 Jan 2018 18:28:14 +0000 (2 18:28 +0000)
tree4a69a3ee23bde8480b983e60720932a0219c7a95
parentab7b3df31d10987456835d0bc79d82830047e36a
Make CONST_VECTOR_ELT handle implicitly-encoded elements

This patch makes CONST_VECTOR_ELT handle implicitly-encoded elements,
in a similar way to VECTOR_CST_ELT.

2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>

gcc/
* rtl.h (CONST_VECTOR_ELT): Redefine to const_vector_elt.
(const_vector_encoded_nelts): New function.
(CONST_VECTOR_NUNITS): Redefine to use GET_MODE_NUNITS.
(const_vector_int_elt, const_vector_elt): Declare.
* emit-rtl.c (const_vector_int_elt_1): New function.
(const_vector_elt): Likewise.
* simplify-rtx.c (simplify_immed_subreg): Avoid taking the address
of CONST_VECTOR_ELT.

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