Added support for the extractelement operation.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@25181 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Robert Bocchino
2006-01-10 19:05:34 +00:00
parent 56107e21a5
commit b52ee7f5ff
6 changed files with 156 additions and 81 deletions

View File

@@ -102,6 +102,8 @@ Constant *llvm::ConstantFoldInstruction(Instruction *I) {
if (Constant *Op2 = dyn_cast<Constant>(I->getOperand(2)))
return ConstantExpr::getSelect(Op0, Op1, Op2);
return 0;
case Instruction::ExtractElement:
return ConstantExpr::getExtractElement(Op0, Op1);
case Instruction::GetElementPtr:
std::vector<Constant*> IdxList;
IdxList.reserve(I->getNumOperands()-1);