This patch fixes PR23405 (https://llvm.org/bugs/show_bug.cgi?id=23405).
During a node unscheduling an entry in LiveRegGens can be replaced with a new value. That corrupts the live reg tracking and LiveReg* structure is not cleared as should be during unscheduling. Problematic condition that enforces Gen replacement is I->getSUnit()->getHeight() < LiveRegGens[I->getReg()]->getHeight(). I don't know why it is needed but regression tests do not covert that case.
I went a bit more aggressive here replacing 2 other defensive checks with asserts.