llvm/test/Transforms/PredicateSimplifier/predsimplify.reg3.ll
Nick Lewycky 05450ae128 Add PredicateSimplifier pass. Collapses equal variables into one form
and simplifies expressions. This implements the optimization described
in PR807.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@29947 91177308-0d34-0410-b5e6-96231b3b80d8
2006-08-28 22:44:55 +00:00

22 lines
383 B
LLVM

; RUN: llvm-as < %s | opt -predsimplify -simplifycfg | llvm-dis | grep pass
void %regtest(int %x) {
entry:
%A = seteq int %x, 0
br bool %A, label %middle, label %after
middle:
br label %after
after:
%B = seteq int %x, 0
br bool %B, label %then, label %else
then:
br label %end
else:
call void (...)* %pass( )
br label %end
end:
ret void
}
declare void %pass(...)