aboutsummaryrefslogtreecommitdiff
path: root/lib/Transforms/Utils/Local.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'lib/Transforms/Utils/Local.cpp')
-rw-r--r--lib/Transforms/Utils/Local.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/lib/Transforms/Utils/Local.cpp b/lib/Transforms/Utils/Local.cpp
index a35a1a69af..a848e7461e 100644
--- a/lib/Transforms/Utils/Local.cpp
+++ b/lib/Transforms/Utils/Local.cpp
@@ -107,6 +107,11 @@ Constant *llvm::ConstantFoldInstruction(Instruction *I) {
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);