llvm.org GIT mirror llvm / 74db243
Change the X86 datalayout to add three address spaces for 32 bit signed, 32 bit unsigned, and 64 bit pointers. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@370083 91177308-0d34-0410-b5e6-96231b3b80d8 Amy Huang a month ago
313 changed file(s) with 315 addition(s) and 312 deletion(s). Raw diff Collapse all Expand all
116116 !TT.isArch64Bit())
117117 Ret += "-p:32:32";
118118
119 // Address spaces for 32 bit signed, 32 bit unsigned, and 64 bit pointers.
120 Ret += "-p270:32:32-p271:32:32-p272:64:64";
121
119122 // Some ABIs align 64 bit integers and doubles to 64 bits, others to 32.
120123 if (TT.isArch64Bit() || TT.isOSWindows() || TT.isOSNaCl())
121124 Ret += "-i64:64";
None target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128"
0 target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
11 target triple = "x86_64-unknown-linux-gnu"
22
33 @a = global i32 42
None target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128"
0 target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
11 target triple = "x86_64-unknown-linux-gnu"
22
33 @a = external global i32
None target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128"
0 target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
11 target triple = "x86_64-unknown-linux-gnu"
22
33 %"foo" = type { i8 }
0 ; ModuleID = 'comdat-mixed-lto1.o'
11 source_filename = "comdat-mixed-lto1.cpp"
2 target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128"
2 target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
33 target triple = "x86_64-unknown-linux-gnu"
44
55 %"class.Test::ptr" = type { i32 }
None target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128"
0 target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
11 target triple = "x86_64-unknown-linux-gnu"
22
33 $c2 = comdat any
None target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128"
0 target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
11 target triple = "x86_64-unknown-linux-gnu"
22
33 @v = common global i16 0, align 4
None target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128"
0 target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
11 target triple = "x86_64-unknown-linux-gnu"
22
33 @x = global i32 42, align 4
None target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128"
0 target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
11 target triple = "x86_64-unknown-linux-gnu"
22
33 @external = global i8 42
None target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128"
0 target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
11 target triple = "x86_64-unknown-linux-gnu"
22
33 define void @live1() {
None target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128"
0 target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
11 target triple = "x86_64-unknown-linux-gnu"
22 %foo = type { }
33 declare <4 x %foo*> @llvm.masked.load.v4p0foo.p0v4p0foo(<4 x %foo*>*, i32, <4 x i1>, <4 x %foo*>)
None target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128"
0 target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
11 target triple = "x86_64-unknown-linux-gnu"
22
33 define available_externally i32 @f() {
None target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128"
0 target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
11 target triple = "x86_64-unknown-linux-gnu"
22
33 define linkonce_odr i32 @f() {
None target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128"
0 target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
11 target triple = "x86_64-unknown-linux-gnu"
22 declare i32 @g()
33 define i32 @main() {
None target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128"
0 target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
11 target triple = "x86_64-unknown-linux-gnu"
22
33 @foo = global i32 1, align 4
None target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128"
0 target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
11 target triple = "x86_64-unknown-linux-gnu"
22
33 define void @bar() {
1818 ; RES-NEXT: {{^}}-r={{.*}}2.o,a,{{$}}
1919 ; RES-NEXT: {{^}}-r={{.*}}2.o,d,px{{$}}
2020
21 target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128"
21 target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
2222 target triple = "x86_64-unknown-linux-gnu"
2323
2424 @a = weak alias i32, i32* @b
1414 ; RES: {{^}}-r={{.*}}1.o,b,px{{$}}
1515 ; RES: {{^}}-r={{.*}}1.o,a,{{$}}
1616
17 target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128"
17 target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
1818 target triple = "x86_64-unknown-linux-gnu"
1919
2020 @a = weak alias i32, i32* @b
66
77 ; RUN: llvm-lto2 run -o %t3.o %t1.o %t2.o -r %t1.o,bar, -r %t2.o,bar,px
88
9 target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128"
9 target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
1010 target triple = "x86_64-unknown-linux-gnu"
1111
1212 %"foo.1" = type { i8, i8 }
88 ;
99 ; ASM: main:
1010
11 target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128"
11 target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
1212 target triple = "x86_64-unknown-linux-gnu"
1313
1414 define i32 @main() {
33
44 ; CHECK: U bar
55
6 target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128"
6 target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
77 target triple = "x86_64-unknown-linux-gnu"
88
99 define void ()* @foo() {
99 ; RUN: -r %t.bc,bar,px
1010 ; RUN: ls %t.cache | count 2
1111
12 target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128"
12 target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
1313 target triple = "x86_64-unknown-linux-gnu"
1414
1515 define weak void @foo() {
99 ; RUN: -r %t.bc,bar,px
1010 ; RUN: ls %t.cache | count 2
1111
12 target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128"
12 target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
1313 target triple = "x86_64-unknown-linux-gnu"
1414
1515 define weak void @foo() {
66 ; RUN: -r %t.bc,foo, -r %t.bc,bar,px
77 ; RUN: ls %t.cache | count 2
88
9 target datalayout = "e-m:w-i64:64-f80:128-n8:16:32:64-S128"
9 target datalayout = "e-m:w-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
1010 target triple = "x86_64-pc-windows-msvc19.11.0"
1111
1212 @foo = linkonce constant i32 1, comdat
2020
2121 ; ModuleID = 'comdat-mixed-lto.o'
2222 source_filename = "comdat-mixed-lto.cpp"
23 target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128"
23 target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
2424 target triple = "x86_64-unknown-linux-gnu"
2525
2626 %"class.Test::ptr" = type { i32 }
2121 ; RUN: -r=%t2.o,a25,px
2222 ; RUN: llvm-dis %t3.o.0.2.internalize.bc -o - | FileCheck %s
2323
24 target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128"
24 target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
2525 target triple = "x86_64-unknown-linux-gnu"
2626
2727 $c1 = comdat any
5151 ; RUN: -r %t2.bc,bar,px
5252 ; RUN: llvm-dis < %t.o.0.0.preopt.bc | FileCheck %s --check-prefix=NONE-PREVAILED2
5353
54 target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128"
54 target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
5555 target triple = "x86_64-unknown-linux-gnu"
5656
5757 @v = common global i8 0, align 8
55 ; A strong definition should override the common
66 ; CHECK: @x = dso_local global i32 42, align 4
77
8 target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128"
8 target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
99 target triple = "x86_64-unknown-linux-gnu"
1010
1111 @x = common global i16 0, align 2
66
77 ; CHECK: D external
88
9 target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128"
9 target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
1010 target triple = "x86_64-unknown-linux-gnu"
1111
1212 @alias = alias i8*, i8** @internal
2222 ; THIN: U live2
2323 ; THIN-NOT: odr
2424
25 target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128"
25 target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
2626 target triple = "x86_64-unknown-linux-gnu"
2727
2828 define void @main() {
3434
3535 ; CHECK: tinkywinky inlined into main with (cost=-15000, threshold=337) (hotness: 300)
3636
37 target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128"
37 target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
3838 target triple = "x86_64-scei-ps4"
3939
4040 declare i32 @patatino()
3535 ; YAML-NEXT: - String: ')'
3636 ; YAML-NEXT: ...
3737
38 target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128"
38 target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
3939 target triple = "x86_64-scei-ps4"
4040
4141 declare i32 @patatino()
55 ; RUN: llvm-lto2 run -o %t2 -r %t,f1,p -r %t,f2,p -r %t,_start,px %t -save-temps
66 ; RUN: llvm-dis %t2.1.2.internalize.bc -o - | FileCheck %s
77
8 target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128"
8 target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
99 target triple = "x86_64-unknown-linux-gnu"
1010
1111 ; CHECK: define void @f1()
11 ; RUN: llvm-lto2 run %t -r %t,foo, -r %t,baz,p -o %t2 -save-temps
22 ; RUN: llvm-dis -o - %t2.0.0.preopt.bc | FileCheck %s
33
4 target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128"
4 target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
55 target triple = "x86_64--fuchsia"
66
77 ; CHECK: declare void @foo()
33 ; CHECK: T foo
44 ; CHECK: t foo_ifunc
55
6 target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128"
6 target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
77 target triple = "x86_64-unknown-linux-gnu"
88
99 @foo = ifunc i32 (i32), i64 ()* @foo_ifunc
11 ; RUN: llvm-as %p/Inputs/intrinsic.ll -o %t2.o
22 ; RUN: llvm-lto2 run -o %t3.o %t1.o %t2.o -r %t1.o,foo
33
4 target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128"
4 target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
55 target triple = "x86_64-unknown-linux-gnu"
66 %foo = type { }
77 declare void @foo( %foo* )
2525 ; RUN: llvm-lto2 run -o %t3 %t2odr %t1 -r %t1,f, -r %t2odr,f, -save-temps
2626 ; RUN: llvm-dis < %t3.0.0.preopt.bc -o - | FileCheck --check-prefix=NONPREVAILING %s
2727
28 target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128"
28 target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
2929 target triple = "x86_64-unknown-linux-gnu"
3030
3131 ; PREVAILING: define weak_odr i32 @f()
77 ; CHECK-NEXT: Binding: Weak
88 ; CHECK-NEXT: Type: Function
99
10 target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128"
10 target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
1111 target triple = "x86_64-unknown-linux-gnu"
1212
1313 define void @patatino() {
77 ; CHECK-NEXT: Binding: Weak
88 ; CHECK-NEXT: Type: Function
99
10 target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128"
10 target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
1111 target triple = "x86_64-unknown-linux-gnu"
1212
1313 define void @bar() {
11 ; RUN: llvm-lto2 run %t -O0 -r %t,foo,px -o %t2
22 ; RUN: llvm-nm %t2.1 | FileCheck %s
33
4 target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128"
4 target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
55 target triple = "x86_64-unknown-linux-gnu"
66
77 ; CHECK: W foo
1010 ; RUN: -lto-sample-profile-file=%S/Inputs/load-sample-prof-icp.prof
1111 ; RUN: llvm-dis %t.out.1.4.opt.bc -o - | FileCheck %s
1212
13 target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128"
13 target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
1414 target triple = "x86_64-unknown-linux-gnu"
1515
1616 ; CHECK-LABEL: @test
1616 ; Make sure profile information is attached.
1717 ; CHECK: !prof
1818
19 target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128"
19 target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
2020 target triple = "x86_64-unknown-linux-gnu"
2121
2222 define void @foo() local_unnamed_addr !dbg !7 {
77 ;
88 ; CHECK: !prof
99
10 target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128"
10 target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
1111 target triple = "x86_64-unknown-linux-gnu"
1212
1313 define void @foo() local_unnamed_addr !dbg !7 {
66 ; RUN: -save-temps -o %t1 %t0.bc
77 ; RUN: llvm-dis %t1.1.3.import.bc -o - | FileCheck %s
88 source_filename = "test.cpp"
9 target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128"
9 target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
1010 target triple = "x86_64-unknown-linux-gnu"
1111
1212 $g = comdat any
77 ; CHECK: U __typeid_bar_global_addr
88 ; CHECK: U __typeid_foo_global_addr
99
10 target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128"
10 target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
1111 target triple = "x86_64-unknown-linux-gnu"
1212
1313 @foo = global i32 0, !type !0
5050 ; ENABLESPLITFLAG: !{i32 1, !"EnableSplitLTOUnit", i32 1}
5151 ; NOENABLESPLITFLAG-NOT: !{i32 1, !"EnableSplitLTOUnit", i32 1}
5252
53 target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128"
53 target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
5454 target triple = "x86_64-unknown-linux-gnu"
1818 ; RUN: llvm-nm %t5.o.0 | FileCheck %s --check-prefix=NM0
1919 ; RUN: llvm-nm %t5.o.1 | FileCheck %s --check-prefix=NM1
2020
21 target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128"
21 target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
2222 target triple = "x86_64-unknown-linux-gnu"
2323 define i32 @g() {
2424 ret i32 0
66 ; INDEX: ^0 = module: (path: "{{.*}}mod-asm-used.ll.tmp.bc"
77 ; INDEX: ^1 = module: (path: "{{.*}}mod-asm-used.ll.tmp2.bc"
88
9 target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128"
9 target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
1010 target triple = "x86_64-unknown-linux-gnu"
1111
1212 ; CHECK: D foo
22 ; RUN: not llvm-lto2 run -o %t3.o %t2.o 2>&1 | FileCheck %s
33 ; CHECK: Expected at most one ThinLTO module per bitcode file
44
5 target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128"
5 target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
66 target triple = "x86_64-unknown-linux-gnu"
2424 ; SYMBOLS: NOTYPE GLOBAL DEFAULT UND varAlias
2525 ; SYMBOLS: FUNC GLOBAL DEFAULT 2 zed
2626
27 target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128"
27 target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
2828 target triple = "x86_64-unknown-linux-gnu"
2929
3030 @barAlias = alias void(), void()* @bar
1818 ; RUN: llvm-readelf --symbols %t2.o.1 | FileCheck %s --check-prefix=UND
1919 ; UND: NOTYPE GLOBAL DEFAULT UND var2
2020
21 target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128"
21 target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
2222 target triple = "x86_64-unknown-linux-gnu"
2323
2424 @var1 = global i32 10, align 4
2020 ; SYMBOLS: NOTYPE GLOBAL DEFAULT UND foo
2121 ; SYMBOLS: FUNC GLOBAL DEFAULT 2 zed
2222
23 target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128"
23 target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
2424 target triple = "x86_64-unknown-linux-gnu"
2525
2626 $foo = comdat any
55
66 ; CHECK: 0000000000000000 0 NOTYPE GLOBAL HIDDEN UND foobar
77
8 target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128"
8 target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
99 target triple = "x86_64-unknown-linux-gnu"
1010
1111 @foobar = external hidden global i32
22
33 ; CHECK: target triple: x86_64-unknown-linux-gnu
44 target triple = "x86_64-unknown-linux-gnu"
5 target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128"
5 target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
66
77 ; CHECK-NOT: linker opts:
88 !0 = !{!"/include:foo"}
44 ; It means that the wholeprogramdevirt pass must have run and lowered
55 ; the llvm.type.checked.load call.
66
7 target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128"
7 target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
88 target triple = "x86_64-unknown-linux-gnu"
99
1010 define {i8*, i1} @foo(i8* %ptr) {
0 target triple = "x86_64-unknown-linux-gnu"
1 target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128"
1 target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
22
33 !llvm.module.flags = !{!0, !1}
44
0 ; ModuleID = 'b.obj'
11 source_filename = "b.cpp"
2 target datalayout = "e-m:w-i64:64-f80:128-n8:16:32:64-S128"
2 target datalayout = "e-m:w-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
33 target triple = "x86_64-pc-windows-msvc19.11.0"
44
55 ; Function Attrs: norecurse nounwind readnone sspstrong uwtable
None target datalayout = "e-m:o-i64:64-f80:128-n8:16:32:64-S128"
0 target datalayout = "e-m:o-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
11 target triple = "x86_64-apple-macosx10.11.0"
22
33 %some_named_struct = type { i8, i8 }
None target datalayout = "e-m:o-i64:64-f80:128-n8:16:32:64-S128"
0 target datalayout = "e-m:o-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
11 target triple = "x86_64-apple-macosx10.12"
22
33 define void @bar() !dbg !3 {
None target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128"
0 target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
11 target triple = "x86_64-unknown-linux-gnu"
22
33 define i32 @c() !dbg !6 {
22 ; RUN: llvm-objdump -d %t.s.0 | FileCheck %s --check-prefix=CHECK-SMALL
33
44 target triple = "x86_64-unknown-linux-gnu"
5 target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128"
5 target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
66
77 !llvm.module.flags = !{!0, !1}
88
22 ; RUN: llvm-objdump -d %t.s.0 | FileCheck %s --check-prefix=CHECK-LARGE
33
44 target triple = "x86_64-unknown-linux-gnu"
5 target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128"
5 target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
66
77 !llvm.module.flags = !{!0, !1}
88
22 ; RUN: not llvm-lto2 run -r %t0.o,_start,px -r %t1.o,bar,px %t0.o %t1.o -o %t2.s 2>&1 | FileCheck %s
33
44 target triple = "x86_64-unknown-linux-gnu"
5 target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128"
5 target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
66
77 !llvm.module.flags = !{!0, !1}
88
11 ; RUN: llvm-lto -o %t2 %t1
22 ; REQUIRES: default_triple
33
4 target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128"
4 target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
55 target triple = "x86_64-unknown-linux-gnu"
66
77 module asm ".align 4"
2424 ; YAML-NEXT: - String: ')'
2525 ; YAML-NEXT: ...
2626
27 target datalayout = "e-m:o-i64:64-f80:128-n8:16:32:64-S128"
27 target datalayout = "e-m:o-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
2828 target triple = "x86_64-apple-darwin"
2929
3030 declare i32 @bar()
6060 ; YAML-NEXT: - String: ')'
6161 ; YAML-NEXT: ...
6262
63 target datalayout = "e-m:o-i64:64-f80:128-n8:16:32:64-S128"
63 target datalayout = "e-m:o-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
6464 target triple = "x86_64-apple-darwin"
6565
6666 declare i32 @bar()
11 ; RUN: llvm-lto -debug-pass=Arguments -exported-symbol=_f -o /dev/null %t.bc 2>&1 -disable-verify | FileCheck %s
22 ; RUN: llvm-lto -debug-pass=Arguments -exported-symbol=_f -o /dev/null %t.bc 2>&1 | FileCheck %s -check-prefix=VERIFY
33
4 target datalayout = "e-m:o-i64:64-f80:128-n8:16:32:64-S128"
4 target datalayout = "e-m:o-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
55 target triple = "x86_64-apple-macosx10.10.0"
66
77 ; -disable-verify should disable verification from the optimization pipeline.
88
99 ; ModuleID = 'a.obj'
1010 source_filename = "a.cpp"
11 target datalayout = "e-m:w-i64:64-f80:128-n8:16:32:64-S128"
11 target datalayout = "e-m:w-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
1212 target triple = "x86_64-pc-windows-msvc19.11.0"
1313
1414 ; Function Attrs: norecurse nounwind sspstrong uwtable
2929 ; INTERNALIZE2-OPTION-DISABLE: define dso_local void @foo
3030 ; INTERNALIZE2-OPTION-DISABLE: define dso_local void @bar
3131
32 target datalayout = "e-m:o-i64:64-f80:128-n8:16:32:64-S128"
32 target datalayout = "e-m:o-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
3333 target triple = "x86_64-apple-macosx10.11.0"
3434
3535 define void @foo() {
44 ; rdar://problem/16165191
55 ; runtime library implementations should not be renamed
66
7 target datalayout = "e-m:o-i64:64-f80:128-n8:16:32:64-S128"
7 target datalayout = "e-m:o-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
88 target triple = "x86_64-apple-darwin11"
99
1010 @str = private unnamed_addr constant [13 x i8] c"hello world\0A\00"
22
33 ; CHECK: contains ObjC
44
5 target datalayout = "e-m:o-i64:64-f80:128-n8:16:32:64-S128"
5 target datalayout = "e-m:o-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
66 target triple = "x86_64-apple-macosx10.12.0"
77
88 %0 = type opaque
66
77 ; CHECK-NOT: Global is external, but doesn't have external or weak linkage
88
9 target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128"
9 target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
1010 target triple = "x86_64-unknown-linux-gnu"
1111
1212 define i32 @foo() {
0 ; RUN: llvm-as < %s >%t1
11 ; RUN: llvm-lto -o %t2 %t1
22
3 target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128"
3 target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
44 target triple = "x86_64-unknown-linux-gnu"
55
66 @.str = private unnamed_addr constant [7 x i8] c"hello\0A\00", align 1
44 ; Verify that we correctly rename the intrinsic and don't crash
55 ; CHECK: @llvm.masked.store.v4p0s_some_named_struct.0s.p0v4p0s_some_named_struct.0s
66
7 target datalayout = "e-m:o-i64:64-f80:128-n8:16:32:64-S128"
7 target datalayout = "e-m:o-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
88 target triple = "x86_64-apple-macosx10.11.0"
99
1010 %some_named_struct = type { i8 }
11 ; RUN: llvm-lto -exported-symbol=_main -set-merged-module -o %t2 %t1
22 ; RUN: llvm-objdump --print-imm-hex=false -d %t2 | FileCheck %s
33
4 target datalayout = "e-m:o-i64:64-f80:128-n8:16:32:64-S128"
4 target datalayout = "e-m:o-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
55 target triple = "x86_64-apple-macosx10.10.0"
66
77 ; CHECK: _main
88
99 ; CHECK-WARN: warning{{.*}} ignoring invalid debug info
1010 ; CHECK: {{f$}}
11 target datalayout = "e-m:o-i64:64-f80:128-n8:16:32:64-S128"
11 target datalayout = "e-m:o-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
1212 target triple = "x86_64-apple-macosx"
1313
1414 define void @h() #0 !dbg !7 {
2828 ; CHECK-WARN: warning{{.*}} ignoring invalid debug info
2929 ; CHECK-WARN-NOT: Broken module found
3030 ; CHECK: foo
31 target datalayout = "e-m:o-i64:64-f80:128-n8:16:32:64-S128"
31 target datalayout = "e-m:o-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
3232 target triple = "x86_64-apple-macosx10.12"
3333
3434 declare void @bar()
44 ; RUN: llvm-nm %t3.0 | FileCheck %s
55 ; RUN: llvm-dis %t3.0.2.internalize.bc -o - | FileCheck %s --check-prefix=INTERN
66
7 target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128"
7 target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
88 target triple = "x86_64-unknown-linux-gnu"
99
1010 module asm ".symver io_cancel_0_4,io_cancel@@LIBAIO_0.4"
88 ; RUN: llvm-lto2 run -r %t1,_start,plx -r %t1,_start3,plx -r %t1,foo@@SOME_VERSION -r %t1,foo@SOME_VERSION3 -o %t3 %t1 -save-temps
99 ; RUN: llvm-nm %t3.0 | FileCheck %s
1010
11 target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128"
11 target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
1212 target triple = "x86_64-unknown-linux-gnu"
1313
1414 module asm ".global _start"
22 ; RUN: llvm-as < %s >%t1
33 ; RUN: llvm-nm %t1 | FileCheck %s
44
5 target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128"
5 target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
66 target triple = "x86_64-unknown-linux-gnu"
77
88 module asm "foo1:"
99 ; RUN: llvm-lto2 run -r %t1,foo,plx -r %t1,bar,plx -o %t4 %t1 -save-temps -use-new-pm
1010 ; RUN: llvm-dis < %t4.0.4.opt.bc | FileCheck %s
1111
12 target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128"
12 target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
1313 target triple = "x86_64-unknown-linux-gnu"
1414
1515 define void @foo() {
1010 ; RUN: llvm-lto2 run -r %t1,_pow, -r %t1,_main,plx -o %t2 %t1
1111 ; RUN: llvm-nm %t2.1 | FileCheck %s
1212
13 target datalayout = "e-m:o-i64:64-f80:128-n8:16:32:64-S128"
13 target datalayout = "e-m:o-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
1414 target triple = "x86_64-apple-macosx10.9"
1515
1616 declare double @pow(double, double)
1414 ; transformation on Windows.
1515 ; CHECK: U exp2f
1616
17 target datalayout = "e-m:w-i64:64-f80:128-n8:16:32:64-S128"
17 target datalayout = "e-m:w-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
1818 target triple = "x86_64-pc-windows-msvc19.11.0"
1919
2020 define dso_local i32 @main(i32 %argc, i8** nocapture readnone %argv) local_unnamed_addr {
33 ;
44 ; Test for the issue described in https://bugs.llvm.org/show_bug.cgi?id=37684
55
6 target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128"
6 target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
77 target triple = "x86_64-unknown-linux-gnu"
88
99 ; T1 will be linked against T2 because T2 was already loaded in %t0.o due to
None target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128"
0 target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
11 target triple = "x86_64-unknown-linux-gnu"
22
33 define internal i32 @f(i8*) unnamed_addr {
None target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128"
0 target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
11 target triple = "x86_64-unknown-linux-gnu"
22
33 define void @f() !type !0 {
None target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128"
0 target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
11 target triple = "x86_64-unknown-linux-gnu"
22
33 define void @f1() {
None target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128"
0 target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
11 target triple = "x86_64-unknown-linux-gnu"
22
33 define void @f2() {
None target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128"
0 target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
11 target triple = "x86_64-unknown-linux-gnu"
22
33 define i1 @importf1(i8* %p) {
None target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128"
0 target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
11 target triple = "x86_64-unknown-linux-gnu"
22
33 @vt1 = constant i32 0, !type !0
None target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128"
0 target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
11 target triple = "x86_64-unknown-linux-gnu"
22
33 @vt2 = constant i1 (i8*)* @vf2, !type !0
None target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128"
0 target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
11 target triple = "x86_64-unknown-linux-gnu"
22
33 @vt2a = constant i1 (i8*)* @vf2a, !type !0
None target datalayout = "e-m:o-i64:64-f80:128-n8:16:32:64-S128"
0 target datalayout = "e-m:o-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
11 target triple = "x86_64-apple-macosx10.11.0"
22
33
None target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128"
0 target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
11 target triple = "x86_64-unknown-linux-gnu"
22
33 @fptr = internal unnamed_addr global i32 (i32)* @f2, align 8
None target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128"
0 target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
11 target triple = "x86_64-grtev4-linux-gnu"
22
33 %struct.B2 = type { %struct.A2 }
None target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128"
0 target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
11 target triple = "x86_64-unknown-linux-gnu"
22
33 declare !type !0 i8 @bar(i8*)
0 ; ModuleID = 'test/ThinLTO/X86/Inputs/crash_debuginfo.ll'
11 source_filename = "src.bc"
2 target datalayout = "e-m:o-i64:64-f80:128-n8:16:32:64-S128"
2 target datalayout = "e-m:o-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
33 target triple = "x86_64-apple-macosx10.7.0"
44
55 define void @bar(i32 %arg) {
None target datalayout = "e-m:o-i64:64-f80:128-n8:16:32:64-S128"
0 target datalayout = "e-m:o-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
11 target triple = "x86_64-apple-macosx10.11.0"
22
33 declare void @dead_func()
0 ; ModuleID = 'debuginfo-compositetype-import2.c'
11 source_filename = "debuginfo-compositetype-import2.c"
2 target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128"
2 target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
33 target triple = "x86_64-unknown-linux-gnu"
44
55 ; Function Attrs: nounwind uwtable
0 ; ModuleID = 'debuginfo-cu-import2.c'
11 source_filename = "debuginfo-cu-import2.c"
2 target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128"
2 target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
33 target triple = "x86_64-unknown-linux-gnu"
44
55 ; Function Attrs: nounwind uwtable
None target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128"
0 target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
11 target triple = "x86_64-grtev4-linux-gnu"
22
33 %struct.A = type { i32 (...)** }
None target datalayout = "e-m:o-i64:64-f80:128-n8:16:32:64-S128"
0 target datalayout = "e-m:o-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
11 target triple = "x86_64-apple-macosx10.11.0"
22
33
None target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128"
0 target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
11 target triple = "x86_64-scei-ps4"
22
33 %struct.CFVS = type { %struct.Vec }
None target datalayout = "e-m:o-i64:64-f80:128-n8:16:32:64-S128"
0 target datalayout = "e-m:o-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
11 target triple = "x86_64-apple-macosx10.11.0"
22
33
None target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128"
0 target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
11 target triple = "x86_64-scei-ps4"
22
33 %struct.CFVS = type { %struct.Vec }
None target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128"
0 target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
11 target triple = "x86_64-unknown-linux-gnu"
22
33 @A = local_unnamed_addr global i32 10, align 4
None target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128"
0 target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
11 target triple = "x86_64-unknown-linux-gnu"
22
33 @A = local_unnamed_addr global i32 10, align 4
0 ; This file is checked-in as a .bc file, because the debug info version is
11 ; intentionally out-of-date and llvm-as will drop it before writing the bitcode
22
3 target datalayout = "e-m:o-i64:64-f80:128-n8:16:32:64-S128"
3 target datalayout = "e-m:o-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
44 target triple = "x86_64-apple-macosx10.11.0"
55
66
None target datalayout = "e-m:w-i64:64-f80:128-n8:16:32:64-S128"
0 target datalayout = "e-m:w-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
11 target triple = "x86_64-pc-windows-msvc19.11.0"
22 define dso_local dllexport i32 @foo() {
33 ret i32 42
None target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128"
0 target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
11 target triple = "x86_64-unknown-linux-gnu"
22
33 define void @g() {
None target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128"
0 target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
11 target triple = "x86_64-unknown-linux-gnu"
22
33 define void @h() {
None target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128"
0 target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
11 target triple = "x86_64-unknown-linux-gnu"
None target datalayout = "e-m:o-i64:64-f80:128-n8:16:32:64-S128"
0 target datalayout = "e-m:o-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
11 target triple = "x86_64-apple-macosx10.11.0"
22
33
None target datalayout = "e-m:o-i64:64-f80:128-n8:16:32:64-S128"
0 target datalayout = "e-m:o-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
11 target triple = "x86_64-apple-macosx10.11.0"
22
33 define i32 @main() #0 {
None target datalayout = "e-m:o-i64:64-f80:128-n8:16:32:64-S128"
0 target datalayout = "e-m:o-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
11 target triple = "x86_64-apple-macosx10.11.0"
22
33
None target datalayout = "e-m:o-i64:64-f80:128-n8:16:32:64-S128"
0 target datalayout = "e-m:o-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
11 target triple = "x86_64-apple-macosx10.11.0"
22
33
None target datalayout = "e-m:o-i64:64-f80:128-n8:16:32:64-S128"
0 target datalayout = "e-m:o-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
11 target triple = "x86_64-apple-macosx10.11.0"
22
33
None target datalayout = "e-m:o-i64:64-f80:128-n8:16:32:64-S128"
0 target datalayout = "e-m:o-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
11 target triple = "x86_64-apple-macosx10.11.0"
22
33
0 target triple = "x86_64-unknown-linux-gnu"
1 target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128"
1 target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
22
33 declare void @h();
44
None target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128"
0 target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
11 target triple = "x86_64-unknown-linux-gnu"
22
33 @label_addr = internal constant [1 x i8*] [i8* blockaddress(@foo, %lb)], align 8
None target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128"
0 target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
11 target triple = "x86_64-pc-linux-gnu"
22
33 @baz = local_unnamed_addr constant i32 10, align 4
None target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128"
0 target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
11 target triple = "x86_64-pc-linux-gnu"
22
33 @baz = internal constant i32 10, align 4
None target datalayout = "e-m:o-i64:64-f80:128-n8:16:32:64-S128"
0 target datalayout = "e-m:o-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
11 target triple = "x86_64-apple-macosx10.11.0"
22
33 %0 = type { i8 }
None target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128"
0 target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
11 target triple = "x86_64-unknown-linux-gnu"
22
33 @g = global i32 42, align 4
None target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128"
0 target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
11 target triple = "x86_64-unknown-linux-gnu"
22
33 @gFoo = internal unnamed_addr global i32 1, align 4
None target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128"
0 target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
11 target triple = "x86_64-unknown-linux-gnu"
22
33 ; Function Attrs: nounwind ssp uwtable
None target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128"
0 target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
11 target triple = "x86_64-unknown-linux-gnu"
22
33 ; Function Attrs: nounwind ssp uwtable
None target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128"
0 target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
11 target triple = "x86_64-unknown-linux-gnu"
22
33 $comdat.any = comdat any
None target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128"
0 target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
11 target triple = "x86_64-unknown-linux-gnu"
22
33 @g = global i32 42, align 4
None target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128"
0 target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
11 target triple = "x86_64-unknown-linux-gnu"
22
33 @g = external global i32
None target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128"
0 target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
11 target triple = "x86_64-unknown-linux-gnu"
22
33 @b = global i32* @a, align 8
None target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128"
0 target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
11 target triple = "x86_64-unknown-linux-gnu"
22
33 @g1 = common global i32 0, align 4
None target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128"
0 target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
11 target triple = "x86_64-pc-linux-gnu"
22
33 @gBar = local_unnamed_addr global i32 2, align 4, !dbg !0
None target datalayout = "e-m:o-i64:64-f80:128-n8:16:32:64-S128"
0 target datalayout = "e-m:o-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
11 target triple = "x86_64-apple-macosx10.11.0"
22
33 declare void @globalfunc1()
None target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128"
0 target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
11 target triple = "x86_64-grtev4-linux-gnu"
22
33 define i32 @main() #0 {
None target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128"
0 target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
11 target triple = "x86_64-grtev4-linux-gnu"
22
33 @linkonceodrunnamed = linkonce_odr unnamed_addr constant i32 0
None target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128"
0 target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
11 target triple = "x86_64-unknown-linux-gnu"
22
33 $c2 = comdat any
None target datalayout = "e-m:o-i64:64-f80:128-n8:16:32:64-S128"
0 target datalayout = "e-m:o-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
11 target triple = "x86_64-apple-macosx10.11.0"
22
33
0 ; ModuleID = 'local_name_conflict.o'
11 source_filename = "local_name_conflict.c"
2 target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128"
2 target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
33 target triple = "x86_64-unknown-linux-gnu"
44
55 @baz = internal constant i32 10, align 4
0 ; ModuleID = 'local_name_conflict.o'
11 source_filename = "local_name_conflict.c"
2 target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128"
2 target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
33 target triple = "x86_64-unknown-linux-gnu"
44
55 @baz = internal constant i32 10, align 4
0 ; ModuleID = 'local_name_conflict_var.o'
11 source_filename = "local_name_conflict_var.c"
2 target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128"
2 target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
33 target triple = "x86_64-unknown-linux-gnu"
44
55 @baz = internal global i32 10, align 4
0 ; ModuleID = 'local_name_conflict_var.o'
11 source_filename = "local_name_conflict_var.c"
2 target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128"
2 target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
33 target triple = "x86_64-unknown-linux-gnu"
44
55 @baz = internal global i32 10, align 4
0 target triple = "x86_64-apple-macosx10.11.0"
1 target datalayout = "e-m:o-i64:64-f80:128-n8:16:32:64-S128"
1 target datalayout = "e-m:o-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
None target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128"
0 target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
11 target triple = "x86_64-unknown-linux-gnu"
22
33 define i32 @main({ i64, { i64, i8* }* } %unnamed) #0 {
None target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128"
0 target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
11 target triple = "x86_64-unknown-linux-gnu"
22
33 define i32 @main({ i64, { i64, i8* }* } %unnamed) #0 {
None target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128"
0 target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
11 target triple = "x86_64-pc-linux-gnu"
22
33 define i32 @foo(i32) local_unnamed_addr #0 {
None target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128"
0 target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
11 target triple = "x86_64-pc-linux-gnu"
22
33 define void @foo() {
None target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128"
0 target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
11 target triple = "x86_64-pc-linux-gnu"
22
33 define void @bar() personality i32 (i32, i32, i64, i8*, i8*)* @personality_routine {
0 ; ModuleID = 'b.cpp'
11 source_filename = "b.cpp"
2 target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128"
2 target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
33 target triple = "x86_64-unknown-linux-gnu"
44
55 ; Function Attrs: noinline optnone uwtable
None target datalayout = "e-m:o-i64:64-f80:128-n8:16:32:64-S128"
0 target datalayout = "e-m:o-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
11 target triple = "x86_64-apple-macosx10.11.0"
22
33 declare i8 **@foo()
0
1 target datalayout = "e-m:o-i64:64-f80:128-n8:16:32:64-S128"
1 target datalayout = "e-m:o-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
22 target triple = "x86_64-apple-macosx10.11.0"
33
44 define void @referencedbyglobal() {
None target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128"
0 target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
11 target triple = "x86_64-unknown-linux-gnu"
22
33 $__llvm_profile_filename = comdat any
None target datalayout = "e-m:o-i64:64-f80:128-n8:16:32:64-S128"
0 target datalayout = "e-m:o-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
11 target triple = "x86_64-apple-macosx10.15.0"
22
33 define i32 @main() {
None target datalayout = "e-m:o-i64:64-f80:128-n8:16:32:64-S128"
0 target datalayout = "e-m:o-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
11 target triple = "x86_64-apple-macosx10.11.0"
22
33 ; Alias are not optimized
1010 ; CHECK-DAG: M0_12511626713252727690 -> M0_{{.*}} // alias
1111 ; CHECK-DAG: M1_8129049334585965161 -> M1_{{.*}} // alias
1212
13 target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128"
13 target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
1414 target triple = "x86_64-unknown-linux-gnu"
1515
1616 define internal i32 @f(i8*) unnamed_addr {
1818 ; SUMMARYNAMES: ^2 = gv: (name: "globalfunc2",
1919 ; SUMMARYNAMES: ^3 = gv: (name: "globalfunc1"
2020
21 target datalayout = "e-m:o-i64:64-f80:128-n8:16:32:64-S128"
21 target datalayout = "e-m:o-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
2222 target triple = "x86_64-apple-macosx10.11.0"
2323
2424 define i32 @main() #0 {
4545 ; eliminated once the old lto interface is fixed.
4646 ; CHECK-NM2-DAG: t __stack_chk_fail
4747
48 target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128"
48 target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
4949 target triple = "x86_64-unknown-linux-gnu"
5050
5151 define void @bar() {
1717 ; RUN: llvm-lto2 run -o %t.o %t.bc -cache-dir %t.cache -r=%t.bc,globalfunc,plx -default-triple=x86_64-unknown-linux-gnu
1818 ; RUN: ls %t.cache | count 15
1919
20 target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128"
20 target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
2121 target triple = "x86_64-unknown-linux-gnu"
2222
2323 define void @globalfunc() {
2828 ; SYMBOLS-YES-DAG: {{FUNC .* f.cfi$}}
2929 ; SYMBOLS-YES-DAG: {{NOTYPE .* UND f.cfi$}}
3030
31 target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128"
31 target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
3232 target triple = "x86_64-unknown-linux-gnu"
3333
3434 define i8* @_start(void ()* %p) !type !0 {
1010 ; RUN: llvm-lto2 run -cache-dir %t.cache -o %t.o %t.bc %t2.bc %t1.bc -r=%t.bc,main,plx -r=%t.bc,f1,lx -r=%t.bc,f2,lx -r=%t2.bc,f2,plx -r=%t2.bc,linkonce_odr,plx -r=%t1.bc,f1,plx -r=%t1.bc,linkonce_odr,lx
1111 ; RUN: ls %t.cache | count 6
1212
13 target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128"
13 target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
1414 target triple = "x86_64-unknown-linux-gnu"
1515
1616 define void @main() {
2121 ; RUN: llvm-lto2 run -o %t.o %t.bc %t-import.bc %t3.bc -cache-dir %t.cache -r=%t.bc,f1,plx -r=%t.bc,f2,plx -r=%t.bc,f1_actual,plx -r=%t3.bc,vt2a,plx -r=%t3.bc,vt2b,plx -r=%t-import.bc,importf1,plx -r=%t-import.bc,f1,lx -r=%t-import.bc,importf2,plx -r=%t-import.bc,f2,lx
2222 ; RUN: ls %t.cache | count 6
2323
24 target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128"
24 target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
2525 target triple = "x86_64-unknown-linux-gnu"
2626
2727 @f1 = alias i1(i8*), i1 (i8*)* @f1_actual
159159 ; RUN: not ls %t.cache/llvmcache-foo-1024
160160 ; RUN: not ls %t.cache/llvmcache-foo-7
161161
162 target datalayout = "e-m:o-i64:64-f80:128-n8:16:32:64-S128"
162 target datalayout = "e-m:o-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
163163 target triple = "x86_64-apple-macosx10.11.0"
164164
165165 define void @globalfunc() #0 {
99 ; CHECK: define {{.*}} i32 @f1.llvm.0
1010 ; CHECK: define {{.*}} i32 @f2.llvm.0
1111
12 target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128"
12 target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
1313 target triple = "x86_64-unknown-linux-gnu"
1414
1515 define dso_local i32 @bar(i32 %x) {
6060 ; RUN: -r=%t.o,_ZTV1C,px 2>&1 | FileCheck %s --check-prefix=ERROR
6161 ; ERROR: failed: inconsistent LTO Unit splitting (recompile with -fsplit-lto-unit)
6262
63 target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128"
63 target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
6464 target triple = "x86_64-grtev4-linux-gnu"
6565
6666 %struct.A = type { i32 (...)** }
3939 ; INDEX2: typeid: (name: "_ZTS1A2"
4040 ; INDEX2: typeid: (name: "_ZTS1A3"
4141
42 target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128"
42 target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
4343 target triple = "x86_64-grtev4-linux-gnu"
4444
4545 %struct.B = type { %struct.A }
1313 ; RUN: llvm-bcanalyzer -dump %t1.bc.thinlto.bc | FileCheck %s --check-prefix=FOOBAZ
1414 ; RUN: llvm-bcanalyzer -dump %t2.bc.thinlto.bc | FileCheck %s --check-prefix=BARQUX
1515
16 target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128"
16 target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
1717 target triple = "x86_64-unknown-linux-gnu"
1818
1919 declare !type !0 i8 @baz(i8*)
44 ; RUN: -r %t1.bc,addrtaken,px
55 ; RUN: llvm-bcanalyzer -dump %t.out.index.bc | FileCheck %s --check-prefix=COMBINED
66
7 target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128"
7 target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
88 target triple = "x86_64-unknown-linux-gnu"
99
1010 define i1 @foo(i8* %p) !type !0 {
2121 ; RUN: -r=%t.o,_ZTV1B,px
2222 ; RUN: llvm-dis %t3.1.4.opt.bc -o - | FileCheck %s --check-prefix=CHECK-IR
2323
24 target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128"
24 target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
2525 target triple = "x86_64-grtev4-linux-gnu"
2626
2727 %struct.B = type { %struct.A }
1010
1111 ; ModuleID = 'test/ThinLTO/X86/crash_debuginfo.ll'
1212 source_filename = "test/ThinLTO/X86/crash_debuginfo.ll"
13 target datalayout = "e-m:o-i64:64-f80:128-n8:16:32:64-S128"
13 target datalayout = "e-m:o-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
1414 target triple = "x86_64-apple-macosx10.7.0"
1515
1616 define void @foo(i32 %arg) {
131131 ; and called from @dead_func.
132132 ; CHECK-NM-NOTDEAD: T _baz
133133
134 target datalayout = "e-m:o-i64:64-f80:128-n8:16:32:64-S128"
134 target datalayout = "e-m:o-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
135135 target triple = "x86_64-apple-macosx10.11.0"
136136
137137
3333
3434 ; ModuleID = 'debuginfo-compositetype-import.c'
3535 source_filename = "debuginfo-compositetype-import.c"
36 target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128"
36 target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
3737 target triple = "x86_64-unknown-linux-gnu"
3838
3939 ; Function Attrs: nounwind uwtable
1616
1717 ; ModuleID = 'debuginfo-cu-import.c'
1818 source_filename = "debuginfo-cu-import.c"
19 target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128"
19 target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
2020 target triple = "x86_64-unknown-linux-gnu"
2121
2222 define void @foo() !dbg !28 {
8484 ; REMARK: single-impl: devirtualized a call to _ZN1B3barEv
8585 ; REMARK-NOT: single-impl: devirtualized a call to _ZN1B3fooEv
8686
87 target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128"
87 target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
8888 target triple = "x86_64-grtev4-linux-gnu"
8989
9090 %class.A = type { i32 (...)** }
105105 ; REMARK-DAG: single-impl: devirtualized a call to _ZN1A1nEi
106106 ; REMARK-DAG: single-impl: devirtualized a call to _ZN1D1mEi
107107
108 target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128"
108 target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
109109 target triple = "x86_64-grtev4-linux-gnu"
110110
111111 %struct.A = type { i32 (...)** }
199199 ; REMARK-DAG: single-impl: devirtualized a call to _ZN1E1mEi
200200 ; REMARK-DAG: single-impl: devirtualized a call to _ZN1E1mEi
201201
202 target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128"
202 target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
203203 target triple = "x86_64-grtev4-linux-gnu"
204204
205205 %struct.A = type { i32 (...)** }
5252 ; YAML2-NEXT: ...
5353
5454
55 target datalayout = "e-m:o-i64:64-f80:128-n8:16:32:64-S128"
55 target datalayout = "e-m:o-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
5656 target triple = "x86_64-apple-macosx10.11.0"
5757
5858 define i32 @bar() {
5151 ; YAML2-NEXT: ...
5252
5353
54 target datalayout = "e-m:o-i64:64-f80:128-n8:16:32:64-S128"
54 target datalayout = "e-m:o-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
5555 target triple = "x86_64-apple-macosx10.11.0"
5656
5757 define i32 @bar() {
1919 ; CHECK: DICompositeType
2020 ; CHECK-NOT: DICompositeType
2121
22 target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128"
22 target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
2323 target triple = "x86_64-scei-ps4"
2424
2525 %class.C = type <{ i32 (...)**, %class.A, %struct.CFVS, [6 x i8] }>
77 ; RUN: llvm-dis %t.1.3.import.bc -o - | FileCheck %s
88
99
10 target datalayout = "e-m:o-i64:64-f80:128-n8:16:32:64-S128"
10 target datalayout = "e-m:o-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
1111 target triple = "x86_64-apple-macosx10.11.0"
1212
1313 declare void @foo()
1212 ; Only llvm-lto2 adds the dso_local keyword, hence the {{.*}}
1313 ; CHECK: define available_externally{{.*}} void @_ZN4CFVSD2Ev
1414
15 target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128"
15 target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
1616 target triple = "x86_64-scei-ps4"
1717
1818 %class.C = type <{ i32 (...)**, %class.A, %struct.CFVS, [6 x i8] }>
5858 ; EXPORT: @G.llvm.
5959
6060 target triple = "x86_64-unknown-linux-gnu"
61 target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128"
61 target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
6262
6363 declare i32 @g(...)
6464 declare void @analias(...)
1313 ; CHECK: // Cross-module edges:
1414 ; CHECK: M4294967295_[[ID]] -> M0_{{[0-9]+}}{{.*}}// ref
1515
16 target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128"
16 target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
1717 target triple = "x86_64-unknown-linux-gnu"
1818
1919 @A = external global i32
6262 ; COMBINED-NEXT: M0_[[MAIN]] -> M1_[[FOO]] // call (hotness : Unknown)
6363 ; COMBINED-NEXT: }
6464
65 target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128"
65 target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
6666 target triple = "x86_64-unknown-linux-gnu"
6767
6868 @A = external local_unnamed_addr global i32, align 4
3030 ; COMBINED-NEXT: M0_[[MAIN]] -> M1_[[A]] [style=dashed,color=violetred]; // writeOnly-ref
3131 ; COMBINED-NEXT: }
3232
33 target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128"
33 target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
3434 target triple = "x86_64-unknown-linux-gnu"
3535
3636 @A = external local_unnamed_addr global i32, align 4
66 ; CHECK: define available_externally void @globalfunc
77 ; CHECK-NOT: llvm.dbg.value
88
9 target datalayout = "e-m:o-i64:64-f80:128-n8:16:32:64-S128"
9 target datalayout = "e-m:o-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
1010 target triple = "x86_64-apple-macosx10.11.0"
1111
1212
66
77 ; CHECK: declare dso_local void @foo()
88
9 target datalayout = "e-m:w-i64:64-f80:128-n8:16:32:64-S128"
9 target datalayout = "e-m:w-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
1010 target triple = "x86_64-pc-windows-msvc19.11.0"
1111 define void @bar() {
1212 call void @foo()
4343 ; The index file should be created even for the input with an empty summary.
4444 ; RUN: ls %t3.bc.thinlto.bc
4545
46 target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128"
46 target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
4747 target triple = "x86_64-unknown-linux-gnu"
4848
4949 declare void @g(...)
77
88 ; CHECK: Format: ELF64-x86-64
99
10 target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128"
10 target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
1111 target triple = "x86_64-unknown-linux-gnu"
1212
1313 @foo = ifunc i32 (i32), i64 ()* @foo_ifunc
3030 ; RUN: ls %t.cache | count 0
3131
3232
33 target datalayout = "e-m:o-i64:64-f80:128-n8:16:32:64-S128"
33 target datalayout = "e-m:o-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
3434 target triple = "x86_64-apple-macosx10.11.0"
77 ; CHECK-DAG: @staticvar.llvm.0 = hidden global
88 ; CHECK-DAG: define hidden void @staticfunc.llvm.0
99
10 target datalayout = "e-m:o-i64:64-f80:128-n8:16:32:64-S128"
10 target datalayout = "e-m:o-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
1111 target triple = "x86_64-apple-macosx10.11.0"
1212
1313 @staticvar = internal global i32 1, align 4
2020 ; CHECK-DAG: ref -> 7546896869197086323 (baz)
2121 ; CHECK-DAG: edge -> 6699318081062747564 (foo) Threshold:100
2222
23 target datalayout = "e-m:o-i64:64-f80:128-n8:16:32:64-S128"
23 target datalayout = "e-m:o-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
2424 target triple = "x86_64-apple-macosx10.11.0"
2525
2626 define i32 @main() #0 {
99 ; RUN: | llvm-dis -o - | FileCheck %s --check-prefix=IMPORTGLOB1
1010 ; IMPORTGLOB1: define available_externally float @globalfunc1
1111
12 target datalayout = "e-m:o-i64:64-f80:128-n8:16:32:64-S128"
12 target datalayout = "e-m:o-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
1313 target triple = "x86_64-apple-macosx10.11.0"
1414
1515 define float @globalfunc1(i32*, float*) {
4545 ; ALL: T _callfuncptr
4646 ; ALL2: T _main
4747
48 target datalayout = "e-m:o-i64:64-f80:128-n8:16:32:64-S128"
48 target datalayout = "e-m:o-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
4949 target triple = "x86_64-apple-macosx10.11.0"
5050
5151 @globalvar_in_section = global i32 1, align 4
3232 ; RUN: llvm-dis %t.o.2.3.import.bc -o - | FileCheck %s --check-prefix=NOIMPORT
3333 ; NOIMPORT: declare dso_local void @foo(...)
3434
35 target datalayout = "e-m:o-i64:64-f80:128-n8:16:32:64-S128"
35 target datalayout = "e-m:o-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
3636 target triple = "x86_64-apple-macosx10.11.0"
3737
3838 define void @foo() #0 {
2020 ; CHECK-DAG: ![[PROF2]] = !{!"synthetic_function_entry_count", i64 198}
2121
2222 target triple = "x86_64-unknown-linux-gnu"
23 target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128"
23 target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
2424
2525 declare void @g();
2626
55 ; Verify that we haven't imported GV containing blockaddress
66 ; CHECK: @label_addr.llvm.0 = external hidden constant
77
8 target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128"
8 target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
99 target triple = "x86_64-unknown-linux-gnu"
1010
1111 declare dso_local [1 x i8*]* @foo();
1111 ; OPTIMIZE: define i32 @main()
1212 ; OPTIMIZE-NEXT: ret i32 10
1313
14 target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128"
14 target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
1515 target triple = "x86_64-pc-linux-gnu"
1616
1717 @baz = external local_unnamed_addr constant i32, align 4
2323 ; PROMOTE2: @baz = internal constant i32 10, align 4
2424 ; PROMOTE2: define available_externally i32 @foo() {
2525
26 target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128"
26 target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
2727 target triple = "x86_64-pc-linux-gnu"
2828
2929 declare i32 @foo()
66 ; RUN: llvm-lto -thinlto-action=import %t.bc -thinlto-index=%t3.bc -o - | llvm-dis -o - | FileCheck %s
77
88
9 target datalayout = "e-m:o-i64:64-f80:128-n8:16:32:64-S128"
9 target datalayout = "e-m:o-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
1010 target triple = "x86_64-apple-macosx10.11.0"
1111
1212 ; CHECK: %0 = type { i8 }
66 ; read-only globals
77 ; CHECK: @g = dso_local global i32 42
88
9 target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128"
9 target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
1010 target triple = "x86_64-unknown-linux-gnu"
1111
1212 @g = external global i32
2525 ; PRESERVED: @g.alias = external dso_local global i32
2626 ; PRESERVED-NEXT: @g = available_externally dso_local global i32 42, align 4
2727
28 target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128"
28 target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
2929 target triple = "x86_64-unknown-linux-gnu"
3030
3131 @g.alias = external global i32
2828 ; RUN: -r=%t2.bc,foo,pl -r=%t2.bc,bar,pl -r=%t2.bc,rand,
2929 ; RUN: ls %t.cache/llvmcache-* | count 6
3030
31 target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128"
31 target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
3232 target triple = "x86_64-unknown-linux-gnu"
3333
3434 ; Function Attrs: nounwind ssp uwtable
55 ; Comdats are not internalized even if they are read only.
66 ; CHECK: @g = available_externally dso_local global i32 42
77
8 target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128"
8 target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
99 target triple = "x86_64-unknown-linux-gnu"
1010
1111 @g = external global i32
77 ; If we try to internalize such we'll get a broken module.
88 ; CHECK: @g = external dso_local global i32
99
10 target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128"
10 target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
1111 target triple = "x86_64-unknown-linux-gnu"
1212
1313 @g = external global i32
99 ; We cannot internalize @g
1010 ; CHECK: @g = available_externally dso_local global i32 42
1111
12 target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128"
12 target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
1313 target triple = "x86_64-unknown-linux-gnu"
1414
1515 declare i32 @foo()
1212 ; DEST: @b = external dso_local global i32*
1313 ; DEST-NEXT: @a = available_externally dso_local global i32 42, align 4
1414
15 target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128"
15 target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
1616 target triple = "x86_64-unknown-linux-gnu"
1717
1818 @a = external global i32
66 ; even when there is 'load' instruction before it.
77 ; CHECK: @g = available_externally dso_local global i32 42
88
9 target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128"
9 target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
1010 target triple = "x86_64-unknown-linux-gnu"
1111
1212 @g = external global i32
1313 ; CHECK-NEXT: @g2 = available_externally dso_local global i32 42, align 4
1414 ; CHECK-NEXT: @g3 = available_externally global i32 42, align 4
1515
16 target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128"
16 target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
1717 target triple = "x86_64-unknown-linux-gnu"
1818
1919 declare i32 @foo()
2727
2828 ; IMPORT2: @gBar = available_externally local_unnamed_addr global i32 2, align 4, !dbg !5
2929
30 target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128"
30 target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
3131 target triple = "x86_64-pc-linux-gnu"
3232
3333 @gBar = external global i32
7373 ; CODEGEN2-SRC-NEXT: %2 = tail call i32 @rand()
7474 ; CODEGEN2-SRC-NEXT: ret void
7575
76 target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128"
76 target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
7777 target triple = "x86_64-pc-linux-gnu"
7878
7979 ; We should be able to link external definition of gBar to its declaration
5757 ; INTERNALIZE2-OPTION-DISABLE: define weak dso_local void @weak_func_prevailing()
5858 ; INTERNALIZE2-OPTION-DISABLE: define weak dso_local void @weak_func_nonprevailing()
5959
60 target datalayout = "e-m:o-i64:64-f80:128-n8:16:32:64-S128"
60 target datalayout = "e-m:o-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
6161 target triple = "x86_64-apple-macosx10.11.0"
6262
6363 define void @foo() {
1919 ; NOTLAZY: 7 bitcode-reader - Number of MDStrings loaded
2020
2121
22 target datalayout = "e-m:o-i64:64-f80:128-n8:16:32:64-S128"
22 target datalayout = "e-m:o-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
2323 target triple = "x86_64-apple-macosx10.11.0"
2424
2525 define void @globalfunc1(i32 %arg) {
2323 ; Check that we imported a ref (and not def) to baz.clone
2424 ; NM2: U baz.clone
2525
26 target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128"
26 target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
2727 target triple = "x86_64-grtev4-linux-gnu"
2828
2929 $baz.clone = comdat any
1616 ; RUN: llvm-lto2 run -save-temps -o %t6.bc %t.bc %t4.bc -r=%t.bc,linkonceodrunnamed,p -r=%t.bc,odrunnamed,p -r=%t4.bc,linkonceodrunnamed, -r=%t4.bc,odrunnamed,
1717 ; RUN: llvm-dis %t6.bc.1.1.promote.bc -o - | FileCheck %s --check-prefix=NOSUMMARY
1818
19 target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128"
19 target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
2020 target triple = "x86_64-grtev4-linux-gnu"
2121
2222 ; In this case all copies are linkonce_odr, so it may be hidden.
2020 ; and inlined into g()
2121 ; NM2-NOT: f
2222
23 target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128"
23 target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
2424 target triple = "x86_64-unknown-linux-gnu"
2525
2626 $c1 = comdat any
77 ; CHECK: define available_externally void @globalfunc
88
99
10 target datalayout = "e-m:o-i64:64-f80:128-n8:16:32:64-S128"
10 target datalayout = "e-m:o-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
1111 target triple = "x86_64-apple-macosx10.11.0"
1212
1313
44 ; RUN: opt -module-summary %s -o %t.bc
55 ; RUN: llvm-dis %t.bc -o - | FileCheck %s
66
7 target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128"
7 target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
88 target triple = "x86_64-unknown-linux-gnu"
99
1010 %struct.S = type { %struct.Derived* }
2727
2828 ; ModuleID = 'local_name_conflict_main.o'
2929 source_filename = "local_name_conflict_main.c"
30 target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128"
30 target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
3131 target triple = "x86_64-unknown-linux-gnu"
3232
3333 ; Function Attrs: noinline nounwind uwtable
1616
1717 ; ModuleID = 'local_name_conflict_var_main.o'
1818 source_filename = "local_name_conflict_var_main.c"
19 target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128"
19 target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
2020 target triple = "x86_64-unknown-linux-gnu"
2121
2222 ; Function Attrs: noinline nounwind uwtable
33 ; RUN: llvm-dis < %t1.bc.thinlto.imported.bc | FileCheck %s --check-prefix=CHECK1
44 ; RUN: llvm-dis < %t2.bc.thinlto.imported.bc | FileCheck %s --check-prefix=CHECK2
55
6 target datalayout = "e-m:o-i64:64-f80:128-n8:16:32:64-S128"
6 target datalayout = "e-m:o-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
77 target triple = "x86_64-apple-macosx10.12.0"
88
99 ; CHECK1: target triple = "x86_64-apple-macosx10.12.0"
6363 ; NM1-NOT: b
6464 ; NM1-NOT: x
6565
66 target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128"
66 target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
6767 target triple = "x86_64-unknown-linux-gnu"
6868
6969 @b = internal global i32 1, align 4
1616 ; NM0: T foo
1717 ; NM1-NOT: foo
1818
19 target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128"
19 target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
2020 target triple = "x86_64-unknown-linux-gnu"
2121
2222 module asm "\09.text"
3030 ; CHECK-NEXT: {{^}} 0{{$}}
3131 ; CHECK-NEXT: }
3232
33 target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128"
33 target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
3434 target triple = "x86_64-unknown-linux-gnu"
3535
3636 declare void @external()
22 ; RUN: -r=%t1.bc,_tinkywinky,pxl \
33 ; RUN: -use-new-pm
44
5 target datalayout = "e-m:o-i64:64-f80:128-n8:16:32:64-S128"
5 target datalayout = "e-m:o-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
66 target triple = "x86_64-apple-macosx10.11.0"
77
88 define void @tinkywinky() {
2929 ; RUN: -r=%t2.o,_ZN1D1mEi,
3030 ; RUN: llvm-dis %t3.1.4.opt.bc -o - | FileCheck %s --check-prefix=CHECK-IR
3131
32 target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128"
32 target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
3333 target triple = "x86_64-grtev4-linux-gnu"
3434
3535 %struct.D = type { i32 (...)** }
1111
1212 ; CHECK-NOT: define available_externally i32 @foo
1313
14 target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128"
14 target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
1515 target triple = "x86_64-pc-linux-gnu"
1616
1717 ; Function Attrs: nounwind ssp uwtable
1717 ; CHECK-NEXT: Section: .text
1818 ; CHECK-NEXT: }
1919
20 target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128"
20 target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
2121 target triple = "x86_64-pc-linux-gnu"
2222
2323 declare void @foo()
4141
4242 ; BINDING-NOT: Name: personality_routine3
4343
44 target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128"
44 target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
4545 target triple = "x86_64-pc-linux-gnu"
4646
4747 declare protected i32 @personality_routine(i32, i32, i64, i8*, i8*)
1212 ; ThinLTOa-DAG: W _ZN4EchoD2Ev
1313 ; ThinLTOb-DAG: T _Z5Alphav
1414
15 target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128"
15 target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
1616 target triple = "x86_64-unknown-linux-gnu"
1717
1818 %struct.Delta = type { %struct.Charlie }
99
1010
1111
12 target datalayout = "e-m:o-i64:64-f80:128-n8:16:32:64-S128"
12 target datalayout = "e-m:o-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
1313 target triple = "x86_64-apple-macosx10.11.0"
1414
1515 ; We shouldn't promote the private because it has a section
2020 ; EXPORT: define void @referencedbyglobal()
2121 ; EXPORT: define internal void @localreferencedbyglobal()
2222
23 target datalayout = "e-m:o-i64:64-f80:128-n8:16:32:64-S128"
23 target datalayout = "e-m:o-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
2424 target triple = "x86_64-apple-macosx10.11.0"
2525
2626 declare void @bar()
2323 ; RUN: ls %t.thin.out | grep x86_64.thinlto.o | count 2
2424
2525
26 target datalayout = "e-m:o-i64:64-f80:128-n8:16:32:64-S128"
26 target datalayout = "e-m:o-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
2727 target triple = "x86_64-apple-macosx10.11.0"
2828
2929 define void @globalfunc() #0 {
44 ; RUN: llvm-nm -o - < %t.bc.thinlto.o | FileCheck %s --check-prefix=EXPORTED
55 ; RUN: llvm-nm -o - < %t2.bc.thinlto.o 2>&1 | FileCheck %s --check-prefix=NOT_EXPORTED
66
7 target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128"
7 target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
88 target triple = "x86_64-unknown-linux-gnu"
99
1010 $__llvm_profile_filename = comdat any
33 ; RUN: llvm-lto -thinlto-action=internalize -thinlto-index %t-index.bc %t.bc -o %t.promote.bc
44 ; RUN: llvm-dis %t.promote.bc -o - | FileCheck %s
55
6 target datalayout = "e-m:o-i64:64-f80:128-n8:16:32:64-S128"
6 target datalayout = "e-m:o-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
77 target triple = "x86_64-apple-macosx10.15.0"
88
99 @llvm.used = appending global [1 x i8*] [i8* bitcast (i32 ()* @foo to i8*)], section "llvm.metadata"
2424 ; ThinLTO-FREESTANDING: fprintf
2525
2626
27 target datalayout = "e-m:o-i64:64-f80:128-n8:16:32:64-S128"
27 target datalayout = "e-m:o-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
2828 target triple = "x86_64-apple-macosx10.11.0"
2929
3030 declare i32 @fprintf(%FILE*, i8*, ...)
1111 ; CHECK: @_ZZN9SingletonI1SE11getInstanceEvE13instance_weak = available_externally dso_local global %struct.S* null, align 8
1212 ; CHECK: define internal dereferenceable(16) %struct.S* @_ZN9SingletonI1SE11getInstanceEv() comdat
1313
14 target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128"
14 target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
1515 target triple = "x86_64-unknown-linux-gnu"
1616
1717 %struct.S = type { i64, i64 }
1111 ; When exported, we always preserve a linkonce
1212 ; RUN: llvm-lto -thinlto-action=promote %t.bc -thinlto-index=%t3.bc -o - --exported-symbol=linkonceodrfuncInSingleModule | llvm-dis -o - | FileCheck %s --check-prefix=EXPORTED
1313
14 target datalayout = "e-m:o-i64:64-f80:128-n8:16:32:64-S128"
14 target datalayout = "e-m:o-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
1515 target triple = "x86_64-apple-macosx10.11.0"
1616
1717 ; Alias are resolved, but can't be turned into "available_externally"
2424 ; OPTIMIZE-NEXT: %2 = tail call i32 @rand()
2525 ; OPTIMIZE-NEXT: ret i32 0
2626
27 target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128"
27 target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
2828 target triple = "x86_64-pc-linux-gnu"
2929
3030 @gBar = external global i32
3636 ; CODEGEN-SRC-NEXT: %2 = tail call i32 @rand()
3737 ; CODEGEN-SRC-NEXT: ret void
3838
39 target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128"
39 target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
4040 target triple = "x86_64-pc-linux-gnu"
4141
4242 ; We should be able to link external definition of gBar to its declaration
None target datalayout = "e-m:w-i64:64-f80:128-n8:16:32:64-S128"
0 target datalayout = "e-m:w-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
11 target triple = "x86_64-pc-windows-msvc19.0.24215"
22
33 define void @main() {
0 ; ModuleID = 'funcimport_debug.o'
1 target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128"
1 target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
22 target triple = "x86_64-unknown-linux-gnu"
33
44 ; Function Attrs: nounwind uwtable
None target datalayout = "e-m:o-i64:64-f80:128-n8:16:32:64-S128"
0 target datalayout = "e-m:o-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
11 target triple = "x86_64-apple-macosx10.11.0"
22
33 define void @foo() {
None target datalayout = "e-m:o-i64:64-f80:128-n8:16:32:64-S128"
0 target datalayout = "e-m:o-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
11 target triple = "x86_64-apple-macosx10.11.0"
22
33 define linkonce_odr void @linkonceodrfunc() {
None target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128"
0 target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
11 target triple = "x86_64-unknown-linux-gnu"
22
33 @link = internal global i32 0, align 4
0 ; ModuleID = 'thinlto-function-summary-callgraph-profile-summary2.ll'
1 target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128"
1 target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
22 target triple = "x86_64-unknown-linux-gnu"
33
44
0 ; ModuleID = 'import_stats2.ll'
1 target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128"
1 target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
22 target triple = "x86_64-unknown-linux-gnu"
33
44 @globalvar = global i32 1, align 4
None target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128"
0 target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
11 target triple = "x86_64-unknown-linux-gnu"
22
33 define weak i32 @foo() {
1010 ; RUN: -r %t2.bc,lwt_fun,
1111 ; RUN: llvm-dis -o - %t3.1.3.import.bc | FileCheck %s
1212
13 target datalayout = "e-m:w-i64:64-f80:128-n8:16:32:64-S128"
13 target datalayout = "e-m:w-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
1414 target triple = "x86_64-pc-windows-msvc19.0.24215"
1515
1616 ; CHECK: $lwt.llvm.[[HASH:[0-9]+]] = comdat any
1919 ; CHECK-NOT: distinct !DISubprogram
2020
2121 ; ModuleID = 'funcimport_debug.o'
22 target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128"
22 target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
2323 target triple = "x86_64-unknown-linux-gnu"
2424
2525 ; Function Attrs: nounwind uwtable
3737 ; INSTLIM8: Is importing function {{.*}} f from {{.*}}funcimport_resolved1.ll
3838 ; INSTLIM8-NOT: Is importing function {{.*}} linkonceodrfunc from {{.*}}funcimport_resolved2.ll
3939
40 target datalayout = "e-m:o-i64:64-f80:128-n8:16:32:64-S128"
40 target datalayout = "e-m:o-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
4141 target triple = "x86_64-apple-macosx10.11.0"
4242
4343 define i32 @main() #0 {
1414
1515 ; REQUIRES: x86-registered-target
1616
17 target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128"
17 target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
1818 target triple = "x86_64-unknown-linux-gnu"
1919
2020 define i32 @_Z4LinkPKcS0_(i8*, i8*) local_unnamed_addr {
7373
7474
7575 ; ModuleID = 'thinlto-function-summary-callgraph.ll'
76 target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128"
76 target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
7777 target triple = "x86_64-unknown-linux-gnu"
7878
7979 ; This function have high profile count, so entry block is hot.
2727 ; THINLINKSTATS-DAG: 1 function-import - Number of hot functions thin link decided to import
2828
2929 ; ModuleID = 'import_stats.ll'
30 target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128"
30 target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
3131 target triple = "x86_64-unknown-linux-gnu"
3232
3333 ; This function has a high profile count, so entry block is hot.
44
55 ; CHECK: Interposable and available_externally/linkonce_odr/weak_odr symbol
66
7 target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128"
7 target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
88 target triple = "x86_64-unknown-linux-gnu"
99
1010 define available_externally i32 @foo() {
None target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128"
0 target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
11 target triple = "x86_64-unknown-linux-gnu"
22
33 $__llvm_profile_filename = comdat any
None target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128"
0 target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
11 target triple = "x86_64-unknown-linux-gnu"
22
33 @odd = common dso_local global i32 0, align 4
None target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128"
0 target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
11 target triple = "x86_64-unknown-linux-gnu"
22
33 source_filename = "thinlto_indirect_call_promotion.c"
None target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128"
0 target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
11 target triple = "x86_64-unknown-linux-gnu"
22
33 @fptr = external local_unnamed_addr global void ()*, align 8
None target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128"
0 target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
11 target triple = "x86_64-unknown-linux-gnu"
22
33 ; Function Attrs: norecurse nounwind readnone uwtable
None target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128"
0 target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
11 target triple = "x86_64-unknown-linux-gnu"
22
33 define void @_ZL3barv() #1 {
None target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128"
0 target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
11 target triple = "x86_64-unknown-linux-gnu"
22
33 @fptr = external local_unnamed_addr global void ()*, align 8
0 ; RUN: opt < %s -pgo-instr-gen -instrprof -S | llc | FileCheck %s --check-prefix=MACHO-DIRECTIVE
11
2 target datalayout = "e-m:o-i64:64-f80:128-n8:16:32:64-S128"
2 target datalayout = "e-m:o-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
33 target triple = "x86_64-apple-macosx10.11.0"
44
55 ; MACHO-DIRECTIVE: .weak_definition ___llvm_profile_raw_version
1717 ; RUN: opt < %s -pgo-instr-use -pgo-test-profile-file=%t.profdata -pass-remarks=pgo-instrumentation -pgo-emit-branch-prob -S 2>&1| FileCheck %s --check-prefix=ANALYSIS
1818 ; RUN: opt < %s -passes=pgo-instr-use -pgo-test-profile-file=%t.profdata -pass-remarks=pgo-instrumentation -pgo-emit-branch-prob -S 2>&1| FileCheck %s --check-prefix=ANALYSIS
1919
20 target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128"
20 target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
2121 target triple = "x86_64-unknown-linux-gnu"
2222 ; GEN-DARWIN-LINKONCE: target triple = "x86_64-apple-darwin"
2323
22 ; RUN: llvm-profdata merge %S/Inputs/branch2.proftext -o %t.profdata
33 ; RUN: opt < %s -pgo-instr-use -pgo-test-profile-file=%t.profdata -S | FileCheck %s --check-prefix=USE
44 ; RUN: opt < %s -passes=pgo-instr-use -pgo-test-profile-file=%t.profdata -S | FileCheck %s --check-prefix=USE
5 target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128"
5 target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
66 target triple = "x86_64-unknown-linux-gnu"
77
88 ; GEN: $__llvm_profile_raw_version = comdat any
0 ; RUN: opt < %s -pgo-instr-gen -instrprof -S | FileCheck %s
11 ; RUN: opt < %s -passes=pgo-instr-gen,instrprof -S | FileCheck %s
2 target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128"
2 target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
33 target triple = "x86_64-unknown-linux-gnu"
44
55 $foo = comdat any
22 ; RUN: llvm-profdata merge %S/Inputs/criticaledge.proftext -o %t.profdata
33 ; RUN: opt < %s -pgo-instr-use -pgo-test-profile-file=%t.profdata -S | FileCheck %s --check-prefix=USE
44 ; RUN: opt < %s -passes=pgo-instr-use -pgo-test-profile-file=%t.profdata -S | FileCheck %s --check-prefix=USE
5 target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128"
5 target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
66 target triple = "x86_64-unknown-linux-gnu"
77
88 ; GEN: $__llvm_profile_raw_version = comdat any
33 ; RUN: opt < %s -O2 -disable-preinline -pgo-kind=pgo-instr-use-pipeline -profile-file=%t.profdata -S | FileCheck %s --check-prefix=PGOSUMMARY
44 ; RUN: opt < %s -O2 -disable-preinline -pgo-kind=pgo-instr-use-pipeline -profile-file=%t.profdata -S -cspgo-kind=cspgo-instr-use-pipeline| FileCheck %s --check-prefix=CSPGOSUMMARY
55
6 target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128"
6 target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
77 target triple = "x86_64-unknown-linux-gnu"
88
99 @odd = common dso_local global i32 0, align 4
33
44 ; CHECK: Not an IR level instrumentation profile
55
6 target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128"
6 target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
77 target triple = "x86_64-unknown-linux-gnu"
88
99 define i32 @foo() {
33
44 ; CHECK: Function control flow change detected (hash mismatch) foo
55
6 target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128"
6 target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
77 target triple = "x86_64-unknown-linux-gnu"
88
99 define i32 @foo() {
77 ; CHECK: No profile data available for function bar
88 ; DEFAULT-NOT: No profile data available for function bar
99
10 target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128"
10 target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
1111 target triple = "x86_64-unknown-linux-gnu"
1212
1313 define i32 @bar() {
0 ; RUN: not opt < %s -pgo-instr-use -pgo-test-profile-file=%t.profdata -S 2>&1
11 ; RUN: not opt < %s -passes=pgo-instr-use -pgo-test-profile-file=%t.profdata -S 2>&1
22
3 target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128"
3 target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
44 target triple = "x86_64-unknown-linux-gnu"
55
66 define i32 @foo() {
22
33 ; CHECK: Inconsistent number of value sites for memory intrinsic functions size profiling
44
5 target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128"
5 target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
66 target triple = "x86_64-unknown-linux-gnu"
77
88 define void @foo(i8* %dst, i8* %src, i64 %n) {
0 ; RUN: opt < %s -pgo-instr-gen -S | FileCheck %s
11 ; RUN: opt < %s -passes=pgo-instr-gen -S | FileCheck %s
22
3 target datalayout = "e-m:o-i64:64-f80:128-n8:16:32:64-S128"
3 target datalayout = "e-m:o-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
44 target triple = "x86_64-apple-macosx10.12.0"
55
66 define i32 @f1() {
0 ; RUN: llvm-profdata merge %S/Inputs/func_entry.proftext -o %t.profdata
11 ; RUN: opt < %s -passes=pgo-instr-use -pgo-test-profile-file=%t.profdata -S | FileCheck %s
22
3 target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128"
3 target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
44 target triple = "x86_64-unknown-linux-gnu"
55
66 @s = common dso_local local_unnamed_addr global i32 0, align 4
0 ; RUN: opt < %s -pgo-icall-prom -S | FileCheck %s --check-prefix=ICALL-PROM
11 ; RUN: opt < %s -passes=pgo-icall-prom -S | FileCheck %s --check-prefix=ICALL-PROM
2 target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128"
2 target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
33 target triple = "x86_64-unknown-linux-gnu"
44
55 %struct.D = type { %struct.B }
0 ; RUN: opt < %s -pgo-icall-prom -S | FileCheck %s --check-prefix=ICALL-PROM
11 ; RUN: opt < %s -passes=pgo-icall-prom -S | FileCheck %s --check-prefix=ICALL-PROM
2 target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128"
2 target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
33 target triple = "x86_64-unknown-linux-gnu"
44 %struct.D = type { %struct.B }
55 %struct.B = type { i32 (...)** }
0 ; RUN: opt < %s -icp-lto -pgo-icall-prom -S | FileCheck %s --check-prefix=ICP
11 ; RUN: opt < %s -icp-lto -passes=pgo-icall-prom -S | FileCheck %s --check-prefix=ICP
2 target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128"
2 target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
33 target triple = "x86_64-unknown-linux-gnu"
44
55 @foo1 = global void ()* null, align 8
0 ; RUN: opt < %s -icp-lto -pgo-icall-prom -S | FileCheck %s --check-prefix=ICP
1 target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128"
1 target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
22 target triple = "x86_64-unknown-linux-gnu"
33
44 @_ZTISt9exception = external constant i8*
44 ; CHECK: remark: :0:0: Cannot promote indirect call: target with md5sum{{.*}} not found
55 ; CHECK: remark: :0:0: Cannot promote indirect call to func2 with count of 7890: Return type mismatch
66
7 target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128"
7 target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
88 target triple = "x86_64-unknown-linux-gnu"
99
1010 @foo = common global i32 ()* null, align 8
0 ; RUN: opt < %s -pgo-icall-prom -S | FileCheck %s --check-prefix=ICALL-PROM
11 ; RUN: opt < %s -passes=pgo-icall-prom -S | FileCheck %s --check-prefix=ICALL-PROM
2 target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128"
2 target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
33 target triple = "x86_64-unknown-linux-gnu"
44
55 @foo = common global i32 (i32, ...)* null, align 8
0 ; RUN: llvm-profdata merge %S/Inputs/indirect_call.proftext -o %t.profdata
11 ; RUN: opt < %s -pgo-instr-use -pgo-test-profile-file=%t.profdata -S | FileCheck %s --check-prefix=VP-ANNOTATION
22 ; RUN: opt < %s -passes=pgo-instr-use -pgo-test-profile-file=%t.profdata -S | FileCheck %s --check-prefix=VP-ANNOTATION
3 target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128"
3 target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
44 target triple = "x86_64-unknown-linux-gnu"
55
66 @foo = common global i32 (i32)* null, align 8
11 ; RUN: opt < %s -passes=pgo-instr-gen -S | FileCheck %s --check-prefix=GEN
22 ; RUN: opt < %s -passes=pgo-instr-gen,instrprof -S | FileCheck %s --check-prefix=LOWER
33
4 target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128"
4 target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
55 target triple = "x86_64-unknown-linux-gnu"
66
77 $foo3 = comdat any
1414 ; PASS2-REMARK-NOT: remark: :0:0: Promote indirect call to func3
1515 ; PASS2-REMARK-NOT: remark: :0:0: Promote indirect call to func1
1616
17 target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128"
17 target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
1818 target triple = "x86_64-unknown-linux-gnu"
1919
2020 @foo = common global i32 ()* null, align 8
0 ; RUN: opt < %s -pgo-icall-prom -S | FileCheck %s
11
2 target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128"
2 target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
33 target triple = "x86_64-unknown-linux-gnu"
44
55 %struct.A = type { i8 }
33 ; RUN: opt < %s -passes=pgo-instr-use -pgo-test-profile-file=%t.profdata -S | FileCheck %s --check-prefix=USE
44 ; RUN: opt < %s -passes=pgo-instr-use -pgo-test-profile-file=%t.profdata -S | opt -S -analyze -branch-prob | FileCheck %s --check-prefix=BRANCHPROB
55
6 target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128"
6 target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
77 target triple = "x86_64-unknown-linux-gnu"
88
99 @foo.table = internal unnamed_addr constant [3 x i8*] [i8* blockaddress(@foo, %return), i8* blockaddress(@foo, %label2), i8* blockaddress(@foo, %label3)], align 16
22 ; RUN: llvm-profdata merge %S/Inputs/landingpad.proftext -o %t.profdata
33 ; RUN: opt < %s -pgo-instr-use -pgo-test-profile-file=%t.profdata -S | FileCheck %s --check-prefix=USE
44 ; RUN: opt < %s -passes=pgo-instr-use -pgo-test-profile-file=%t.profdata -S | FileCheck %s --check-prefix=USE
5 target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128"
5 target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
66 target triple = "x86_64-unknown-linux-gnu"
77
88 @val = global i32 0, align 4
11 ; RUN: opt < %s -pgo-instr-use -pgo-test-profile-file=%t.profdata -pass-remarks=pgo-instrumentation -pgo-emit-branch-prob -S 2>&1| FileCheck %s --check-prefix=ANALYSIS
22 ; RUN: opt < %s -passes=pgo-instr-use -pgo-test-profile-file=%t.profdata -pass-remarks=pgo-instrumentation -pgo-emit-branch-prob -S 2>&1| FileCheck %s --check-prefix=ANALYSIS
33
4 target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128"
4 target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
55 target triple = "x86_64-unknown-linux-gnu"
66
77 define i32 @test(i32 %i) {
22 ; RUN: llvm-profdata merge %S/Inputs/loop1.proftext -o %t.profdata
33 ; RUN: opt < %s -pgo-instr-use -pgo-test-profile-file=%t.profdata -S | FileCheck %s --check-prefix=USE
44 ; RUN: opt < %s -passes=pgo-instr-use -pgo-test-profile-file=%t.profdata -S | FileCheck %s --check-prefix=USE
5 target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128"
5 target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
66 target triple = "x86_64-unknown-linux-gnu"
77
88 ; GEN: $__llvm_profile_raw_version = comdat any
22 ; RUN: llvm-profdata merge %S/Inputs/loop2.proftext -o %t.profdata
33 ; RUN: opt < %s -pgo-instr-use -pgo-test-profile-file=%t.profdata -S | FileCheck %s --check-prefix=USE
44 ; RUN: opt < %s -passes=pgo-instr-use -pgo-test-profile-file=%t.profdata -S | FileCheck %s --check-prefix=USE
5 target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128"
5 target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
66 target triple = "x86_64-unknown-linux-gnu"
77
88 ; GEN: $__llvm_profile_raw_version = comdat any
0 ; RUN: opt < %s -pgo-instr-gen -instrprof -S | FileCheck %s
11 ; RUN: opt <%s -passes=pgo-instr-gen,instrprof -S | FileCheck %s
2 target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128"
2 target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
33 target triple = "x86_64-unknown-linux-gnu"
44
55 define void @foo(i8* %dst, i8* %src, i32* %a, i32 %n) {
33 ; RUN: opt < %s -pgo-instr-use -pgo-test-profile-file=%t.profdata -S | FileCheck %s --check-prefixes=MEMOP_ANNOTATION,MEMOP_ANNOTATION4
44 ; RUN: opt < %s -passes=pgo-instr-use -pgo-test-profile-file=%t.profdata -S | FileCheck %s --check-prefixes=MEMOP_ANNOTATION,MEMOP_ANNOTATION4
55
6 target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128"
6 target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
77 target triple = "x86_64-unknown-linux-gnu"
88
99 define void @foo(i8* %dst, i8* %src, i32* %a, i32 %n) {
55 ; RUN: FileCheck %s -input-file=%t.opt.yaml --check-prefix=YAML
66
77
8 target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128"
8 target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
99 target triple = "x86_64-unknown-linux-gnu"
1010
1111 define void @foo(i8* %dst, i8* %src, i8* %dst2, i8* %src2, i32* %a, i32 %n) !prof !27 {
22 ; RUN: opt < %s -passes=pgo-memop-opt -verify-dom-info -pgo-memop-count-threshold=1 -S | FileCheck %s --check-prefix=MEMOP_OPT
33 ; RUN: opt < %s -pgo-memop-opt -verify-dom-info -pgo-memop-count-threshold=1 -S | FileCheck %s --check-prefix=MEMOP_OPT
44
5 target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128"
5 target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
66 target triple = "x86_64-unknown-linux-gnu"
77
88 define void @foo(i8* %dst, i8* %src, i64 %conv) !prof !0 {
0 ; RUN: llvm-profdata merge %S/Inputs/multiple_hash_profile.proftext -o %t.profdata
11 ; RUN: opt < %s -pgo-instr-use -pgo-test-profile-file=%t.profdata -S | FileCheck %s
22 ; RUN: opt < %s -passes=pgo-instr-use -pgo-test-profile-file=%t.profdata -S | FileCheck %s
3 target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128"
3 target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
44 target triple = "x86_64-unknown-linux-gnu"
55
66 $_Z3fooi = comdat any
22 ; RUN: opt < %s -passes=pgo-instr-use -pgo-test-profile-file=%t.profdata -S | FileCheck %s --check-prefix=USE
33 ; REQUIRES: asserts
44
5 target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128"
5 target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
66 target triple = "x86_64-unknown-linux-gnu"
77
88 declare i32 @bar0(i32)
0 ; RUN: opt < %s -O2 -pgo-kind=pgo-instr-gen-pipeline -S | FileCheck %s --check-prefix=GEN
11 ; RUN: opt < %s -O2 -pgo-kind=pgo-instr-gen-pipeline -profile-file=default.profraw -S | FileCheck %s --check-prefix=GEN
2 target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128"
2 target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
33 target triple = "x86_64-unknown-linux-gnu"
44
55 define i32 @foo(i32 %i) {
0 ; RUN: llvm-profdata merge %S/Inputs/remap.proftext -o %t.profdata
11 ; RUN: opt < %s -passes=pgo-instr-use -pgo-test-profile-file=%t.profdata -pgo-test-profile-remapping-file=%S/Inputs/remap.map -S | FileCheck %s --check-prefix=USE
22
3 target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128"
3 target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
44 target triple = "x86_64-unknown-linux-gnu"
55
66 define i32 @_ZN3foo3barERKN1M1XINS_6detail3quxEEE(i32 %i) {
44 ; RUN: llvm-profdata merge %S/Inputs/select1.proftext -o %t.profdata
55 ; RUN: opt < %s -pgo-instr-use -pgo-test-profile-file=%t.profdata -pgo-instr-select=true -S | FileCheck %s --check-prefix=USE
66 ; RUN: opt < %s -passes=pgo-instr-use -pgo-test-profile-file=%t.profdata -pgo-instr-select=true -S | FileCheck %s --check-prefix=USE
7 target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128"
7 target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
88 target triple = "x86_64-unknown-linux-gnu"
99
1010 define i32 @test_br_2(i32 %i) {
11 ; RUN: opt < %s -pgo-instr-use -pgo-test-profile-file=%t.profdata -pgo-instr-select=true -S | FileCheck %s --check-prefix=USE
22 ; RUN: opt < %s -passes=pgo-instr-use -pgo-test-profile-file=%t.profdata -pgo-instr-select=true -S | FileCheck %s --check-prefix=USE
33
4 target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128"
4 target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
55 target triple = "x86_64-unknown-linux-gnu"
66
77 define i32 @foo(i32 %n) {
11 ; RUN: opt < %s -pgo-instr-use -pgo-test-profile-file=%t.profdata -pgo-instr-select=true -S | FileCheck %s
22 ; RUN: opt < %s -passes=pgo-instr-use -pgo-test-profile-file=%t.profdata -pgo-instr-select=true -S | FileCheck %s
33
4 target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128"
4 target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
55 target triple = "x86_64-unknown-linux-gnu"
66
77 @a = common dso_local local_unnamed_addr global [16 x i32] zeroinitializer, align 16
0 ; RUN: opt < %s -pgo-instr-gen -S | FileCheck %s --check-prefix=GEN
11 ; RUN: opt < %s -passes=pgo-instr-gen -S | FileCheck %s --check-prefix=GEN
2 target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128"
2 target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
33 target triple = "x86_64-unknown-linux-gnu"
44
55 ; GEN: $__llvm_profile_raw_version = comdat any
33 ; RUN: opt %s -passes=pgo-instr-gen -static-func-strip-dirname-prefix=1000 -S | FileCheck %s --check-prefix=NOPATH
44 ; RUN: opt %s --pgo-instr-gen -static-func-strip-dirname-prefix=1 -S | FileCheck %s --check-prefix=HASPATH
55 ; RUN: opt %s -passes=pgo-instr-gen -static-func-strip-dirname-prefix=1 -S | FileCheck %s --check-prefix=HASPATH
6 target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128"
6 target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
77 target triple = "x86_64-unknown-linux-gnu"
88
99 ; NOPATH: @__profn_statics_counter_naming.ll_func = private constant [30 x i8] c"statics_counter_naming.ll:func"
22 ; RUN: llvm-profdata merge %S/Inputs/switch.proftext -o %t.profdata
33 ; RUN: opt < %s -pgo-instr-use -pgo-test-profile-file=%t.profdata -S | FileCheck %s --check-prefix=USE
44 ; RUN: opt < %s -passes=pgo-instr-use -pgo-test-profile-file=%t.profdata -S | FileCheck %s --check-prefix=USE
5 target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128"
5 target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
66 target triple = "x86_64-unknown-linux-gnu"
77
88 ; GEN: $__llvm_profile_raw_version = comdat any
1818 ; CSGEN: @__profd_
1919
2020 source_filename = "cspgo.c"
21 target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128"
21 target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
2222 target triple = "x86_64-unknown-linux-gnu"
2323
2424 $__llvm_profile_filename = comdat any
1717 ; CSUSE-DAG: {{![0-9]+}} = !{!"branch_weights", i32 0, i32 100000}
1818
1919 source_filename = "cspgo.c"
20 target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128"
20 target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
2121 target triple = "x86_64-unknown-linux-gnu"
2222
2323 define dso_local void @foo() #0 !prof !29 {
1111 ; PASS-REMARK: Promote indirect call to a with count 1 out of 1
1212 ; PASS-REMARK: Promote indirect call to c.llvm.0 with count 1 out of 1
1313
14 target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128"
14 target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
1515 target triple = "x86_64-unknown-linux-gnu"
1616
1717 @foo = external local_unnamed_addr global void ()*, align 8
88 ; IMPORTS: Import _ZL3foov.llvm.0
99 ; RUN: opt %t4.bc -icp-lto -pgo-icall-prom -S | FileCheck %s --check-prefix=ICALL-PROM
1010
11 target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128"
11 target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
1212 target triple = "x86_64-unknown-linux-gnu"
1313
1414 @fptr = local_unnamed_addr global void ()* null, align 8
2323 ; RUN: llvm-dis < %t3.3.2.internalize.bc | FileCheck %s --check-prefix=INTERNALIZE
2424 ; INTERNALIZE: define dso_local void @_ZL3barv
2525
26 target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128"
26 target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
2727 target triple = "x86_64-unknown-linux-gnu"
2828
2929 @fptr = local_unnamed_addr global void ()* null, align 8
99 ; Make sure we import the promted indirectly called target
1010 ; IMPORTS: Import _ZL3foov.llvm.0
1111
12 target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128"
12 target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
1313 target triple = "x86_64-unknown-linux-gnu"
1414
1515 @fptr = local_unnamed_addr global void ()* null, align 8
1111 ; RUN: -r %t.bc,main,plx -r %t.bc,_ZL3foov,l -compute-dead=false
1212 ; RUN: llvm-dis < %t2.1.4.opt.bc | FileCheck %s --check-prefix=OPT-NODEAD
1313
14 target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128"
14 target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
1515 target triple = "x86_64-unknown-linux-gnu"
1616
1717 @fptr = local_unnamed_addr global void ()* null, align 8
11 ; RUN: opt < %s -pgo-instr-use -pgo-test-profile-file=%t.profdata -S | FileCheck %s --check-prefix=USE
22 ; RUN: opt < %s -passes=pgo-instr-use -pgo-test-profile-file=%t.profdata -S | FileCheck %s --check-prefix=USE
33
4 target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128"
4 target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
55 target triple = "x86_64-unknown-linux-gnu"
66
77 define void @foo() {
1414 ; is accepted).
1515 ; RUN: llvm-lto2 run %t1.bc -o %t.o -use-new-pm -r %t1.bc,patatino,px
1616
17 target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128"
17 target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
1818 target triple = "x86_64-unknown-linux-gnu"
1919
2020 define void @patatino() {
55 ; RUN: llvm-lto2 run %t1.bc -o %t.o -r %t1.bc,patatino,px -stats-file=%t2.stats
66 ; RUN: FileCheck --input-file=%t2.stats %s
77
8 target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128"
8 target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
99 target triple = "x86_64-unknown-linux-gnu"
1010
1111 define void @patatino() {