1; RUN: llc < %s -mtriple=sparc-linux-gnu | FileCheck -check-prefix=LINUX-NO-FP %s
2; RUN: llc < %s -mtriple=sparc-linux-gnu -disable-fp-elim | FileCheck -check-prefix=LINUX-FP %s
3
4define void @func() {
5entry:
6  unreachable
7}
8
9; An empty function is perfectly fine on ELF.
10; LINUX-NO-FP: func:
11; LINUX-NO-FP-NEXT: .cfi_startproc
12; LINUX-NO-FP-NEXT: {{^}}!
13; LINUX-NO-FP-NEXT: {{^}}.L{{.*}}:{{$}}
14; LINUX-NO-FP-NEXT: .size   func, .L{{.*}}-func
15; LINUX-NO-FP-NEXT: .cfi_endproc
16
17; A cfi directive cannot point to the end of a function.
18; LINUX-FP: func:
19; LINUX-FP-NEXT: .cfi_startproc
20; LINUX-FP-NEXT: {{^}}!
21; LINUX-FP-NEXT: save %sp, -96, %sp
22; LINUX-FP-NEXT: {{^}}.L{{.*}}:{{$}}
23; LINUX-FP-NEXT: .size   func, .Lfunc_end0-func
24; LINUX-FP-NEXT: .cfi_endproc
25