summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Target/SystemZ/SystemZElimCompare.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'llvm/lib/Target/SystemZ/SystemZElimCompare.cpp')
-rw-r--r--llvm/lib/Target/SystemZ/SystemZElimCompare.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/llvm/lib/Target/SystemZ/SystemZElimCompare.cpp b/llvm/lib/Target/SystemZ/SystemZElimCompare.cpp
index 66509553714..1c791b6521d 100644
--- a/llvm/lib/Target/SystemZ/SystemZElimCompare.cpp
+++ b/llvm/lib/Target/SystemZ/SystemZElimCompare.cpp
@@ -216,7 +216,7 @@ SystemZElimCompare::convertToBRCT(MachineInstr *MI, MachineInstr *Compare,
.addOperand(MI->getOperand(0))
.addOperand(MI->getOperand(1))
.addOperand(Target)
- .addReg(SystemZ::CC, RegState::ImplicitDefine);
+ .addReg(SystemZ::CC, RegState::ImplicitDefine | RegState::Dead);
MI->eraseFromParent();
return true;
}
@@ -448,7 +448,7 @@ fuseCompareAndBranch(MachineInstr *Compare,
// to a non-fused branch because of a long displacement. Conditional
// returns don't have that problem.
MIB.addOperand(Target)
- .addReg(SystemZ::CC, RegState::ImplicitDefine);
+ .addReg(SystemZ::CC, RegState::ImplicitDefine | RegState::Dead);
}
if (Type == SystemZII::CompareAndSibcall)
OpenPOWER on IntegriCloud