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 | 17bd60588c2c2ccf704f705953b60308c0378410 (patch) | |
| tree | acfbf18129660ddc5cf913fd0f7d1cfbcfe88edd /llvm/lib/Transforms/Utils/ValueMapper.cpp | |
| parent | 9ff96a70f2c803b7717b228a1765ecf6da77d22e (diff) | |
| download | bcm5719-llvm-17bd60588c2c2ccf704f705953b60308c0378410.tar.gz bcm5719-llvm-17bd60588c2c2ccf704f705953b60308c0378410.zip | |
Add supprot for shufflevector
llvm-svn: 27513
Diffstat (limited to 'llvm/lib/Transforms/Utils/ValueMapper.cpp')
| -rw-r--r-- | llvm/lib/Transforms/Utils/ValueMapper.cpp | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/llvm/lib/Transforms/Utils/ValueMapper.cpp b/llvm/lib/Transforms/Utils/ValueMapper.cpp index 3093acafab2..b309f9c0e2a 100644 --- a/llvm/lib/Transforms/Utils/ValueMapper.cpp +++ b/llvm/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)); |

