Revert "Temporarily do not drop volatile stores before unreachable"
This reverts commit 4e413e16216d0c94ada2171f3c59e0a85f4fa4b6,
which landed almost 10 months ago under premise that the original behavior
didn't match reality and was breaking users, even though it was correct as per
the LangRef. But the LangRef change still hasn't appeared, which might suggest
that the affected parties aren't really worried about this problem.
Please refer to discussion in:
- https://reviews.llvm.org/D87399 (Revert "[InstCombine] erase instructions leading up to unreachable")
- https://reviews.llvm.org/D53184 ([LangRef] Clarify semantics of volatile operations.)
- https://reviews.llvm.org/D87149 ([InstCombine] erase instructions leading up to unreachable)
clang has -Wnull-dereference which will diagnose the obvious cases
of null dereference, it was adjusted in f4877c78c0fc98be47b926439bbfe33d5e1d1b6d,
but it will only catch the cases where the pointer is a null literal,
it will not catch the cases where an arbitrary store is expected to trap.
Differential Revision: https://reviews.llvm.org/D105338