Add a GVN pass, using the value numbering code I developed for GVNPRE and the

load elimination code from RedundantLoadElimination.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@40469 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Owen Anderson
2007-07-24 17:55:58 +00:00
parent bb862c042f
commit 1ad2cb7555
6 changed files with 850 additions and 0 deletions

View File

@ -0,0 +1,10 @@
; RUN: llvm-as < %s | opt -gvn | llvm-dis | not grep {%z2 =}
define i32 @main() {
block1:
%z1 = bitcast i32 0 to i32
br label %block2
block2:
%z2 = bitcast i32 0 to i32
ret i32 %z2
}