llvm.org GIT mirror llvm / release_20 test / Transforms / LICM / 2003-12-11-SinkingToPHI.ll
release_20

Tree @release_20 (Download .tar.gz)

2003-12-11-SinkingToPHI.ll @release_20raw · history · blame

; RUN: llvm-upgrade < %s | llvm-as | opt -licm | lli

implementation   ; Functions:

int %main() {
entry:
	br label %Loop

Loop:
	br bool true, label %LoopCont, label %Out
LoopCont:
	%X = add int 1, 0
	br bool true, label %Out, label %Loop

Out:
	%V = phi int [ 2, %Loop], [ %X, %LoopCont]
	%V2 = sub int %V, 1
	ret int %V2
}