https://gcc.gnu.org/bugzilla/show_bug.cgi?id=104152

Richard Biener <rguenth at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Assignee|unassigned at gcc dot gnu.org      |rguenth at gcc dot 
gnu.org
             Status|NEW                         |ASSIGNED

--- Comment #3 from Richard Biener <rguenth at gcc dot gnu.org> ---
(gdb) p debug (op_node)
t.ii:19:5: note: node (constant) 0x3c56910 (max_nunits=1, refcnt=1)
t.ii:19:5: note:        { 3.1400001049041748046875e+0,
3.1400001049041748046875e+0, 3.1400001049041748046875e+0 }

I guess vect_create_constant_vectors might miss the "optimization" to handle
uniform vectors or maybe duplicate_and_interleave does.

can_duplicate_and_interleave_p doesn't get the actual elements so it can't
do this but I also don't see duplicate_and_interleave handling such case.

We perform the can_duplicate_and_interleave_p also in
vect_get_and_check_slp_defs, but the associatable chain code simply does


              if (dt == vect_constant_def
                  || dt == vect_external_def)
                {
                  /* We can always build those.  Might want to sort last
                     or defer building.  */
                  vec<tree> ops;
                  ops.create (group_size);
                  for (lane = 0; lane < group_size; ++lane)
                    ops.quick_push (chains[lane][n].op);
                  slp_tree child = vect_create_new_slp_node (ops);
                  SLP_TREE_DEF_TYPE (child) = dt;
                  children.safe_push (child);

I'm going to add a similar check there, too.

Reply via email to