From 9e1f3bd1bd74c65056c4f30428b1bd3152a581bf Mon Sep 17 00:00:00 2001 From: Jonas Paulsson Date: Thu, 8 Oct 2015 07:39:55 +0000 Subject: [PATCH] [SystemZ] Minor fixes in SystemZElimCompare.cpp Reviewed by Ulrich Weigand. llvm-svn: 249662 --- llvm/lib/Target/SystemZ/SystemZElimCompare.cpp | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/llvm/lib/Target/SystemZ/SystemZElimCompare.cpp b/llvm/lib/Target/SystemZ/SystemZElimCompare.cpp index 16f9adc79f17..d26e40b4791f 100644 --- a/llvm/lib/Target/SystemZ/SystemZElimCompare.cpp +++ b/llvm/lib/Target/SystemZ/SystemZElimCompare.cpp @@ -205,7 +205,7 @@ SystemZElimCompare::convertToBRCT(MachineInstr *MI, MachineInstr *Compare, .addOperand(MI->getOperand(1)) .addOperand(Target) .addReg(SystemZ::CC, RegState::ImplicitDefine); - MI->removeFromParent(); + MI->eraseFromParent(); return true; } @@ -439,17 +439,16 @@ bool SystemZElimCompare::processBlock(MachineBasicBlock &MBB) { (optimizeCompareZero(MI, CCUsers) || fuseCompareAndBranch(MI, CCUsers))) { ++MBBI; - MI->removeFromParent(); + MI->eraseFromParent(); Changed = true; CCUsers.clear(); - CompleteCCUsers = true; continue; } Reference CCRefs(getRegReferences(MI, SystemZ::CC)); if (CCRefs.Def) { CCUsers.clear(); - CompleteCCUsers = !CCRefs.IndirectDef; + CompleteCCUsers = true; } if (CompleteCCUsers && CCRefs.Use) CCUsers.push_back(MI);