Added the ability to xfail based on llvmgcc version
[llvm-complete.git] / test / Transforms / LowerInvoke / basictest.ll
blob93022f5b31627ef788c7c4b3dd43e02a47140930
1 ; RUN: llvm-as < %s | opt -lowerinvoke -disable-output &&
2 ; RUN: llvm-as < %s | opt -lowerinvoke -disable-output -enable-correct-eh-support
4 implementation
6 int %foo() {
7         invoke int %foo() to label %Ok unwind label %Crap
8 Ok:
9         invoke int %foo() to label %Ok2 unwind label %Crap
10 Ok2:
11         ret int 2
12 Crap:
13         ret int 1
16 int %bar(int %blah) {
17         br label %doit
18 doit:
19         ;; Value live across an unwind edge.
20         %B2 = add int %blah, 1
21         invoke int %foo() to label %Ok unwind label %Crap
22 Ok:
23         invoke int %foo() to label %Ok2 unwind label %Crap
24 Ok2:
25         ret int 2
26 Crap:
27         ret int %B2