The PR112736 testcase fails on RISC-V because the aligned exception
uses the wrong check. The alignment support scheme can be
dr_aligned even when the access isn't aligned to the vector size
but some targets are happy with element alignment. The following
fixes that.
PR tree-optimization/113073
* tree-vect-stmts.cc (vectorizable_load): Properly ensure
to exempt only vector-size aligned overreads.
- (group_size * vf - gap), nunits))
/* DR will be unused. */
ltype = NULL_TREE;
- else if (alignment_support_scheme == dr_aligned)
+ else if (known_ge (vect_align,
+ tree_to_poly_uint64
+ (TYPE_SIZE_UNIT (vectype))))
/* Aligned access to excess elements is OK if
at least one element is accessed in the
scalar loop. */