[llvm-commits] [llvm] r172614 - /llvm/trunk/unittests/IR/InstructionsTest.cpp

Evgeniy Stepanov eugeni.stepanov at gmail.com
Wed Jan 16 06:38:50 PST 2013


Author: eugenis
Date: Wed Jan 16 08:38:50 2013
New Revision: 172614

URL: http://llvm.org/viewvc/llvm-project?rev=172614&view=rev
Log:
A test for r172535.

Modified:
    llvm/trunk/unittests/IR/InstructionsTest.cpp

Modified: llvm/trunk/unittests/IR/InstructionsTest.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/unittests/IR/InstructionsTest.cpp?rev=172614&r1=172613&r2=172614&view=diff
==============================================================================
--- llvm/trunk/unittests/IR/InstructionsTest.cpp (original)
+++ llvm/trunk/unittests/IR/InstructionsTest.cpp Wed Jan 16 08:38:50 2013
@@ -162,6 +162,11 @@
   ICmpInst *ICmp1 = new ICmpInst(ICmpInst::ICMP_ULT, PtrVecA, PtrVecB);
   EXPECT_NE(ICmp0, ICmp1); // suppress warning.
 
+  BasicBlock* BB0 = BasicBlock::Create(C);
+  // Test InsertAtEnd ICmpInst constructor.
+  ICmpInst *ICmp2 = new ICmpInst(*BB0, ICmpInst::ICMP_SGE, PtrVecA, PtrVecB);
+  EXPECT_NE(ICmp0, ICmp2); // suppress warning.
+
   GetElementPtrInst *Gep0 = GetElementPtrInst::Create(PtrVecA, C2xi32a);
   GetElementPtrInst *Gep1 = GetElementPtrInst::Create(PtrVecA, C2xi32b);
   GetElementPtrInst *Gep2 = GetElementPtrInst::Create(PtrVecB, C2xi32a);
@@ -223,6 +228,9 @@
   delete Gep2;
   delete Gep3;
 
+  ICmp2->eraseFromParent();
+  delete BB0;
+
   delete ICmp0;
   delete ICmp1;
   delete PtrVecA;





More information about the llvm-commits mailing list