]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
vect: Verify that GET_MODE_UNITS is greater than one for vect_grouped_store_supported
authorKevin Lee <kevinl@rivosinc.com>
Tue, 18 Apr 2023 18:42:17 +0000 (12:42 -0600)
committerJeff Law <jlaw@ventanamicro>
Tue, 18 Apr 2023 18:43:26 +0000 (12:43 -0600)
gcc/ChangeLog:

* tree-vect-data-refs.cc (vect_grouped_store_supported): Add new
condition.

gcc/tree-vect-data-refs.cc

index 8daf7bd7dd34d043b1d7b4cba1779f0ecf9f520a..c03ffb3aaf1c3ae3bc9fb3af4287b7820d474634 100644 (file)
@@ -5399,6 +5399,8 @@ vect_grouped_store_supported (tree vectype, unsigned HOST_WIDE_INT count)
          poly_uint64 nelt = GET_MODE_NUNITS (mode);
 
          /* The encoding has 2 interleaved stepped patterns.  */
+         if(!multiple_p (nelt, 2))
+           return false;
          vec_perm_builder sel (nelt, 2, 3);
          sel.quick_grow (6);
          for (i = 0; i < 3; i++)