This is to fix the problem here:
http://lists.llvm.org/pipermail/llvm-commits/Week-of-Mon-20160404/345537.html
The error is caused by that I didn't create live interval for the dummy register used in rematerialization. regalloc-verifier requires any vreg has a live interval, and because it is a dummy register without live range segment, verifier requires it to be marked as Dead.
However, rematerialization may copy the dead flag to the instruction cloned, which is incorrect. So I need to set the Dead flag to false before doing rematerialization and reset it to true after that.
This code feels so wrong.
I am okay if we would have to reset isDead to false for DestReg, since the remat may just clone the input, but we shouldn’t have to do a gymnastic with OrigMI.