This fixes bugs in copy elimination code in llvm. It slightly changes the
semantics of clearRegisterKills(). This is appropriate because:
- Users in lib/CodeGen/MachineCopyPropagation.cpp and lib/Target/AArch64RedundantCopyElimination.cpp and lib/Target/SystemZ/SystemZElimCompare.cpp are incorrect without it (see included testcase).
- All other users in llvm are unaffected (they pass TRI==nullptr)
- Kill flags are optional anyway.
As a compile-time optimization, would it make sense to perform the Reg == OpReg check before making the call to regsOverlap?