Make CONST_VECTOR_ELT handle implicitly-encoded elements
authorRichard Sandiford <richard.sandiford@linaro.org>
Tue, 2 Jan 2018 18:28:14 +0000 (18:28 +0000)
committerRichard Sandiford <rsandifo@gcc.gnu.org>
Tue, 2 Jan 2018 18:28:14 +0000 (18:28 +0000)
commitcd5ff7bc323a8fa6eafc4513bc814e4e7fa24120
tree4a69a3ee23bde8480b983e60720932a0219c7a95
parent3d8ca53dd9b4c42b07ef974f92c3c4553cce3a79
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.

From-SVN: r256104
gcc/ChangeLog
gcc/emit-rtl.c
gcc/rtl.h
gcc/simplify-rtx.c