Calls that aren't willreturn should not be eliminated, as this may remove an infinite loop. In languages where infinite side-effect free loops are undefined behavior, willreturn is inferred from readnone+mustprogress by D94502. Such languages should see no regressions from this change. For languages where infinite loops are well-defined, D94633 infers willreturn for straight-line code.
This patch is a slightly more conservative variation on D94106 which assumes that intrinsics are willreturn, as most target intrinsics have not been properly annotated yet, and we don't want to break DCE for them.
In conjunction with the recently implemented willreturn inference, I hope this is conservative enough to land before LLVM 12 branches.