[analyzer] allow more local DCE and add some tests