summaryrefslogtreecommitdiff
path: root/lib/Target/SystemZ
diff options
context:
space:
mode:
authorJonas Paulsson <jonas.paulsson@ericsson.com>2015-10-08 07:39:55 +0000
committerJonas Paulsson <jonas.paulsson@ericsson.com>2015-10-08 07:39:55 +0000
commit41c6cf387c9d5ac2685c28f9e708b87d7b066a8e (patch)
tree24ab9f536e55f1f5e4814e68485089ff9b3c19aa /lib/Target/SystemZ
parent96d2d44e70c52c409c4ec2975fbda76c8e4f7394 (diff)
downloadllvm-41c6cf387c9d5ac2685c28f9e708b87d7b066a8e.tar.gz
[SystemZ] Minor fixes in SystemZElimCompare.cpp
Reviewed by Ulrich Weigand. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@249662 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Target/SystemZ')
-rw-r--r--lib/Target/SystemZ/SystemZElimCompare.cpp7
1 files changed, 3 insertions, 4 deletions
diff --git a/lib/Target/SystemZ/SystemZElimCompare.cpp b/lib/Target/SystemZ/SystemZElimCompare.cpp
index 16f9adc79f17..d26e40b4791f 100644
--- a/lib/Target/SystemZ/SystemZElimCompare.cpp
+++ b/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);