[Bug tree-optimization/85478] ICE with single element vector

krebbel at gcc dot gnu.org gcc-bugzilla@gcc.gnu.org
Mon Apr 23 09:10:00 GMT 2018


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

--- Comment #8 from Andreas Krebbel <krebbel at gcc dot gnu.org> ---
The problem is similar to PR83753 but with a different call-chain. Richard
Sandiford fixed it by adding:

          /* First cope with the degenerate case of a single-element
             vector.  */
          if (known_eq (TYPE_VECTOR_SUBPARTS (vectype), 1U))
            *memory_access_type = VMAT_CONTIGUOUS;

to get_group_load_store_type.  This prevents vect_grouped_store_supported from
being called for single element vectors. 

For this PR vect_grouped_store_supported is called from vect_analyze_loop_2. I
don't know if there is also a better way to deal with it in the caller?!

But regardless I think vect_grouped_store_supported should return false for
single element vectors as proposed in:

https://gcc.gnu.org/ml/gcc-patches/2018-04/msg00758.html


More information about the Gcc-bugs mailing list