Fixed a failure in getSpaltValue()

llvm-svn: 254409
This commit is contained in:
Elena Demikhovsky 2015-12-01 12:30:40 +00:00
parent 0781d7b2b4
commit 47fa271a9b
1 changed files with 2 additions and 1 deletions

View File

@ -420,7 +420,8 @@ Value *llvm::findScalarElement(Value *V, unsigned EltNo) {
const llvm::Value *llvm::getSplatValue(const Value *V) {
if (auto *C = dyn_cast<Constant>(V))
return C->getSplatValue();
if (isa<VectorType>(V->getType()))
return C->getSplatValue();
auto *ShuffleInst = dyn_cast<ShuffleVectorInst>(V);
if (!ShuffleInst)