Fix coro lowering of single predecessor phis
authorArnold Schwaighofer <aschwaighofer@apple.com>
Thu, 1 Apr 2021 22:51:56 +0000 (15:51 -0700)
committerArnold Schwaighofer <aschwaighofer@apple.com>
Tue, 6 Jul 2021 17:22:25 +0000 (10:22 -0700)
commit846a530e7db28bdd50c9a9fb08cddc210134b579
tree557146c120ab231f02b0763c677ec8e76ed55775
parentb298308ba2544a00c3e2ae0c1cc06fa058a4000c
Fix coro lowering of single predecessor phis

Code assumes that uses of single predecessor phis are not live accross
suspend points. Cleanup any single predecessor phis preceeding the code
making this assumption.

rdar://76020301

Differential Revision: https://reviews.llvm.org/D105488
llvm/lib/Transforms/Coroutines/CoroFrame.cpp
llvm/test/Transforms/Coroutines/coro-async-phi.ll [new file with mode: 0644]