mirror of git://gcc.gnu.org/git/gcc.git
expr.c (store_constructor): Allow CONSTRUCTOR with VECTOR_TYPE (same sized) elements even if...
* expr.c (store_constructor): Allow CONSTRUCTOR with VECTOR_TYPE (same sized) elements even if the type of the CONSTRUCTOR has vector mode and target is a REG. From-SVN: r205259
This commit is contained in:
parent
2dc2114458
commit
29d78eafa6
|
|
@ -1,3 +1,9 @@
|
||||||
|
2013-11-22 Jakub Jelinek <jakub@redhat.com>
|
||||||
|
|
||||||
|
* expr.c (store_constructor): Allow CONSTRUCTOR with VECTOR_TYPE
|
||||||
|
(same sized) elements even if the type of the CONSTRUCTOR has
|
||||||
|
vector mode and target is a REG.
|
||||||
|
|
||||||
2013-11-22 Richard Biener <rguenther@suse.de>
|
2013-11-22 Richard Biener <rguenther@suse.de>
|
||||||
|
|
||||||
Revert
|
Revert
|
||||||
|
|
|
||||||
16
gcc/expr.c
16
gcc/expr.c
|
|
@ -6305,6 +6305,18 @@ store_constructor (tree exp, rtx target, int cleared, HOST_WIDE_INT size)
|
||||||
enum machine_mode mode = GET_MODE (target);
|
enum machine_mode mode = GET_MODE (target);
|
||||||
|
|
||||||
icode = (int) optab_handler (vec_init_optab, mode);
|
icode = (int) optab_handler (vec_init_optab, mode);
|
||||||
|
/* 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;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
if (icode != CODE_FOR_nothing)
|
if (icode != CODE_FOR_nothing)
|
||||||
{
|
{
|
||||||
unsigned int i;
|
unsigned int i;
|
||||||
|
|
@ -6382,8 +6394,8 @@ store_constructor (tree exp, rtx target, int cleared, HOST_WIDE_INT size)
|
||||||
|
|
||||||
if (vector)
|
if (vector)
|
||||||
{
|
{
|
||||||
/* Vector CONSTRUCTORs should only be built from smaller
|
/* vec_init<mode> should not be used if there are VECTOR_TYPE
|
||||||
vectors in the case of BLKmode vectors. */
|
elements. */
|
||||||
gcc_assert (TREE_CODE (TREE_TYPE (value)) != VECTOR_TYPE);
|
gcc_assert (TREE_CODE (TREE_TYPE (value)) != VECTOR_TYPE);
|
||||||
RTVEC_ELT (vector, eltpos)
|
RTVEC_ELT (vector, eltpos)
|
||||||
= expand_normal (value);
|
= expand_normal (value);
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue