+2018-12-20 Joern Rennecke <joern.rennecke@riscy-ip.com>
+
+ * tree-vect-data-refs.c (vect_enhance_data_refs_alignment): Don't do
+ versioning for data accesses with misaligned step.
+
2018-12-20 H.J. Lu <hongjiu.lu@intel.com>
PR c/51628
break;
}
+ /* Forcing alignment in the first iteration is no good if
+ we don't keep it across iterations. For now, just disable
+ versioning in this case.
+ ?? We could actually unroll the loop to archive the required
+ overall step alignemnt, and forcing the alignment could be
+ done by doing some iterations of the non-vectorized loop. */
+ if (!multiple_p (LOOP_VINFO_VECT_FACTOR (loop_vinfo)
+ * DR_STEP_ALIGNMENT (dr),
+ DR_TARGET_ALIGNMENT (dr)))
+ {
+ do_versioning = false;
+ break;
+ }
+
/* The rightmost bits of an aligned address must be zeros.
Construct the mask needed for this test. For example,
GET_MODE_SIZE for the vector mode V4SI is 16 bytes so the