The machine-copy-propagation pass collects all debug uses of instructions and then tries to propagate copies through them -- this includes DBG_PHIs, which can refer to COPYs in rare circumstances where tail duplication simplifies control flow. Such DBG_PHIs should also have copies propagated through them: update the helper utility to do so. I've added a DBG_PHI to an ARM test that tests this behaviour, i.e. that copies get propagated in debug instructions.
In addition, this patch also correctly sets the "debug-use" flag on DBG_PHIs when they're read from MIR files, which was previously being omitted. This is covered by the test, as copy propagation won't happen if there's a non-debug-use of the $r4.
Finally, call setIsDebug when DBG_PHIs are created in LiveDebugVariables. I, uh, don't know of a way to test for this, because "debug-use" doesn't seem to be printed by the MIR printer. Ouch.