Files
llvm-6502/test/Transforms/ValuePropagation/phi.ll
Owen Anderson a0b59f6bd2 Add a prototype of a new peephole optimizing pass that uses LazyValue info to simplify PHIs and select's.
This pass addresses the missed optimizations from PR2581 and PR4420.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@112325 91177308-0d34-0410-b5e6-96231b3b80d8
2010-08-27 23:31:36 +00:00

17 lines
388 B
LLVM

; RUN: opt < %s -value-propagation -S | FileCheck %s
; PR2581
; CHECK: @run
define i32 @run(i1 %C) nounwind {
br i1 %C, label %exit, label %body
body: ; preds = %0
; CHECK-NOT: select
%A = select i1 %C, i32 10, i32 11 ; <i32> [#uses=1]
; CHECK: ret i32 11
ret i32 %A
exit: ; preds = %0
; CHECK: ret i32 10
ret i32 10
}