When doing the peephole, we move the killed flag from srcMI to destMI without do more check,
this is not right.
For below example, %3 is in a loop, %2 is out of the loop.
bb1: %2:g8rc = RLDICL killed %1, 0, 32 bb2: %3:g8rc = RLDICR %2, 2, 61 // can fold to %3:g8rc = RLDIC %1, 2, 30, %1 shouldn't has the kill flag. ... BCC 4, $cr0, %bb.2
This patch uses the conservative method to set the kill flag.
It can fix 62 lnt erros and 22 lit errors.
Should we also consider SrcMI->getOperand(0) or legacy MI.getOperand(1) at least when MI and and SrcMI are in same BB?
We have a API fixupIsDeadOrKill for kill/dead flag fixup.