mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-08-05 13:26:55 +00:00
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
This commit is contained in:
@@ -42,6 +42,11 @@ TEST(Local, RecursivelyDeleteDeadPHINodes) {
|
||||
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;
|
||||
|
Reference in New Issue
Block a user