summaryrefslogtreecommitdiff
path: root/unittests/IR
diff options
context:
space:
mode:
authorEvgeniy Stepanov <eugeni.stepanov@gmail.com>2013-01-16 14:38:50 +0000
committerEvgeniy Stepanov <eugeni.stepanov@gmail.com>2013-01-16 14:38:50 +0000
commit4802b9d6dc7443985066f0381c0a2468f72f9b81 (patch)
tree07335efc506ca169e7e4dd708470bd12c678f19f /unittests/IR
parent9c79d0117392f681b12573b8a76765da844bcbe6 (diff)
downloadllvm-4802b9d6dc7443985066f0381c0a2468f72f9b81.tar.gz
llvm-4802b9d6dc7443985066f0381c0a2468f72f9b81.tar.bz2
llvm-4802b9d6dc7443985066f0381c0a2468f72f9b81.tar.xz
A test for r172535.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@172614 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'unittests/IR')
-rw-r--r--unittests/IR/InstructionsTest.cpp8
1 files changed, 8 insertions, 0 deletions
diff --git a/unittests/IR/InstructionsTest.cpp b/unittests/IR/InstructionsTest.cpp
index 601a84b2d1..5c3b43a0dc 100644
--- a/unittests/IR/InstructionsTest.cpp
+++ b/unittests/IR/InstructionsTest.cpp
@@ -162,6 +162,11 @@ TEST(InstructionsTest, VectorGep) {
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 @@ TEST(InstructionsTest, VectorGep) {
delete Gep2;
delete Gep3;
+ ICmp2->eraseFromParent();
+ delete BB0;
+
delete ICmp0;
delete ICmp1;
delete PtrVecA;