fix two significant issues with FoldTwoEntryPHINode:

first, it can kick in on blocks whose conditions have been
folded to a constant, even though one of the edges will be
trivially folded.

second, it doesn't clean up the "if diamond" that it just 
eliminated away.  This is a problem because other simplifycfg
xforms kick in depending on the order of block visitation,
causing pointless work.

llvm-svn: 121762
2 files changed
tree: 44aa9a50884777619fc0ec906220222b8f46d666
  1. clang/
  2. compiler-rt/
  3. debuginfo-tests/
  4. libcxx/
  5. lldb/
  6. llvm/