[IR] Revert r2694 in BasicBlock::removePredecessor
authorJay Foad <jay.foad@amd.com>
Mon, 18 May 2020 15:06:42 +0000 (16:06 +0100)
committerJay Foad <jay.foad@amd.com>
Mon, 18 May 2020 18:13:06 +0000 (19:13 +0100)
commitbdd8c111fc0d880eec57db860249f1707eed6982
treee0429b5f9ad0b64dd9cfedd21e42788137f20c92
parent31ecef76275158c87d63772a70fbc282d025e7ab
[IR] Revert r2694 in BasicBlock::removePredecessor

r2694 fixed a bug where removePredecessor could create IR with a use not
dominated by its def in a self loop. But this could only happen in an
unreachable loop, and since that time the rules have been relaxed so
that defs don't have to dominate uses in unreachable code, so the fix is
unnecessary. The regression test added in r2691 still stands.

Differential Revision: https://reviews.llvm.org/D80128
llvm/lib/IR/BasicBlock.cpp