Debian Codegraph @

llvm/test/ThinLTO/X86/dtlto/summary.ll

raw
1 ; Check that DTLTO creates identical summary index shard files as are created
2 ; for an equivalent ThinLTO link.
3
4 RUN: rm -rf %t && split-file %s %t && cd %t
5
6 ; Generate ThinLTO bitcode files.
7 RUN: opt -thinlto-bc t1.ll -o t1.bc
8 RUN: opt -thinlto-bc t2.ll -o t2.bc
9
10 ; Generate fake object files for mock.py to return.
11 RUN: touch t1.o t2.o
12
13 ; Define a substitution to share the common arguments.
14 DEFINE: %{command} = llvm-lto2 run t1.bc t2.bc -o t.o \
15 DEFINE: -r=t1.bc,t1,px \
16 DEFINE: -r=t2.bc,t2,px \
17 DEFINE: -r=t2.bc,t1 \
18 DEFINE: -thinlto-emit-indexes
19
20 ; Perform DTLTO.
21 RUN: %{command} \
22 RUN: -dtlto-distributor=%python \
23 RUN: -dtlto-distributor-arg=%llvm_src_root/utils/dtlto/mock.py,t1.o,t2.o
24
25 ; Perform ThinLTO.
26 RUN: %{command}
27
28 ; Check for equivalence. We use a wildcard to account for the PID.
29 RUN: cmp t1.1.*.native.o.thinlto.bc t1.bc.thinlto.bc
30 RUN: cmp t2.2.*.native.o.thinlto.bc t2.bc.thinlto.bc
31
32 ;--- t1.ll
33 target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128"
34 target triple = "x86_64-unknown-linux-gnu"
35
36 define void @t1() {
37 entry:
38 ret void
39 }
40
41 ;--- t2.ll
42 target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
43 target triple = "x86_64-unknown-linux-gnu"
44
45 declare void @t1(...)
46
47 define void @t2() {
48 entry:
49 call void (...) @t1()
50 ret void
51 }