Change instcombine's getShuffleMask to represent undef with negative values.
authorBob Wilson <bob.wilson@apple.com>
Fri, 29 Oct 2010 22:03:05 +0000 (22:03 +0000)
committerBob Wilson <bob.wilson@apple.com>
Fri, 29 Oct 2010 22:03:05 +0000 (22:03 +0000)
commit822cb58d087ab67804037807e130273481b86137
tree615e77dbe1edd2ba92973d3a4b39848a5d0094a9
parent46455096bea2b6c81bb4b0226701524d2a9eb242
Change instcombine's getShuffleMask to represent undef with negative values.
This code had previously used 2*N, where N is the mask length, to represent
undef.  That is not safe because the shufflevector operands may have more
than N elements -- they don't have to match the result type.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@117721 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Transforms/InstCombine/InstCombineVectorOps.cpp
test/Transforms/InstCombine/vec_shuffle.ll