Files
TheRock/compiler/amd-llvm/llvm/test/ThinLTO/X86/dtlto/imports.ll
T
derek.holloway 7502bf64a4
CodeQL / Analyze (actions) (push) Canceled after 0s
CodeQL / Analyze (python) (push) Canceled after 0s
pre-commit / pre-commit (push) Canceled after 0s
Multi-Arch CI / setup (push) Canceled after 0s
Publish build_manylinux_x86_64 images / publish_build_manylinux_x86_64 (push) Canceled after 0s
Setup (Multi-Arch) / setup (push) Canceled after 0s
Multi-Arch CI / Linux::${{ fromJSON(needs.setup.outputs.linux_build_config || '{}').build_variant_label || 'skip' }} (push) Canceled after 0s
Publish TheRock Docker image / build-and-push-image (push) Canceled after 0s
Publish no_rocm_image_ubi10 image / publish_no_rocm_image_ubi10 (push) Canceled after 0s
Multi-Arch CI / Windows::${{ fromJSON(needs.setup.outputs.windows_build_config || '{}').build_variant_label || 'skip' }} (push) Canceled after 0s
Publish TheRock Docker image / build-and-push-image (push) Canceled after 0s
Multi-Arch CI / Manifest Diff (push) Canceled after 0s
TheRock Manifest Diff Report / Generate Manifest Diff Report (push) Canceled after 0s
Multi-Arch CI / CI Summary (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04 images / publish_no_rocm_image_ubuntu24_04 (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04_ocl_rt images / publish_no_rocm_image_ubuntu24_04_ocl_rt (push) Canceled after 0s
Publish TheRock Docker image / build-and-push-image (push) Canceled after 0s
Publish TheRock Docker image / build-and-push-image (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04 images / publish_no_rocm_image_ubuntu24_04_rocgdb (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04_rocgdb images / publish_no_rocm_image_ubuntu24_04_rocgdb (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04 images / publish_no_rocm_image_ubuntu24_04_ocl_rt (push) Canceled after 0s
Publish TheRock Docker image / build-and-push-image (push) Canceled after 0s
Unit Tests / Unit Tests :: ubuntu-24.04 (push) Canceled after 0s
Unit Tests / Unit Tests :: windows-2022 (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04 images / publish_no_rocm_image_ubuntu24_04_media (push) Canceled after 0s
Unit Tests / Unit Tests Summary (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04 images / publish_no_rocm_image_ubuntu24_04_openmpi (push) Canceled after 0s
Flatten subprojects into a single base monorepo
2026-09-02 16:34:47 -07:00

74 lines
2.2 KiB
LLVM

; Check that DTLTO creates imports lists correctly.
RUN: rm -rf %t && split-file %s %t && cd %t
; Generate ThinLTO bitcode files.
RUN: opt -thinlto-bc 0.ll -o 0.bc -O2
RUN: opt -thinlto-bc 1.ll -o 1.bc -O2
; Define a substitution to share the common DTLTO arguments. Note that the use
; of validate.py will cause a failure as it does not create output files.
DEFINE: %{command} = llvm-lto2 run 0.bc 1.bc -o t.o \
DEFINE: -dtlto-distributor=%python \
DEFINE: -dtlto-distributor-arg=%llvm_src_root/utils/dtlto/validate.py \
DEFINE: -r=0.bc,g,px \
DEFINE: -r=1.bc,f,px \
DEFINE: -r=1.bc,g
; We expect an import from 0.bc into 1.bc but no imports into 0.bc. Check that
; the expected input files have been added to the JSON to account for this.
RUN: not %{command} 2>&1 | FileCheck %s --check-prefixes=INPUTS,ERR
; 1.bc should not appear in the list of inputs for 0.bc.
INPUTS: "jobs":
INPUTS: "inputs": [
INPUTS-NEXT: "0.bc",
INPUTS-NEXT: "0.1.[[#]].native.o.thinlto.bc"
INPUTS-NEXT: ]
; 0.bc should appear in the list of inputs for 1.bc.
INPUTS: "inputs": [
INPUTS-NEXT: "1.bc",
INPUTS-NEXT: "1.2.[[#]].native.o.thinlto.bc",
INPUTS-NEXT: "0.bc"
INPUTS-NEXT: ]
; This check ensures that we have failed for the expected reason.
ERR: failed: DTLTO backend compilation: cannot open native object file:
; Check that imports files are not created even if -save-temps is active.
RUN: not %{command} -save-temps 2>&1 \
RUN: | FileCheck %s --check-prefixes=ERR
RUN: ls | FileCheck %s --check-prefix=NOIMPORTSFILES
NOIMPORTSFILES-NOT: imports
; Check that imports files are created with -thinlto-emit-imports.
RUN: not %{command} -thinlto-emit-imports 2>&1 \
RUN: | FileCheck %s --check-prefixes=ERR
RUN: ls | FileCheck %s --check-prefix=IMPORTSFILES
IMPORTSFILES: 0.bc.imports
IMPORTSFILES: 1.bc.imports
;--- 0.ll
target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128"
target triple = "x86_64-unknown-linux-gnu"
define void @g() {
entry:
ret void
}
;--- 1.ll
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
target triple = "x86_64-unknown-linux-gnu"
declare void @g(...)
define void @f() {
entry:
call void (...) @g()
ret void
}