Skip to content

Commit

Permalink
[OpenMP] Modifies test to check save-temps on multi-arch compilation …
Browse files Browse the repository at this point in the history
…with opaque-offload-linker

Tests multi-arch compilation correct file generation with opaque-offload-linker.
Files were previously overwritten when using save-temps due to missing TargetID during unpacking.

Change-Id: Ia909c4d256e69fcfc7112a51f2c10db6eb4d5a77
  • Loading branch information
nicebert authored and ronlieb committed Sep 11, 2024
1 parent 3567d2e commit 3f450c5
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions clang/test/Driver/amdgpu-openmp-toolchain.c
Original file line number Diff line number Diff line change
Expand Up @@ -98,6 +98,14 @@

// CHECK-TARGET-ID: clang-offload-packager{{.*}}arch=gfx90a:sramecc-:xnack+,kind=openmp,feature=-sramecc,feature=+xnack

// RUN: %clang -### --save-temps -target x86_64-pc-linux-gnu -fopenmp --offload-arch=gfx90a:xnack+,gfx90a:xnack- \
// RUN: -nogpulib %s 2>&1 | FileCheck %s --check-prefix=CHECK-TARGET-ID-MULTI
// CHECK-TARGET-ID-MULTI: "-cc1" "-triple" "amdgcn-amd-amdhsa" {{.*}} "-target-cpu" "gfx90a" "-target-feature" "+xnack"
// CHECK-TARGET-ID-MULTI: "-cc1" "-triple" "amdgcn-amd-amdhsa" {{.*}} "-target-cpu" "gfx90a" "-target-feature" "-xnack"

// CHECK-TARGET-ID-MULTI: clang-offload-packager{{.*}}gfx90a:xnack+{{.*}}.bc,triple=amdgcn-amd-amdhsa,arch=gfx90a:xnack+,kind=openmp,feature=+xnack
// CHECK-TARGET-ID-MULTI: clang-offload-packager{{.*}}gfx90a:xnack-{{.*}}.bc,triple=amdgcn-amd-amdhsa,arch=gfx90a:xnack-,kind=openmp,feature=-xnack

// RUN: not %clang -### -target x86_64-pc-linux-gnu -fopenmp --offload-arch=gfx90a,gfx90a:xnack+ \
// RUN: -nogpulib %s 2>&1 | FileCheck %s --check-prefix=CHECK-TARGET-ID-ERROR
// CHECK-TARGET-ID-ERROR: error: invalid offload arch combinations: 'gfx90a' and 'gfx90a:xnack+'
Expand Down

0 comments on commit 3f450c5

Please sign in to comment.