Commit 5fa23466 by Richard Biener Committed by Richard Biener

tree-data-ref.c (dr_step_indicator): Handle NULL DR_STEP.

2018-06-21  Richard Biener  <rguenther@suse.de>

	* tree-data-ref.c (dr_step_indicator): Handle NULL DR_STEP.
	* tree-vect-data-refs.c (vect_analyze_possibly_independent_ddr):
	Avoid calling vect_mark_for_runtime_alias_test with gathers or scatters.
	(vect_analyze_data_ref_dependence): Re-order checks to deal with
	NULL DR_STEP.
	(vect_record_base_alignments): Do not record base alignment
	for gathers or scatters.
	(vect_compute_data_ref_alignment): Drop return value that is always
	true.  Bail out early for gathers or scatters.
	(vect_enhance_data_refs_alignment): Bail out early for gathers
	or scatters.
	(vect_find_same_alignment_drs): Likewise.
	(vect_analyze_data_refs_alignment): Remove dead code.
	(vect_slp_analyze_and_verify_node_alignment): Likewise.
	(vect_analyze_data_refs): For possible gathers or scatters do
	not create an alternate DR, just check their possible validity
	and mark them.  Adjust DECL_NONALIASED handling to not rely
	on DR_BASE_ADDRESS.
	* tree-vect-loop-manip.c (vect_update_inits_of_drs): Do not
	update inits of gathers or scatters.
	* tree-vect-patterns.c (vect_recog_mask_conversion_pattern):
	Also copy gather/scatter flag to pattern vinfo.

From-SVN: r261834
parent 1ac6620a
2018-06-21 Richard Biener <rguenther@suse.de>
* tree-data-ref.c (dr_step_indicator): Handle NULL DR_STEP.
* tree-vect-data-refs.c (vect_analyze_possibly_independent_ddr):
Avoid calling vect_mark_for_runtime_alias_test with gathers or scatters.
(vect_analyze_data_ref_dependence): Re-order checks to deal with
NULL DR_STEP.
(vect_record_base_alignments): Do not record base alignment
for gathers or scatters.
(vect_compute_data_ref_alignment): Drop return value that is always
true. Bail out early for gathers or scatters.
(vect_enhance_data_refs_alignment): Bail out early for gathers
or scatters.
(vect_find_same_alignment_drs): Likewise.
(vect_analyze_data_refs_alignment): Remove dead code.
(vect_slp_analyze_and_verify_node_alignment): Likewise.
(vect_analyze_data_refs): For possible gathers or scatters do
not create an alternate DR, just check their possible validity
and mark them. Adjust DECL_NONALIASED handling to not rely
on DR_BASE_ADDRESS.
* tree-vect-loop-manip.c (vect_update_inits_of_drs): Do not
update inits of gathers or scatters.
* tree-vect-patterns.c (vect_recog_mask_conversion_pattern):
Also copy gather/scatter flag to pattern vinfo.
2018-06-20 Kelvin Nilsen <kelvin@gcc.gnu.org> 2018-06-20 Kelvin Nilsen <kelvin@gcc.gnu.org>
* config/rs6000/rs6000-c.c (altivec_overloaded_builtins): Change * config/rs6000/rs6000-c.c (altivec_overloaded_builtins): Change
......
...@@ -5454,6 +5454,8 @@ static tree ...@@ -5454,6 +5454,8 @@ static tree
dr_step_indicator (struct data_reference *dr, int useful_min) dr_step_indicator (struct data_reference *dr, int useful_min)
{ {
tree step = DR_STEP (dr); tree step = DR_STEP (dr);
if (!step)
return NULL_TREE;
STRIP_NOPS (step); STRIP_NOPS (step);
/* Look for cases where the step is scaled by a positive constant /* Look for cases where the step is scaled by a positive constant
integer, which will often be the access size. If the multiplication integer, which will often be the access size. If the multiplication
......
...@@ -1752,7 +1752,11 @@ vect_update_inits_of_drs (loop_vec_info loop_vinfo, tree niters, ...@@ -1752,7 +1752,11 @@ vect_update_inits_of_drs (loop_vec_info loop_vinfo, tree niters,
} }
FOR_EACH_VEC_ELT (datarefs, i, dr) FOR_EACH_VEC_ELT (datarefs, i, dr)
vect_update_init_of_dr (dr, niters, code); {
gimple *stmt = DR_STMT (dr);
if (!STMT_VINFO_GATHER_SCATTER_P (vinfo_for_stmt (stmt)))
vect_update_init_of_dr (dr, niters, code);
}
} }
/* For the information recorded in LOOP_VINFO prepare the loop for peeling /* For the information recorded in LOOP_VINFO prepare the loop for peeling
......
...@@ -3848,6 +3848,8 @@ vect_recog_mask_conversion_pattern (vec<gimple *> *stmts, tree *type_out) ...@@ -3848,6 +3848,8 @@ vect_recog_mask_conversion_pattern (vec<gimple *> *stmts, tree *type_out)
= STMT_VINFO_DATA_REF (stmt_vinfo); = STMT_VINFO_DATA_REF (stmt_vinfo);
STMT_VINFO_DR_WRT_VEC_LOOP (pattern_stmt_info) STMT_VINFO_DR_WRT_VEC_LOOP (pattern_stmt_info)
= STMT_VINFO_DR_WRT_VEC_LOOP (stmt_vinfo); = STMT_VINFO_DR_WRT_VEC_LOOP (stmt_vinfo);
STMT_VINFO_GATHER_SCATTER_P (pattern_stmt_info)
= STMT_VINFO_GATHER_SCATTER_P (stmt_vinfo);
*type_out = vectype1; *type_out = vectype1;
stmts->safe_push (last_stmt); stmts->safe_push (last_stmt);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment