1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-11-23 11:13:28 +01:00
llvm-mirror/test/Transforms/NewGVN/pr24397.ll
Davide Italiano bd0298b1e1 [GVN] Initial check-in of a new global value numbering algorithm.
The code have been developed by Daniel Berlin over the years, and
the new implementation goal is that of addressing shortcomings of
the current GVN infrastructure, i.e. long compile time for large
testcases, lack of phi predication, no load/store value numbering
etc...

The current code just implements the "core" GVN algorithm, although
other pieces (load coercion, phi handling, predicate system) are
already implemented in a branch out of tree. Once the core is stable,
we'll start adding pieces on top of the base framework.
The test currently living in test/Transform/NewGVN are a copy
of the ones in GVN, with proper `XFAIL` (missing features in NewGVN).
A flag will be added in a future commit to enable NewGVN, so that
interested parties can exercise this code easily.

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

llvm-svn: 290346
2016-12-22 16:03:48 +00:00

19 lines
489 B
LLVM

; RUN: opt -basicaa -newgvn -disable-output < %s
target triple = "x86_64-unknown-linux-gnu"
define i64 @foo(i64** %arrayidx) {
entry:
%p = load i64*, i64** %arrayidx, align 8
%cmpnull = icmp eq i64* %p, null
br label %BB2
entry2: ; No predecessors!
br label %BB2
BB2: ; preds = %entry2, %entry
%bc = bitcast i64** %arrayidx to i64*
%load = load i64, i64* %bc, align 8
ret i64 %load
}