diff options
author | John Criswell <criswell@uiuc.edu> | 2004-08-13 18:52:00 +0000 |
---|---|---|
committer | John Criswell <criswell@uiuc.edu> | 2004-08-13 18:52:00 +0000 |
commit | 32e813e486c656ed17c5df6650581100bf2b876a (patch) | |
tree | 1250278f11c32eabf3933ef603bf4d5090677ba5 /llvm/lib/Transforms/Utils/ValueMapper.cpp | |
parent | b6a9b36e214868358c4f2515173e86f481957d8d (diff) | |
download | llvm-32e813e486c656ed17c5df6650581100bf2b876a.zip llvm-32e813e486c656ed17c5df6650581100bf2b876a.tar.gz llvm-32e813e486c656ed17c5df6650581100bf2b876a.tar.bz2 |
Merged from mainline.llvmorg-1.3.0release/1.3.x
llvm-svn: 15723
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 72ce4ae..d7507f9 100644 --- a/llvm/lib/Transforms/Utils/ValueMapper.cpp +++ b/llvm/lib/Transforms/Utils/ValueMapper.cpp @@ -81,6 +81,11 @@ Value *llvm::MapValue(const Value *V, std::map<const Value*, Value*> &VM) { for (unsigned i = 1, e = CE->getNumOperands(); i != e; ++i) Idx.push_back(cast<Constant>(MapValue(CE->getOperand(i), VM))); return VMSlot = ConstantExpr::getGetElementPtr(MV, Idx); + } else if (CE->getOpcode() == Instruction::Select) { + Constant *MV1 = cast<Constant>(MapValue(CE->getOperand(0), VM)); + Constant *MV2 = cast<Constant>(MapValue(CE->getOperand(1), VM)); + Constant *MV3 = cast<Constant>(MapValue(CE->getOperand(2), VM)); + return VMSlot = ConstantExpr::getSelect(MV1, MV2, MV3); } else { assert(CE->getNumOperands() == 2 && "Must be binary operator?"); Constant *MV1 = cast<Constant>(MapValue(CE->getOperand(0), VM)); |