Fixed a failure in getSpaltValue()

llvm-svn: 254409
This commit is contained in:
Elena Demikhovsky 2015-12-01 12:30:40 +00:00
parent ce52715df6
commit 9e2f96fa49

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)