From 9273b0403e992bbdf4f9e7c48f990c7658610b8a Mon Sep 17 00:00:00 2001 From: Chris Lattner Date: Sat, 8 Apr 2006 01:19:47 +0000 Subject: [PATCH] Add shufflevector support git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@27515 91177308-0d34-0410-b5e6-96231b3b80d8 --- lib/Linker/LinkModules.cpp | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/lib/Linker/LinkModules.cpp b/lib/Linker/LinkModules.cpp index c8ea03898e3..26f56a7ec1d 100644 --- a/lib/Linker/LinkModules.cpp +++ b/lib/Linker/LinkModules.cpp @@ -317,6 +317,12 @@ static Value *RemapOperand(const Value *In, Result = ConstantExpr::getInsertElement(cast(Ptr), cast(Elt), cast(Idx)); + } else if (CE->getOpcode() == Instruction::ShuffleVector) { + Value *V1 = RemapOperand(CE->getOperand(0), ValueMap); + Value *V2 = RemapOperand(CE->getOperand(1), ValueMap); + Result = ConstantExpr::getShuffleVector(cast(V1), + cast(V2), + cast(CE->getOperand(2))); } else if (CE->getNumOperands() == 1) { // Cast instruction assert(CE->getOpcode() == Instruction::Cast);