summaryrefslogtreecommitdiffstats
path: root/llvm/test/Transforms/PruneEH/musttail.ll
blob: 1ad607713c6dc0d0a0f6380f6fe39246dabd7d80 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
; RUN: opt -prune-eh -S < %s | FileCheck %s

declare void @noreturn()

define void @testfn() {
    ; A musttail call must be followed by (optional bitcast then) ret,
    ; so make sure we don't insert an unreachable
    ; CHECK: musttail call void @noreturn
    ; CHECK-NOT: unreachable
    ; CHECK-NEXT: ret void
    musttail call void @noreturn() #0
    ret void
}

attributes #0 = { noreturn }
OpenPOWER on IntegriCloud