1 ; Test for a problem afflicting several C++ programs in the testsuite. The
2 ; instcombine pass is trying to get rid of the cast in the invoke instruction,
3 ; inserting a cast of the return value after the PHI instruction, but which is
4 ; used by the PHI instruction. This is bad: because of the semantics of the
5 ; invoke instruction, we really cannot perform this transformation at all at
6 ; least without splitting the critical edge.
8 ; RUN: llvm-as < %s | opt -instcombine -disable-output
10 declare sbyte* %test()
14 br bool true, label %cont, label %call
16 %P = invoke int*()* cast (sbyte*()* %test to int*()*)()
17 to label %cont except label %N
19 %P2 = phi int* [%P, %call], [null, %entry]