This is the mail archive of the
mailing list for the GCC project.
Re: Generalise VEC_DUPLICATE folding for variable-length vectors
- From: Jeff Law <law at redhat dot com>
- To: gcc-patches at gcc dot gnu dot org, richard dot sandiford at arm dot com
- Date: Mon, 22 Jul 2019 12:26:49 -0600
- Subject: Re: Generalise VEC_DUPLICATE folding for variable-length vectors
- References: <firstname.lastname@example.org>
On 7/11/19 2:06 AM, Richard Sandiford wrote:
> This patch uses the constant vector encoding scheme to handle
> more cases of a VEC_DUPLICATE of another vector. Duplicating
> any fixed-length vector is fine, and duplicating a variable-length
> vector is OK as long as that vector is also a duplicate of a
> fixed-length sequence.
> Other cases fell through to:
> if (VECTOR_MODE_P (mode) && GET_CODE (op) == CONST_VECTOR)
> which was only expecting to deal with elementwise operations.
> Tested on aarch64-linux-gnu, aarch64_be-elf and x86_64-linux-gnu.
> OK to install?
> 2019-07-11 Richard Sandiford <email@example.com>
> * simplify-rtx.c (simplify_const_unary_operation): Fold a
> VEC_DUPLICATE of a fixed-length vector even if the result
> is variable-length. Likewise fold a duplicate of a
> variable-length vector if the variable-length vector is
> itself a duplicate of a fixed-length sequence.
> (test_vector_ops_duplicate): Test more cases.