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)
commit07df765e65204203f0185a7a243e5ec3a5c4b21c
treedbe0eaf334e6ac487019d287213ef39e02d6c846
parent96487825529d67f68f22a7a59a3634d929ce1bfb
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.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@168418 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Transforms/Scalar/SROA.cpp
test/Transforms/SROA/vector-promotion.ll