vect: Fix an ICE in vect_loop_versioning [PR95570]
In the test case for PR95570, the only data reference in the loop is a
gather-statter access. Scalar evolution analysis for this data reference
failed, so DR_STEP is NULL_TREE. This leads to the segmentation fault.
We should filter out scatter-gather access in vect_enhance_data_refs_alignment.
2020-06-12 Felix Yang <felix.yang@huawei.com>
gcc/
PR tree-optimization/95570
* tree-vect-data-refs.c (vect_relevant_for_alignment_p): New function.
(vect_verify_datarefs_alignment): Call it to filter out data references
in the loop whose alignment is irrelevant.
(vect_get_peeling_costs_all_drs): Likewise.
(vect_peeling_supportable): Likewise.
(vect_enhance_data_refs_alignment): Likewise.
gcc/testsuite/
PR tree-optimization/95570
* gcc.dg/vect/pr95570.c: New test.