Vectors with different number of elements of the same element type can have
authorMon P Wang <wangmp@apple.com>
Wed, 13 Apr 2011 21:40:02 +0000 (21:40 +0000)
committerMon P Wang <wangmp@apple.com>
Wed, 13 Apr 2011 21:40:02 +0000 (21:40 +0000)
commitbe0761c8202405cdd33f1103d262c0aa97895a8e
treebc5c8de29e9cc35e63549adaca085e042bffdd4d
parent6c7e4147dc7faf2f7b4bdaaf7940c2fe65d6fbc5
Vectors with different number of elements of the same element type can have
the same allocation size but different primitive sizes(e.g., <3xi32> and
<4xi32>).  When ScalarRepl promotes them, it can't use a bit cast but
should use a shuffle vector instead.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@129472 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Transforms/Scalar/ScalarReplAggregates.cpp
test/Transforms/ScalarRepl/vector_promote.ll