41 lines · plain
1# REQUIRES: x862 3## Test that DTLTO works with more than one LTO partition.4 5RUN: rm -rf %t && split-file %s %t && cd %t6 7RUN: sed 's/@f/@t1/g' f.ll > t1.ll8RUN: sed 's/@f/@t2/g' f.ll > t2.ll9 10## Generate bitcode.11RUN: opt f.ll -o full.bc12RUN: opt -thinlto-bc t1.ll -o thin1.bc13RUN: opt -thinlto-bc t2.ll -o thin2.bc14 15## Generate object files for mock.py to return.16RUN: llc t1.ll --filetype=obj -o thin1.o17RUN: llc t2.ll --filetype=obj -o thin2.o18 19## Link with 3 LTO partitions.20RUN: ld.lld full.bc thin1.bc thin2.bc \21RUN: --thinlto-distributor=%python \22RUN: --thinlto-distributor-arg=%llvm_src_root/utils/dtlto/mock.py \23RUN: --thinlto-distributor-arg=thin1.o \24RUN: --thinlto-distributor-arg=thin2.o \25RUN: --save-temps \26RUN: --lto-partitions=327 28## DTLTO temporary object files include the task number and a PID component. The29## task number should incorporate the LTO partition number.30RUN: ls | sort | FileCheck %s31CHECK: {{^}}thin1.3.[[PID:[a-zA-Z0-9_]+]].native.o{{$}}32CHECK: {{^}}thin2.4.[[PID]].native.o{{$}}33 34#--- f.ll35target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128"36target triple = "x86_64-unknown-linux-gnu"37 38define void @f() {39 ret void40}41