]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
Avoid touching STMT_VINFO_VECTYPE in bump_vector_ptr
authorRichard Biener <rguenther@suse.de>
Mon, 1 Sep 2025 13:45:57 +0000 (15:45 +0200)
committerRichard Biener <rguenth@gcc.gnu.org>
Tue, 2 Sep 2025 10:51:12 +0000 (12:51 +0200)
bump is always specified, so remove the STMT_VINFO_VECTYPE touching
path.

* tree-vect-data-refs.cc (bump_vector_ptr): Remove the
STMT_VINFO_VECTYPE use, bump is always specified.

gcc/tree-vect-data-refs.cc

index 1395776599a2ae4f607bf04b3b4b18bb5d278f34..e451b72e07eafa929e8d322563b1847e53c31cab 100644 (file)
@@ -5797,8 +5797,7 @@ vect_create_data_ref_ptr (vec_info *vinfo, stmt_vec_info stmt_info,
              to be vector_size.
    BSI - location where the new update stmt is to be placed.
    STMT_INFO - the original scalar memory-access stmt that is being vectorized.
-   BUMP - optional. The offset by which to bump the pointer. If not given,
-         the offset is assumed to be vector_size.
+   UPDATE - The offset by which to bump the pointer.
 
    Output: Return NEW_DATAREF_PTR as illustrated above.
 
@@ -5807,19 +5806,14 @@ vect_create_data_ref_ptr (vec_info *vinfo, stmt_vec_info stmt_info,
 tree
 bump_vector_ptr (vec_info *vinfo,
                 tree dataref_ptr, gimple *ptr_incr, gimple_stmt_iterator *gsi,
-                stmt_vec_info stmt_info, tree bump)
+                stmt_vec_info stmt_info, tree update)
 {
   struct data_reference *dr = STMT_VINFO_DATA_REF (stmt_info);
-  tree vectype = STMT_VINFO_VECTYPE (stmt_info);
-  tree update = TYPE_SIZE_UNIT (vectype);
   gimple *incr_stmt;
   ssa_op_iter iter;
   use_operand_p use_p;
   tree new_dataref_ptr;
 
-  if (bump)
-    update = bump;
-
   if (TREE_CODE (dataref_ptr) == SSA_NAME)
     new_dataref_ptr = copy_ssa_name (dataref_ptr);
   else if (is_gimple_min_invariant (dataref_ptr))