This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug target/65832] Inefficient vector construction
- From: "rguenth at gcc dot gnu.org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Fri, 22 May 2015 12:15:12 +0000
- Subject: [Bug target/65832] Inefficient vector construction
- Auto-submitted: auto-generated
- References: <bug-65832-4 at http dot gcc dot gnu dot org/bugzilla/>
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=65832
--- Comment #5 from Richard Biener <rguenth at gcc dot gnu.org> ---
On a related note, store_constructor handles VECTOR_TYPE constructors through
the vec_init optab but that doesn't work for vector elements:
/* Don't use vec_init<mode> if some elements have VECTOR_TYPE. */
if (icode != CODE_FOR_nothing)
{
tree value;
FOR_EACH_CONSTRUCTOR_VALUE (CONSTRUCTOR_ELTS (exp), idx, value)
if (TREE_CODE (TREE_TYPE (value)) == VECTOR_TYPE)
{
icode = CODE_FOR_nothing;
instead it could, for say a V16QI constructor of four V4QI elements pun
the elements to SI mode, create a V4SI mode vector via vec_init and then
pun it to V16QI. All punning via subregs.
The vectorizer currently creates such vector constructors from grouped strided
load/store support.