[X86][SSE] Fix for getScalarValueForVectorElement to detect scalar sources requiring...
authorSimon Pilgrim <llvm-dev@redking.me.uk>
Sun, 19 Apr 2015 22:16:49 +0000 (22:16 +0000)
committerSimon Pilgrim <llvm-dev@redking.me.uk>
Sun, 19 Apr 2015 22:16:49 +0000 (22:16 +0000)
commitca3e6fafc8a071a6654e546bd5e05ed7a6966dfa
tree4502b568da25896ec743caa689c79eaecd7b16e3
parente398eb753aab43321f67f55f59d37a517568e295
[X86][SSE] Fix for getScalarValueForVectorElement to detect scalar sources requiring truncation.

The fix ensures that scalar sources inserted into a vector are the correct bit size.

Integer scalar sources from BUILD_VECTOR and SCALAR_TO_VECTOR nodes may require truncation that this function doesn't currently support.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@235281 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Target/X86/X86ISelLowering.cpp
test/CodeGen/X86/fold-vector-shuffle-crash.ll [new file with mode: 0644]