[CoroSplit] Avoid self-replacement
authorNikita Popov <npopov@redhat.com>
Mon, 14 Mar 2022 12:52:59 +0000 (13:52 +0100)
committerNikita Popov <npopov@redhat.com>
Mon, 14 Mar 2022 12:53:31 +0000 (13:53 +0100)
commitce6ca00a92007a9104c040a402c4bd2b8e1dfcd7
tree149fb6c53a5326f166007246b8216d2e0eae0ca9
parent6ca2f1938f96a71abdecdd96508f48e4d20a5694
[CoroSplit] Avoid self-replacement

With opaque pointers, the bitcast might be a no-op, and this can
end up trying to replace a value with itself, which is illegal.
llvm/lib/Transforms/Coroutines/CoroSplit.cpp
llvm/test/Transforms/Coroutines/coro-split-recursive.ll