Add new testcases for instcombine

llvm-svn: 3477
This commit is contained in:
Chris Lattner 2002-08-22 21:26:15 +00:00
parent faea121df7
commit de0025c688
1 changed files with 20 additions and 0 deletions

View File

@ -26,3 +26,23 @@ BB2:
ret int %B
}
int %test3(int %A, bool %b) {
BB0: br label %Loop
Loop:
%B = phi int [%A, %BB0], [%B, %Loop] ; PHI has same value always.
br bool %b, label %Loop, label %Exit
Exit:
ret int %B
}
int %test3(bool %b) {
BB0: ret int 7 ; Loop is unreachable
Loop:
%B = phi int [%B, %L2], [%B, %Loop] ; PHI has same value always.
br bool %b, label %L2, label %Loop
L2:
br label %Loop
}