1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-10-28 14:32:51 +01:00
llvm-mirror/test/Regression/Transforms/SimplifyCFG/2003-08-17-BranchFold.ll
Chris Lattner 24fe70b3de New testcase
llvm-svn: 7918
2003-08-17 19:29:34 +00:00

21 lines
424 B
LLVM

; This test checks to make sure that 'br X, Dest, Dest' is folded into
; 'br Dest'
; RUN: as < %s | opt -simplifycfg | dis | not grep 'br bool %c2'
declare void %noop()
int %test(bool %c1, bool %c2) {
call void %noop()
br bool %c1, label %A, label %Y
A:
call void %noop()
br bool %c2, label %X, label %X ; Can be converted to unconditional br
X:
call void %noop()
ret int 0
Y:
call void %noop()
br label %X
}