Last of the major pieces to NewGVN - yay!
authorDaniel Berlin <dberlin@dberlin.org>
Fri, 19 May 2017 19:01:27 +0000 (19:01 +0000)
committerDaniel Berlin <dberlin@dberlin.org>
Fri, 19 May 2017 19:01:27 +0000 (19:01 +0000)
commitb527b2cf13fa904fe9d95f1b654f9e460f1c52e0
treeb9635cca1f0bc402f302536066fdd8752f0fcda8
parentff15200b1d36f76059e966eb3abe3cf7abb37898
Last of the major pieces to NewGVN - yay!

Summary:
NewGVN: Handle equivalence between phi of ops and op of phis.

This makes our GVN mostly-complete. It would be complete, modulo some
deliberate choices we make.  This means it detects roughly all herband
equivalences in polynomial time, including cases notoriously hard for
other GVN's to detect.  It also detects a very large swath of the
cases we currently rely on instcombine to detect that involve folding
upwards through phis.

Fixes PR 31125, 31463, PR 31868

Reviewers: davide

Subscribers: Prazek, llvm-commits

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

llvm-svn: 303444
llvm/lib/Transforms/Scalar/NewGVN.cpp
llvm/test/Transforms/NewGVN/completeness.ll [new file with mode: 0644]
llvm/test/Transforms/NewGVN/storeoverstore.ll