PR14055: Implement support for sub-vector operations in SROA.
authorChandler Carruth <chandlerc@gmail.com>
Wed, 21 Nov 2012 08:16:30 +0000 (08:16 +0000)
committerChandler Carruth <chandlerc@gmail.com>
Wed, 21 Nov 2012 08:16:30 +0000 (08:16 +0000)
commit845b73c06f533e623c8b0eae0b059aec1b5ff4a0
treeb042449cafe3590e6961349d0802e508feb68b1f
parent72beaa6733b81b09efd9eeb63d5c8e63f95d8633
PR14055: Implement support for sub-vector operations in SROA.

Now if we can transform an alloca into a single vector value, but it has
subvector, non-element accesses, we form the appropriate shufflevectors
to allow SROA to proceed. This fixes PR14055 which pointed out a very
common pattern that SROA couldn't handle -- mixed vec3 and vec4
operations on a single alloca.

llvm-svn: 168418
llvm/lib/Transforms/Scalar/SROA.cpp
llvm/test/Transforms/SROA/vector-promotion.ll