*FINALLY* Fix a really nasty nondeterministic bug that has been haunting us
authorChris Lattner <sabre@nondot.org>
Mon, 21 Jun 2004 07:19:01 +0000 (07:19 +0000)
committerChris Lattner <sabre@nondot.org>
Mon, 21 Jun 2004 07:19:01 +0000 (07:19 +0000)
commit2636c1be17c384993c25e9fe1e61a76cee157aa1
treef89d634a73e1ed1ae63c7ebb621eac14c541ce45
parent30c02f7eff8ab4a3bdc56957546abb41b0a52d3e
*FINALLY* Fix a really nasty nondeterministic bug that has been haunting us
since May 1st.  In this code, the pred iterator was being invalidated sometimes
causing the wrong entries to be added to PHI nodes.

The fix for this is to defererence and safe the *PI value before we hack on
branch instructions, which changes use/def chains, which SOMETIMES invalidates
the iterator.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@14278 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Transforms/Utils/SimplifyCFG.cpp