[NewGVN] Split OpPHI detection and creation.

It also adds a check making sure PHIs for operands are all in the same
block.

Patch by Daniel Berlin <dberlin@dberlin.org>

Reviewers: dberlin, davide

Differential Revision: https://reviews.llvm.org/D43865


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@330444 91177308-0d34-0410-b5e6-96231b3b80d8
2 files changed