• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1; REQUIRES: x86
2; RUN: llvm-as %s -o %t.o
3; RUN: ld.lld %t.o -o %t --lto-basic-block-sections=all --lto-O0 --save-temps
4; RUN: llvm-readobj -s %t.lto.o | FileCheck --check-prefix=SECNAMES %s
5; RUN: ld.lld %t.o -o %t --lto-basic-block-sections=all --lto-unique-basic-block-section-names --lto-O0 --save-temps
6; RUN: llvm-readobj -s %t.lto.o | FileCheck --check-prefix=SECNAMES-FULL %s
7; RUN: llvm-nm %t | FileCheck --check-prefix=SYMS %s
8
9; SECNAMES: Name: .text.foo {{.*}}
10; SECNAMES: Name: .text.foo {{.*}}
11; SECNAMES: Name: .text.foo {{.*}}
12
13; SECNAMES-FULL: Name: .text.foo {{.*}}
14; SECNAMES-FULL: Name: .text.foo.foo.1 {{.*}}
15; SECNAMES-FULL: Name: .text.foo.foo.2 {{.*}}
16
17; SYMS: foo
18; SYMS: foo.1
19; SYMS: foo.2
20
21target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
22target triple = "x86_64-unknown-linux-gnu"
23
24; Function Attrs: nounwind uwtable
25define dso_local void @foo(i32 %b) local_unnamed_addr {
26entry:
27  %tobool.not = icmp eq i32 %b, 0
28  br i1 %tobool.not, label %if.end, label %if.then
29
30if.then:                                          ; preds = %entry
31  tail call void @foo(i32 0)
32  br label %if.end
33
34if.end:                                           ; preds = %entry, %if.then
35  ret void
36}
37
38define void @_start() {
39  call void @foo(i32 1)
40  ret void
41}
42