tree-optimization/106387 - properly create SSA name for realigned load

The following fixes an oversight triggering after the recent change
to bump_vector_ptr.

	PR tree-optimization/106387
	* tree-vect-stmts.cc (vectorizable_load): Use make_ssa_name
	if ptr is not an SSA name.
This commit is contained in:
Richard Biener 2022-07-22 09:00:37 +02:00
parent aaf9583d4c
commit 3c4af0f054

View File

@ -10017,7 +10017,10 @@ vectorizable_load (vec_info *vinfo,
(NULL_TREE, BIT_AND_EXPR, ptr,
build_int_cst
(TREE_TYPE (ptr), -(HOST_WIDE_INT) align));
ptr = copy_ssa_name (ptr, new_stmt);
if (TREE_CODE (ptr) == SSA_NAME)
ptr = copy_ssa_name (ptr, new_stmt);
else
ptr = make_ssa_name (TREE_TYPE (ptr), new_stmt);
gimple_assign_set_lhs (new_stmt, ptr);
vect_finish_stmt_generation (vinfo, stmt_info,
new_stmt, gsi);