mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2024-10-24 05:23:45 +02:00
cd290494fd
The current GVN algorithm folds unconditional branches to, it claims, expose more PRE oportunities. The folding, if really needed, (which is not sure, as it's not really proved it improves analysis) can be done by an earlier cleanup pass instead of GVN itself. Ack'ed/SGTM'd by Daniel Berlin. Differential Revision: https://reviews.llvm.org/D28117 llvm-svn: 290546
18 lines
316 B
LLVM
18 lines
316 B
LLVM
; RUN: opt < %s -newgvn -S | FileCheck %s
|
|
|
|
define i32 @main() {
|
|
block1:
|
|
%z1 = bitcast i32 0 to i32
|
|
br label %block2
|
|
block2:
|
|
%z2 = bitcast i32 0 to i32
|
|
ret i32 %z2
|
|
}
|
|
|
|
; CHECK: define i32 @main() {
|
|
; CHECK-NEXT: block1:
|
|
; CHECK-NEXT: br label %block2
|
|
; CHECK: block2:
|
|
; CHECK-NEXT: ret i32 0
|
|
; CHECK-NEXT: }
|