summaryrefslogtreecommitdiff
path: root/lib/Linker
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2006-04-08 01:19:47 +0000
committerChris Lattner <sabre@nondot.org>2006-04-08 01:19:47 +0000
commit9273b0403e992bbdf4f9e7c48f990c7658610b8a (patch)
tree0e8ad8e53854df8ed42d862e4ae297311f96ed1b /lib/Linker
parent67f13514984c71f80cedf32b698e585a68bcf3e0 (diff)
downloadllvm-9273b0403e992bbdf4f9e7c48f990c7658610b8a.tar.gz
llvm-9273b0403e992bbdf4f9e7c48f990c7658610b8a.tar.bz2
llvm-9273b0403e992bbdf4f9e7c48f990c7658610b8a.tar.xz
Add shufflevector support
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@27515 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Linker')
-rw-r--r--lib/Linker/LinkModules.cpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/lib/Linker/LinkModules.cpp b/lib/Linker/LinkModules.cpp
index c8ea03898e..26f56a7ec1 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<Constant>(Ptr),
cast<Constant>(Elt),
cast<Constant>(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<Constant>(V1),
+ cast<Constant>(V2),
+ cast<Constant>(CE->getOperand(2)));
} else if (CE->getNumOperands() == 1) {
// Cast instruction
assert(CE->getOpcode() == Instruction::Cast);