summaryrefslogtreecommitdiffstats
path: root/test/CodeGen/CBackend/2003-06-28-InvokeSupport.ll
blob: f0b1bbc7f03b9abb786c309e3d2c7ed4bb43cfd7 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
; RUN: llc < %s -march=c

declare i32 @callee(i32, i32)

define i32 @test(i32 %X) {
; <label>:0
        %A = invoke i32 @callee( i32 %X, i32 5 )
                        to label %Ok unwind label %Threw                ; <i32> [#uses=1]

Ok:             ; preds = %Threw, %0
        %B = phi i32 [ %A, %0 ], [ -1, %Threw ]         ; <i32> [#uses=1]
        ret i32 %B

Threw:          ; preds = %0
        br label %Ok
}

OpenPOWER on IntegriCloud