DataLayout should use itself when calculating the size of a vector.
authorHal Finkel <hfinkel@anl.gov>
Sun, 21 Oct 2012 20:38:03 +0000 (20:38 +0000)
committerHal Finkel <hfinkel@anl.gov>
Sun, 21 Oct 2012 20:38:03 +0000 (20:38 +0000)
commit8884dc323f3dc215554a9275bc2f9bebf944e1cf
treeeafedbe44dc18880f3462fc6cd4ce3e92b4116d1
parent720ae09c00f36243e0d91c86255942d1b5a10593
DataLayout should use itself when calculating the size of a vector.

This is important for vectors of pointers because only DataLayout,
not the underlying vector type, knows how to calculate the size
of the pointers in the vector. Fixes PR14138.

llvm-svn: 166401
llvm/lib/VMCore/DataLayout.cpp
llvm/test/Transforms/BBVectorize/simple-ldstr-ptrs.ll