EarlyCSE didn't try to salvage debug info during erasing of instructions. This fixes that.
I think the test case could probably be reduced a bit (is 'ctpop' necessary?), but apart from that, this looks good. @aprantl wdyt?
I'm under the impression this test case can be simplified. Can you give it a try?
@vsk I have updated it. 'ctpop' is not necessary, there can be other intrinsic (e.g. 'bswap'). Thanks for the comment!
Yes, I have updated it. Thank you for the comment!
LGTM modulo minor.
@djtodoro can you commit this or you need somebody to do it on your behalf?
@davide one of my colleagues will commit it