Currently, all of our builtin vector types are equivalent to char for TBAA purposes. It would be useful to make this less conservative. This patch makes vector types equivalent to their element types for type-aliasing purposes. I think it's common for programmers to assume that they can cast freely between the vector types and the scalar types (so long as they're being sufficiently careful about alignments), and we should certainly preserve that model. Given that we assume that int* and float* don't alias, I don't think we need to assume that int* and vec_of_float* alias or vec_of_int* and vec_of_float* alias.
The cases I've seen where I know this would be helpful involve integral scalar pointers and floating-point vector pointers, so I'm generalizing a bit here. If this would break too much code, one option is fall back to doing this only for floating-point types. That having been said, I know that it is common on some platforms to case between floating-point vectors and integer vectors in order to implement operations like fabs, and maybe that makes this untenable on those platforms?
Thoughts?