[llvm-commits] CVS: llvm/lib/Transforms/Utils/Local.cpp

Robert L. Bocchino Jr. bocchino at persephone.cs.uiuc.edu
Tue Jan 17 12:08:03 PST 2006



Changes in directory llvm/lib/Transforms/Utils:

Local.cpp updated: 1.50 -> 1.51
---
Log message:

Constant folding support for the insertelement operation.



---
Diffs of the changes:  (+3 -0)

 Local.cpp |    3 +++
 1 files changed, 3 insertions(+)


Index: llvm/lib/Transforms/Utils/Local.cpp
diff -u llvm/lib/Transforms/Utils/Local.cpp:1.50 llvm/lib/Transforms/Utils/Local.cpp:1.51
--- llvm/lib/Transforms/Utils/Local.cpp:1.50	Mon Jan 16 15:12:35 2006
+++ llvm/lib/Transforms/Utils/Local.cpp	Tue Jan 17 14:07:07 2006
@@ -104,6 +104,9 @@
     return 0;
   case Instruction::ExtractElement:
     return ConstantExpr::getExtractElement(Op0, Op1);
+  case Instruction::InsertElement:
+    if (Constant *Op2 = dyn_cast<Constant>(I->getOperand(2)))
+      return ConstantExpr::getInsertElement(Op0, Op1, Op2);
   case Instruction::GetElementPtr:
     std::vector<Constant*> IdxList;
     IdxList.reserve(I->getNumOperands()-1);






More information about the llvm-commits mailing list