summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Linker/LinkModules.cpp
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
commit0197e454d1993de526d2833039f7f1ff63abca30 (patch)
tree0788bf9abf146babd45d804848d1fa8ae1109361 /llvm/lib/Linker/LinkModules.cpp
parentaa3185f12e65ca65cfbd1b64f5e023227a933718 (diff)
downloadbcm5719-llvm-0197e454d1993de526d2833039f7f1ff63abca30.tar.gz
bcm5719-llvm-0197e454d1993de526d2833039f7f1ff63abca30.zip
Add shufflevector support
llvm-svn: 27515
Diffstat (limited to 'llvm/lib/Linker/LinkModules.cpp')
-rw-r--r--llvm/lib/Linker/LinkModules.cpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/llvm/lib/Linker/LinkModules.cpp b/llvm/lib/Linker/LinkModules.cpp
index c8ea03898e3..26f56a7ec1d 100644
--- a/llvm/lib/Linker/LinkModules.cpp
+++ b/llvm/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);
OpenPOWER on IntegriCloud