X86: use getConstant rather than getTargetConstant behind BUILD_VECTOR.
authorTim Northover <tnorthover@apple.com>
Fri, 14 Nov 2014 01:30:14 +0000 (01:30 +0000)
committerTim Northover <tnorthover@apple.com>
Fri, 14 Nov 2014 01:30:14 +0000 (01:30 +0000)
commit4a7bbf4c293a3d660878668139ea2451ba1286fe
tree6b0891e92fccdc966cf9a9736592175d9125bb70
parented7bdcaf03fbb0a548bc8c13d035417a65155b54
X86: use getConstant rather than getTargetConstant behind BUILD_VECTOR.

getTargetConstant should only be used when you can guarantee the instruction
selected will be able to cope with the raw value. BUILD_VECTOR is rather too
generic for this so we should use getConstant instead. In that case, an
instruction can still consume the constant, but if it doesn't it'll be
materialised through its own round of ISel.

Should fix PR21352.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@221961 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Target/X86/X86ISelLowering.cpp
test/CodeGen/X86/vector-shuffle-128-v16.ll