mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2025-02-01 13:11:39 +01:00
f45fbce24c
Summary: When inserting an `unreachable` after a noreturn call, we must ensure that it's not a musttail call to avoid breaking the IR invariants for musttail calls. Reviewers: fedor.sergeev, majnemer Reviewed By: majnemer Subscribers: hiraditya, llvm-commits Tags: #llvm Differential Revision: https://reviews.llvm.org/D60079 llvm-svn: 357483
16 lines
397 B
LLVM
16 lines
397 B
LLVM
; 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 }
|