[InstCombine] Temporarily do not drop volatile stores before unreachable
authorNikita Popov <nikita.ppv@gmail.com>
Thu, 10 Sep 2020 14:16:44 +0000 (16:16 +0200)
committerNikita Popov <nikita.ppv@gmail.com>
Thu, 10 Sep 2020 14:16:44 +0000 (16:16 +0200)
commit4e413e16216d0c94ada2171f3c59e0a85f4fa4b6
tree673ce3e4757b81b9a5887be4780b528d3f7106ae
parent52f42720b26a32c9dffc9331841415442f784700
[InstCombine] Temporarily do not drop volatile stores before unreachable

See discussion in D87149. Dropping volatile stores here is legal
per LLVM semantics, but causes issues for real code and may result
in a change to LLVM volatile semantics. Temporarily treat volatile
stores as "not guaranteed to transfer execution" in just this place,
until this issue has been resolved.
llvm/lib/Transforms/InstCombine/InstructionCombining.cpp
llvm/test/Transforms/InstCombine/volatile_store.ll