This fix is for the problem from https://bugs.llvm.org/show_bug.cgi?id=38714.
Specifically, Simple Register Coalescing creates following conversion :
undef %0.sub_32:gpr64 = ORRWrs $wzr, %3:gpr32common, 0, debug-location !24;
It copies 32-bit value from gpr32 into gpr64. But Live DEBUG_VALUE analysis
is not able to create debug location record for that instruction. So the problem
is in that debug location for argc variable is incorrect. The fix is
to write custom isCopyInstrImpl() which would recognize the ORRWrs instr.
I don't think we'll produce an ORRXrs until after it's relevant here, but I guess it's safe enough.
You need to check that the instruction is actually a "mov"; it looks like you're correctly checking that the shift amount is zero, but you aren't checking that the other register is wzr/xzr.