Don't drop function/call return attributes like 'nounwind'.
[oota-llvm.git] / test / Transforms / ADCE / 2005-02-17-PHI-Invoke-Crash.ll
1 ; RUN: llvm-upgrade < %s | llvm-as | opt -adce -disable-output
2
3 implementation   ; Functions:
4
5 declare void %strlen()
6 declare void %_ZN10QByteArray6resizeEi()
7 declare void %q_atomic_decrement()
8
9 void %_ZNK10QByteArray13leftJustifiedEicb() {
10 entry:
11         invoke void %strlen( )
12                         to label %tmp.3.i.noexc unwind label %invoke_catch.0
13
14 tmp.3.i.noexc:          ; preds = %entry
15         br bool false, label %then.0, label %else.0
16
17 invoke_catch.0:         ; preds = %entry
18         invoke void %q_atomic_decrement( )
19                         to label %tmp.1.i.i183.noexc unwind label %terminate
20
21 tmp.1.i.i183.noexc:             ; preds = %invoke_catch.0
22         unwind
23
24 then.0:         ; preds = %tmp.3.i.noexc
25         invoke void %_ZN10QByteArray6resizeEi( )
26                         to label %invoke_cont.1 unwind label %invoke_catch.1
27
28 invoke_catch.1:         ; preds = %then.0
29         invoke void %q_atomic_decrement( )
30                         to label %tmp.1.i.i162.noexc unwind label %terminate
31
32 tmp.1.i.i162.noexc:             ; preds = %invoke_catch.1
33         ret void
34
35 invoke_cont.1:          ; preds = %then.0
36         ret void
37
38 else.0:         ; preds = %tmp.3.i.noexc
39         ret void
40
41 terminate:              ; preds = %invoke_catch.1, %invoke_catch.0
42         %dbg.0.1 = phi {  }* [ null, %invoke_catch.1 ], [ null, %invoke_catch.0 ]               ; <{  }*> [#uses=1]
43         unreachable
44 }