Remove unreachable blocks before splitting a coroutine.
authorJohn McCall <rjmccall@apple.com>
Wed, 14 Aug 2019 03:54:13 +0000 (03:54 +0000)
committerJohn McCall <rjmccall@apple.com>
Wed, 14 Aug 2019 03:54:13 +0000 (03:54 +0000)
commit5f60b68c68c00137304be0e0016e43d02066b2fd
tree5cfe77c1c5753aecbb8884e01260c0cb9ec808e4
parent2133feec933ea7311ee74ee39a5e6a0bcfaef822
Remove unreachable blocks before splitting a coroutine.

The suspend-crossing algorithm is not correct in the presence of uses
that cannot be reached on some successor path from their defs.

llvm-svn: 368796
clang/test/CodeGenCoroutines/coro-retcon-unreachable.ll [new file with mode: 0644]
llvm/lib/Transforms/Coroutines/CoroSplit.cpp