]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
Fix get_load_store_type wrt VMAT_ELEMENTWISE classification
authorRichard Biener <rguenther@suse.de>
Wed, 24 Sep 2025 10:24:11 +0000 (12:24 +0200)
committerRichard Biener <rguenther@suse.de>
Wed, 24 Sep 2025 11:33:02 +0000 (13:33 +0200)
We may not classify a BB vectorization load as VMAT_ELEMENTWISE as
that will ICE.  Instead we build vectors from existing scalar loads.
Make that explicit.

* tree-vect-stmts.cc (get_load_store_type): Explicitly fail
when we end up with VMAT_ELEMENTWISE for BB vectorization.

gcc/tree-vect-stmts.cc

index 841733349b5c0e48f4e373db6e94dc41dc2e0a9c..995151f9a271aa9457fe41f8de7bfd0e734864bd 100644 (file)
@@ -2507,6 +2507,11 @@ get_load_store_type (vec_info  *vinfo, stmt_vec_info stmt_info,
                         "not falling back to elementwise accesses\n");
       return false;
     }
+
+  /* For BB vectorization build up the vector from existing scalar defs.  */
+  if (!loop_vinfo && *memory_access_type == VMAT_ELEMENTWISE)
+    return false;
+
   return true;
 }