VirtRegMap removes identity copies, but that leads to machine-verifier complaints if there is a def of a super reg as well.
I am not sure what the best fix is, but the patch attached seems to fix this by transforming the COPY to an IMPLICIT_DEF when there is a def of a super-reg. The patch assumes (arbitrarily) that there could only be one extra operand - not sure if this is always true...
I put this with a testcase on Bugzilla a while ago and would appreciate any review.
https://llvm.org/bugs/show_bug.cgi?id=27156