Hi,
It has been discovered that SystemZTargetLowering::emitSelect() calls erase() on a range of instructions on the wrong MBB, without any assert triggering with seemingly correct behaviour (!). StartMBB->erase() should be JoinMBB->erase() since that's where the SelectPseudo(s) will reside.
I am not sure why this "works" at the moment, or why there is not an assert checking for this. I made a patch to add asserts in erase() and remove() methods (attached), but found no other cases, though.
Is there a reason this is not asserted in ilist?
/Jonas
latest.patch (2.3 KB)