Skip to content

Commit 3f450c5

Browse files
nicebertronlieb
authored andcommitted
[OpenMP] Modifies test to check save-temps on multi-arch compilation 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
1 parent 3567d2e commit 3f450c5

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

clang/test/Driver/amdgpu-openmp-toolchain.c

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -98,6 +98,14 @@
9898

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

101+
// RUN: %clang -### --save-temps -target x86_64-pc-linux-gnu -fopenmp --offload-arch=gfx90a:xnack+,gfx90a:xnack- \
102+
// RUN: -nogpulib %s 2>&1 | FileCheck %s --check-prefix=CHECK-TARGET-ID-MULTI
103+
// CHECK-TARGET-ID-MULTI: "-cc1" "-triple" "amdgcn-amd-amdhsa" {{.*}} "-target-cpu" "gfx90a" "-target-feature" "+xnack"
104+
// CHECK-TARGET-ID-MULTI: "-cc1" "-triple" "amdgcn-amd-amdhsa" {{.*}} "-target-cpu" "gfx90a" "-target-feature" "-xnack"
105+
106+
// CHECK-TARGET-ID-MULTI: clang-offload-packager{{.*}}gfx90a:xnack+{{.*}}.bc,triple=amdgcn-amd-amdhsa,arch=gfx90a:xnack+,kind=openmp,feature=+xnack
107+
// CHECK-TARGET-ID-MULTI: clang-offload-packager{{.*}}gfx90a:xnack-{{.*}}.bc,triple=amdgcn-amd-amdhsa,arch=gfx90a:xnack-,kind=openmp,feature=-xnack
108+
101109
// RUN: not %clang -### -target x86_64-pc-linux-gnu -fopenmp --offload-arch=gfx90a,gfx90a:xnack+ \
102110
// RUN: -nogpulib %s 2>&1 | FileCheck %s --check-prefix=CHECK-TARGET-ID-ERROR
103111
// CHECK-TARGET-ID-ERROR: error: invalid offload arch combinations: 'gfx90a' and 'gfx90a:xnack+'

0 commit comments

Comments
 (0)