mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2024-12-14 11:32:34 +00:00
1166ce2460
The PruneEH pass tries to annotate functions as 'noreturn' if it doesn't see a ReturnInst. However, a naked function containing inline assembly can contain control flow leaving the function. This fixes PR23971. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@240876 91177308-0d34-0410-b5e6-96231b3b80d8
22 lines
412 B
LLVM
22 lines
412 B
LLVM
; RUN: opt -S -prune-eh < %s | FileCheck %s
|
|
|
|
target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128"
|
|
target triple = "x86_64-unknown-linux-gnu"
|
|
|
|
define void @f() #0 {
|
|
entry:
|
|
call void asm sideeffect "ret\0A\09", "~{dirflag},~{fpsr},~{flags}"()
|
|
unreachable
|
|
}
|
|
|
|
define i32 @g() {
|
|
entry:
|
|
call void @f()
|
|
ret i32 42
|
|
}
|
|
|
|
; CHECK-LABEL: define i32 @g()
|
|
; CHECK: ret i32 42
|
|
|
|
attributes #0 = { naked noinline }
|