1; Basic ThinLTO tests.
2; RUN: opt -module-summary %s -o %t1.o
3; RUN: opt -module-summary %p/Inputs/thinlto.ll -o %t2.o
4
5; First force single-threaded mode
6; RUN: rm -f %t31.lto.o %t32.lto.o
7; RUN: wasm-ld -r -save-temps --thinlto-jobs=1 %t1.o %t2.o -o %t3
8; RUN: llvm-nm %t31.lto.o | FileCheck %s --check-prefix=NM1
9; RUN: llvm-nm %t32.lto.o | FileCheck %s --check-prefix=NM2
10
11; Next force multi-threaded mode
12; RUN: rm -f %t31.lto.o %t32.lto.o
13; RUN: wasm-ld -r -save-temps --thinlto-jobs=2 %t1.o %t2.o -o %t3
14; RUN: llvm-nm %t31.lto.o | FileCheck %s --check-prefix=NM1
15; RUN: llvm-nm %t32.lto.o | FileCheck %s --check-prefix=NM2
16
17; Check without --thinlto-jobs (which currently default to hardware_concurrency)
18; RUN: wasm-ld -r %t1.o %t2.o -o %t3
19; RUN: llvm-nm %t31.lto.o | FileCheck %s --check-prefix=NM1
20; RUN: llvm-nm %t32.lto.o | FileCheck %s --check-prefix=NM2
21
22; NM1: T f
23; NM2: T g
24
25target datalayout = "e-m:e-p:32:32-i64:64-n32:64-S128"
26target triple = "wasm32-unknown-unknown"
27
28declare void @g(...)
29
30define void @f() {
31entry:
32  call void (...) @g()
33  ret void
34}
35