Skip to content

Commit b0ae86c

Browse files
oralubenjhuber6
andcommitted
Correct -march=generic's semantic in test
Co-authored-by: Joseph Huber <[email protected]>
1 parent ecea39a commit b0ae86c

File tree

1 file changed

+4
-7
lines changed

1 file changed

+4
-7
lines changed

clang/test/Driver/cuda-cross-compiling.c

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -32,15 +32,10 @@
3232
//
3333
// RUN: %clang -target nvptx64-nvidia-cuda -march=sm_61 -### %s 2>&1 \
3434
// RUN: | FileCheck -check-prefix=ARGS %s
35-
// RUN: %clang -target nvptx64-nvidia-cuda -march=generic -### %s 2>&1 \
36-
// RUN: | FileCheck -check-prefix=GENERIC %s
3735

3836
// ARGS: -cc1" "-triple" "nvptx64-nvidia-cuda" "-S" {{.*}} "-target-cpu" "sm_61" "-target-feature" "+ptx{{[0-9]+}}" {{.*}} "-o" "[[PTX:.+]].s"
3937
// ARGS-NEXT: ptxas{{.*}}"-m64" "-O0" "--gpu-name" "sm_61" "--output-file" "[[CUBIN:.+]].cubin" "[[PTX]].s" "-c"
4038
// ARGS-NEXT: nvlink{{.*}}"-o" "a.out" "-arch" "sm_61" {{.*}} "[[CUBIN]].cubin"
41-
// GENERIC: -cc1" "-triple" "nvptx64-nvidia-cuda" "-S" {{.*}} "-target-cpu" "sm_52" "-target-feature" "+ptx{{[0-9]+}}" {{.*}} "-o" "[[PTX:.+]].s"
42-
// GENERIC-NEXT: ptxas{{.*}}"-m64" "-O0" "--gpu-name" "sm_52" "--output-file" "[[CUBIN:.+]].cubin" "[[PTX]].s" "-c"
43-
// GENERIC-NEXT: nvlink{{.*}}"-o" "a.out" "-arch" "sm_52" {{.*}} "[[CUBIN]].cubin"
4439

4540
//
4641
// Test the generated arguments to the CUDA binary utils when targeting NVPTX.
@@ -90,6 +85,8 @@
9085
// MISSING: error: Must pass in an explicit nvptx64 gpu architecture to 'nvlink'
9186

9287
// RUN: %clang -target nvptx64-nvidia-cuda -flto -c %s -### 2>&1 \
93-
// RUN: | FileCheck -check-prefix=COMPILE %s
88+
// RUN: | FileCheck -check-prefix=GENERIC %s
89+
// RUN: %clang -target nvptx64-nvidia-cuda -march=sm_52 -march=generic -flto -c %s -### 2>&1 \
90+
// RUN: | FileCheck -check-prefix=GENERIC %s
9491

95-
// COMPILE-NOT: -cc1" "-triple" "nvptx64-nvidia-cuda" {{.*}} "-target-cpu"
92+
// GENERIC-NOT: -cc1" "-triple" "nvptx64-nvidia-cuda" {{.*}} "-target-cpu"

0 commit comments

Comments
 (0)