Make RecursivelyDeleteDeadPHINode delete a phi node that has no users and add a
test for that. With this change, test/CodeGen/X86/codegen-dce.ll no longer finds
any instructions to DCE, so delete the test.

Also renamed J and JP to I and IP in RecursivelyDeleteDeadPHINode.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@126088 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/unittests/Transforms/Utils/Local.cpp b/unittests/Transforms/Utils/Local.cpp
index e969e95..2de09ad 100644
--- a/unittests/Transforms/Utils/Local.cpp
+++ b/unittests/Transforms/Utils/Local.cpp
@@ -42,6 +42,11 @@
   EXPECT_EQ(&bb0->front(), br0);
   EXPECT_EQ(&bb1->front(), br1);
 
+  builder.SetInsertPoint(bb0);
+  phi = builder.CreatePHI(Type::getInt32Ty(C));
+
+  EXPECT_TRUE(RecursivelyDeleteDeadPHINode(phi));
+
   bb0->dropAllReferences();
   bb1->dropAllReferences();
   delete bb0;