blob: 14c41d75584fc1c1472b7097fd14fdd82eaacc14 [file] [log] [blame]
Chris Lattner5464da92003-08-27 01:05:19 +00001; The PHI cannot be eliminated from this testcase, SCCP is mishandling invoke's!
Misha Brukmane78760e2003-09-16 15:29:54 +00002; RUN: llvm-as < %s | opt -sccp | llvm-dis | grep phi
Chris Lattner5464da92003-08-27 01:05:19 +00003
4declare void %foo()
5int %test(bool %cond) {
6Entry:
7 br bool %cond, label %Inv, label %Cont
8Inv:
9 invoke void %foo() to label %Ok except label %Cont
10Ok:
11 br label %Cont
12Cont:
13 %X = phi int [0, %Entry], [1,%Ok], [0, %Inv]
14 ret int %X
15}