I'm facing the issue that we have vector type dependent information stored in dr_vec_info (the misalignment at least) and that with BB vectorization (at least) we want to be able to access a DR group with two different vector types.
I've run into this with https://gcc.gnu.org/pipermail/gcc-patches/2020-June/547981.html and created the testcase https://gcc.gnu.org/pipermail/gcc-patches/2020-June/547987.html in response to the fallout. I'm thinking of ways to circumvent this issue. In the end when we're SLP only my idea was that the stmt_vec_info (and thus the embedded dr_vec_info) only contain data that is valid in all possible SLP contexts. While we still have both SLP and non-SLP paths the approach of duplicating things on the SLP node becomes too complicated in most cases. So one possible "fix" is to put conservative values in dr_vec_info - for the misalignment this means consider the values of the vector type with the largest target alignment. Another possible fix is to not store anything vector type dependent there but compute such info in the places where we need it which then need to pass the actual vector type used. Now - do you have other options? Do you see obvious other pieces that need similar treatment? Thanks, Richard.