tree-optimization/106228 - fix vect_setup_realignment virtual SSA handling
The following adds missing assignment of a virtual use operand to a created load to vect_setup_realignment which shows as bootstrap failure on powerpc64-linux and extra testsuite fails for targets when misaligned loads are not supported or not optimal. PR tree-optimization/106228 * tree-vect-data-refs.cc (vect_setup_realignment): Properly set a VUSE operand on the emitted load.
This commit is contained in:
parent
0a7e721a64
commit
79f18ac6b7
1 changed files with 8 additions and 0 deletions
|
@ -5780,6 +5780,13 @@ vect_setup_realignment (vec_info *vinfo, stmt_vec_info stmt_info,
|
|||
if (loop_for_initial_load)
|
||||
pe = loop_preheader_edge (loop_for_initial_load);
|
||||
|
||||
tree vuse;
|
||||
gphi *vphi = get_virtual_phi (loop_for_initial_load->header);
|
||||
if (vphi)
|
||||
vuse = PHI_ARG_DEF_FROM_EDGE (vphi, pe);
|
||||
else
|
||||
vuse = gimple_vuse (gsi_stmt (*gsi));
|
||||
|
||||
/* 3. For the case of the optimized realignment, create the first vector
|
||||
load at the loop preheader. */
|
||||
|
||||
|
@ -5813,6 +5820,7 @@ vect_setup_realignment (vec_info *vinfo, stmt_vec_info stmt_info,
|
|||
new_stmt = gimple_build_assign (vec_dest, data_ref);
|
||||
new_temp = make_ssa_name (vec_dest, new_stmt);
|
||||
gimple_assign_set_lhs (new_stmt, new_temp);
|
||||
gimple_set_vuse (new_stmt, vuse);
|
||||
if (pe)
|
||||
{
|
||||
new_bb = gsi_insert_on_edge_immediate (pe, new_stmt);
|
||||
|
|
Loading…
Add table
Reference in a new issue