Add supprot for shufflevector
llvm-svn: 27513
diff --git a/llvm/lib/Transforms/Utils/Local.cpp b/llvm/lib/Transforms/Utils/Local.cpp
index a35a1a6..a848e74 100644
--- a/llvm/lib/Transforms/Utils/Local.cpp
+++ b/llvm/lib/Transforms/Utils/Local.cpp
@@ -107,6 +107,11 @@
case Instruction::InsertElement:
if (Constant *Op2 = dyn_cast<Constant>(I->getOperand(2)))
return ConstantExpr::getInsertElement(Op0, Op1, Op2);
+ return 0;
+ case Instruction::ShuffleVector:
+ if (Constant *Op2 = dyn_cast<Constant>(I->getOperand(2)))
+ return ConstantExpr::getShuffleVector(Op0, Op1, Op2);
+ return 0;
case Instruction::GetElementPtr:
std::vector<Constant*> IdxList;
IdxList.reserve(I->getNumOperands()-1);