brintos

brintos / llvm-project-archived public Read only

0
0
Text · 2.5 KiB · f991341 Raw
64 lines · plain
1; REQUIRES: x862 3; Basic ThinLTO tests.4; RUN: opt -thinlto-bc %s -o %t1.obj5; RUN: opt -thinlto-bc %p/Inputs/thinlto.ll -o %t2.obj6; RUN: opt -thinlto-bc %p/Inputs/thinlto-empty.ll -o %t3.obj7 8; Ensure lld generates an index and not a binary if requested.9; RUN: rm -f %t4.exe10; RUN: lld-link -thinlto-index-only -entry:main %t1.obj %t2.obj -out:%t4.exe11; RUN: llvm-bcanalyzer -dump %t1.obj.thinlto.bc | FileCheck %s --check-prefix=BACKEND112; RUN: llvm-bcanalyzer -dump %t2.obj.thinlto.bc | FileCheck %s --check-prefix=BACKEND213; RUN: not test -e %t4.exe14 15; The backend index for this module contains summaries from itself and16; Inputs/thinlto.ll, as it imports from the latter.17; BACKEND1: <MODULE_STRTAB_BLOCK18; BACKEND1-NEXT: <ENTRY {{.*}} record string = '{{.*}}thinlto-index-only.ll.tmp{{.*}}.obj'19; BACKEND1: <ENTRY {{.*}} record string = '{{.*}}thinlto-index-only.ll.tmp{{.*}}.obj'20; BACKEND1-NOT: <ENTRY21; BACKEND1: </MODULE_STRTAB_BLOCK22; BACKEND1: <GLOBALVAL_SUMMARY_BLOCK23; BACKEND1: <VERSION24; BACKEND1: <FLAGS25; BACKEND1: <VALUE_GUID {{.*}} op0={{1|2}} {{op1=3060885059 op2=1207956914|op1=3684000822 op2=3884832250}}26; BACKEND1: <VALUE_GUID {{.*}} op0={{1|2}} {{op1=3060885059 op2=1207956914|op1=3684000822 op2=3884832250}}27; BACKEND1: <COMBINED28; BACKEND1: <COMBINED29; BACKEND1: </GLOBALVAL_SUMMARY_BLOCK30 31; The backend index for Input/thinlto.ll contains summaries from itself only,32; as it does not import anything.33; BACKEND2: <MODULE_STRTAB_BLOCK34; BACKEND2-NEXT: <ENTRY {{.*}} record string = '{{.*}}thinlto-index-only.ll.tmp2.obj'35; BACKEND2-NOT: <ENTRY36; BACKEND2: </MODULE_STRTAB_BLOCK37; BACKEND2-NEXT: <GLOBALVAL_SUMMARY_BLOCK38; BACKEND2-NEXT: <VERSION39; BACKEND2-NEXT: <FLAGS40; BACKEND2-NEXT: <VALUE_GUID {{.*}} op0=1 op1=3060885059 op2=120795691441; BACKEND2-NEXT: <COMBINED42; BACKEND2-NEXT: </GLOBALVAL_SUMMARY_BLOCK43 44; Thin archive tests. Check that the module paths point to the original files.45; RUN: rm -rf %t46; RUN: mkdir %t47; RUN: opt -thinlto-bc -o %t/foo.obj < %s48; RUN: opt -thinlto-bc -o %t/bar.obj < %p/Inputs/thinlto.ll49; RUN: llvm-ar rcsT %t5.lib %t/bar.obj %t3.obj50; RUN: lld-link -thinlto-index-only -entry:main %t/foo.obj %t5.lib51; RUN: llvm-dis -o - %t/foo.obj.thinlto.bc | FileCheck %s --check-prefix=THINARCHIVE52; THINARCHIVE: ^0 = module: (path: "{{.*}}bar.obj",53; THINARCHIVE: ^1 = module: (path: "{{.*}}foo.obj",54 55target datalayout = "e-m:w-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"56target triple = "x86_64-pc-windows-msvc19.0.24215"57 58declare void @g(...)59 60define void @main() {61  call void (...) @g()62  ret void63}64