[NewGVN] Add the pass to PassRegistry.def.

We need to hook up here to get it working with the new PM.
Add a test while here (and remove a typo).

llvm-svn: 290350
This commit is contained in:
Davide Italiano 2016-12-22 16:35:02 +00:00
parent ca3de8cd67
commit 3893354b16
4 changed files with 3 additions and 1 deletions

View File

@ -112,6 +112,7 @@
#include "llvm/Transforms/Scalar/MemCpyOptimizer.h"
#include "llvm/Transforms/Scalar/MergedLoadStoreMotion.h"
#include "llvm/Transforms/Scalar/NaryReassociate.h"
#include "llvm/Transforms/Scalar/NewGVN.h"
#include "llvm/Transforms/Scalar/PartiallyInlineLibCalls.h"
#include "llvm/Transforms/Scalar/Reassociate.h"
#include "llvm/Transforms/Scalar/SCCP.h"

View File

@ -164,6 +164,7 @@ FUNCTION_PASS("mem2reg", PromotePass())
FUNCTION_PASS("memcpyopt", MemCpyOptPass())
FUNCTION_PASS("mldst-motion", MergedLoadStoreMotionPass())
FUNCTION_PASS("nary-reassociate", NaryReassociatePass())
FUNCTION_PASS("newgvn", NewGVNPass())
FUNCTION_PASS("jump-threading", JumpThreadingPass())
FUNCTION_PASS("partially-inline-libcalls", PartiallyInlineLibCallsPass())
FUNCTION_PASS("lcssa", LCSSAPass())

View File

@ -1,6 +1,5 @@
; XFAIL: *
; RUN: opt < %s -newgvn -S | FileCheck %s
; RUN: opt < %s -passes=gvn -S | FileCheck %s
define i32 @main() {
block1:

View File

@ -1,4 +1,5 @@
; RUN: opt -newgvn -S -o - %s | FileCheck %s
; RUN: opt -passes=newgvn -S -o - %s | FileCheck %s
; If a branch has two identical successors, we cannot declare either dead.