1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-11-24 11:42:57 +01:00

New testcase

llvm-svn: 7920
This commit is contained in:
Chris Lattner 2003-08-17 19:37:57 +00:00
parent 17f985bfa4
commit 96b0234163

View File

@ -0,0 +1,24 @@
; This test checks to make sure that 'br X, Dest, Dest' is folded into
; 'br Dest'. This can only happen after the 'Z' block is eliminated. This is
; due to the fact that the SimplifyCFG function does not use
; the ConstantFoldTerminator function.
; 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 %Z, label %X ; Can be converted to unconditional br
Z:
br label %X
X:
call void %noop()
ret int 0
Y:
call void %noop()
br label %X
}