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);



_______________________________________________
llvm-commits mailing list
llvm-commits@cs.uiuc.edu
http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits

Reply via email to