diff options
author | Chris Lattner <sabre@nondot.org> | 2006-04-08 01:19:12 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2006-04-08 01:19:12 +0000 |
commit | 543abdf1d0914228899061b36674fb1c6234aaff (patch) | |
tree | 48648b021651397af528f3d20e21f1def1eb0065 /lib/Transforms/Utils/ValueMapper.cpp | |
parent | d5efe846468b193df4a6870cfd4d8493d95a2561 (diff) |
Add supprot for shufflevector
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@27513 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Transforms/Utils/ValueMapper.cpp')
-rw-r--r-- | lib/Transforms/Utils/ValueMapper.cpp | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/lib/Transforms/Utils/ValueMapper.cpp b/lib/Transforms/Utils/ValueMapper.cpp index 3093acafab..b309f9c0e2 100644 --- a/lib/Transforms/Utils/ValueMapper.cpp +++ b/lib/Transforms/Utils/ValueMapper.cpp @@ -94,6 +94,11 @@ Value *llvm::MapValue(const Value *V, std::map<const Value*, Value*> &VM) { Constant *MV1 = cast<Constant>(MapValue(CE->getOperand(0), VM)); Constant *MV2 = cast<Constant>(MapValue(CE->getOperand(1), VM)); return VMSlot = ConstantExpr::getExtractElement(MV1, MV2); + } else if (CE->getOpcode() == Instruction::ShuffleVector) { + Constant *MV1 = cast<Constant>(MapValue(CE->getOperand(0), VM)); + Constant *MV2 = cast<Constant>(MapValue(CE->getOperand(1), VM)); + Constant *MV3 = cast<Constant>(CE->getOperand(2)); + return VMSlot = ConstantExpr::getShuffleVector(MV1, MV2, MV3); } else { assert(CE->getNumOperands() == 2 && "Must be binary operator?"); Constant *MV1 = cast<Constant>(MapValue(CE->getOperand(0), VM)); |