[llvm-commits] CVS: llvm/lib/Linker/LinkModules.cpp
Chris Lattner
lattner at cs.uiuc.edu
Fri Apr 7 18:19:59 PDT 2006
Changes in directory llvm/lib/Linker:
LinkModules.cpp updated: 1.112 -> 1.113
---
Log message:
Add shufflevector support
---
Diffs of the changes: (+6 -0)
LinkModules.cpp | 6 ++++++
1 files changed, 6 insertions(+)
Index: llvm/lib/Linker/LinkModules.cpp
diff -u llvm/lib/Linker/LinkModules.cpp:1.112 llvm/lib/Linker/LinkModules.cpp:1.113
--- llvm/lib/Linker/LinkModules.cpp:1.112 Thu Apr 6 20:27:42 2006
+++ llvm/lib/Linker/LinkModules.cpp Fri Apr 7 20:19:47 2006
@@ -317,6 +317,12 @@
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);
More information about the llvm-commits
mailing list