This is simpler than using findRegisterDefOperandIdx() + setIsDead().
Review: Ulrich Weigand.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@371369
91177308-0d34-0410-b5e6-
96231b3b80d8
}
// CC is now live after MI.
- if (!ConvOpc) {
- int CCDef = MI.findRegisterDefOperandIdx(SystemZ::CC, false, true, TRI);
- assert(CCDef >= 0 && "Couldn't find CC set");
- MI.getOperand(CCDef).setIsDead(false);
- }
+ if (!ConvOpc)
+ MI.clearRegisterDeads(SystemZ::CC);
// Check if MI lies before Compare.
bool BeforeCmp = false;