[PATCH] D32260: [TBAA] Vector types should (only) alias with their element types

Hal Finkel via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Wed Apr 19 20:52:36 PDT 2017


hfinkel abandoned this revision.
hfinkel added a comment.

@rjmccall said, on this topic, in https://reviews.llvm.org/D31885:

> The root problem there is that the design of vector types and vector interfaces is generally quite bad; you cannot rely on things like vectors being stored with an appropriate element type for whatever value the user is actually trying to work with.



> For example, Clang's xmmintrin.h specifies that __m128 is a vector of 4 ints.  How confident are you that that type is never used to store a vector of 4 floats?  Keep in mind that the compiler allows __m128 to freely implicitly convert to __v4sf.

And I think he's right; we probably can't do this in general. vector types really are just bags of bits on many platforms ;)


https://reviews.llvm.org/D32260





More information about the cfe-commits mailing list