Fix PR4313: IPSCCP was not setting the lattice value for the invoke instruction
[oota-llvm.git] / test / Feature / callingconventions.ll
1 ; RUN: llvm-as < %s | llvm-dis > %t1.ll
2 ; RUN: llvm-as %t1.ll -o - | llvm-dis > %t2.ll
3 ; RUN: diff %t1.ll %t2.ll
4
5 define fastcc void @foo() {
6         ret void
7 }
8
9 define coldcc void @bar() {
10         call fastcc void @foo( )
11         ret void
12 }
13
14 define void @structret({ i8 }* sret  %P) {
15         call void @structret( { i8 }* sret  %P )
16         ret void
17 }
18
19 define void @foo2() {
20         ret void
21 }
22
23 define coldcc void @bar2() {
24         call fastcc void @foo( )
25         ret void
26 }
27
28 define cc42 void @bar3() {
29         invoke fastcc void @foo( )
30                         to label %Ok unwind label %U
31
32 Ok:             ; preds = %0
33         ret void
34
35 U:              ; preds = %0
36         unwind
37 }
38
39 define void @bar4() {
40         call cc42 void @bar( )
41         invoke cc42 void @bar3( )
42                         to label %Ok unwind label %U
43
44 Ok:             ; preds = %0
45         ret void
46
47 U:              ; preds = %0
48         unwind
49 }
50