45 lines · plain
1// REQUIRES: zlib && !zstd2 3// Test compress bundled bitcode.4 5// RUN: rm -rf %t.bc6// RUN: %clang -c -v --target=x86_64-linux-gnu \7// RUN: -x hip --offload-arch=gfx1100 --offload-arch=gfx1101 \8// RUN: --no-offload-new-driver -fgpu-rdc -nogpuinc -nogpulib \9// RUN: %S/Inputs/hip_multiple_inputs/a.cu \10// RUN: --offload-compress --offload-compression-level=9 \11// RUN: --offload-device-only --gpu-bundle-output \12// RUN: -o %t.bc \13// RUN: 2>&1 | FileCheck %s14 15// CHECK: clang-offload-bundler{{.*}} -type=bc16// CHECK-SAME: -targets={{.*}}hip-amdgcn-amd-amdhsa-unknown-gfx1100,hip-amdgcn-amd-amdhsa-unknown-gfx110117// CHECK-SAME: --compress --verbose --compression-level=918// CHECK: Compressed bundle format19 20// Test uncompress of bundled bitcode.21 22// RUN: %clang --hip-link -### -v --target=x86_64-linux-gnu \23// RUN: --offload-arch=gfx1100 --offload-arch=gfx1101 \24// RUN: --no-offload-new-driver -fgpu-rdc -nogpulib \25// RUN: %t.bc --offload-device-only \26// RUN: 2>&1 | FileCheck -check-prefix=UNBUNDLE %s27 28// UNBUNDLE: clang-offload-bundler{{.*}} "-type=bc"29// UNBUNDLE-SAME: -targets={{.*}}hip-amdgcn-amd-amdhsa-unknown-gfx1100,hip-amdgcn-amd-amdhsa-unknown-gfx110130// UNBUNDLE-SAME: -unbundle31// UNBUNDLE-SAME: -verbose32 33// Test compress bundled code objects.34 35// RUN: %clang -c -### -v --target=x86_64-linux-gnu \36// RUN: -x hip --offload-arch=gfx1100 --offload-arch=gfx1101 \37// RUN: --no-offload-new-driver -nogpuinc -nogpulib \38// RUN: %S/Inputs/hip_multiple_inputs/a.cu \39// RUN: --offload-compress \40// RUN: 2>&1 | FileCheck -check-prefix=CO %s41 42// CO: clang-offload-bundler{{.*}} "-type=o"43// CO-SAME: -targets={{.*}}hipv4-amdgcn-amd-amdhsa--gfx1100,hipv4-amdgcn-amd-amdhsa--gfx110144// CO-SAME: "--compress" "--verbose"45