Skip to content

Commit 9b8946b

Browse files
committed
update tests
1 parent c6274d5 commit 9b8946b

File tree

5 files changed

+15
-26
lines changed

5 files changed

+15
-26
lines changed

clang/test/Driver/hip-code-object-version.hip

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -69,11 +69,4 @@
6969
// RUN: %s 2>&1 | FileCheck -check-prefix=CC1 %s
7070

7171
// CC1: "-cc1" {{.*}}"-mcode-object-version=5" {{.*}}"-mllvm" "--amdhsa-code-object-version=5"
72-
// CC1: "-cc1as" {{.*}}"-mllvm" "--amdhsa-code-object-version=5"
73-
74-
// RUN: not %clang -### --target=x86_64-linux-gnu \
75-
// RUN: -mcode-object-version=5 \
76-
// RUN: --offload-arch=gfx906 --rocm-path=%S/Inputs/rocm -save-temps \
77-
// RUN: %s 2>&1 | FileCheck -check-prefix=CC1NEG %s
78-
79-
// CC1NEG-NOT: "-cc1as" {{.*}}"-mcode-object-version=5"
72+
// CC1: clang-linker-wrapper{{.*}}"--device-compiler=amdgcn-amd-amdhsa=-mcode-object-version=5"

clang/test/Driver/hip-options.hip

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,15 +22,13 @@
2222
// RUN: %clang -### -nogpulib -nogpuinc --target=x86_64-unknown-linux-gnu -mprintf-kind=hostcall %s -save-temps 2>&1 | FileCheck -check-prefix=HOSTC %s
2323
// HOSTC: "-cc1" "-triple" "amdgcn-amd-amdhsa"{{.*}}"-mprintf-kind=hostcall" "-Werror=format-invalid-specifier"{{.*}}"-E" {{.*}}
2424
// HOSTC: "-cc1" "-triple" "amdgcn-amd-amdhsa"{{.*}} "-mprintf-kind=hostcall" "-Werror=format-invalid-specifier" {{.*}}"-x" "hip-cpp-output"
25-
// HOSTC: "-cc1" "-triple" "amdgcn-amd-amdhsa"{{.*}} "-mprintf-kind=hostcall" "-Werror=format-invalid-specifier" {{.*}}"-x" "ir"
2625
// HOSTC: "-cc1" "-triple" "x86_64-unknown-linux-gnu"{{.*}} "-E" {{.*}}
2726
// HOSTC: "-cc1" "-triple" "x86_64-unknown-linux-gnu"{{.*}}"-x" "ir"
2827

2928
// Check -mprintf-kind=buffered
3029
// RUN: %clang -### -nogpulib -nogpuinc --target=x86_64-unknown-linux-gnu -mprintf-kind=buffered %s -save-temps 2>&1 | FileCheck -check-prefix=BUFF %s
3130
// BUFF: "-cc1" "-triple" "amdgcn-amd-amdhsa"{{.*}}"-mprintf-kind=buffered" "-Werror=format-invalid-specifier"{{.*}}"-E" {{.*}}
3231
// BUFF: "-cc1" "-triple" "amdgcn-amd-amdhsa"{{.*}} "-mprintf-kind=buffered" "-Werror=format-invalid-specifier" {{.*}}"-x" "hip-cpp-output"
33-
// BUFF: "-cc1" "-triple" "amdgcn-amd-amdhsa"{{.*}} "-mprintf-kind=buffered" "-Werror=format-invalid-specifier" {{.*}}"-x" "ir"
3432
// BUFF: "-cc1" "-triple" "x86_64-unknown-linux-gnu"{{.*}} "-E" {{.*}}
3533
// BUFF: "-cc1" "-triple" "x86_64-unknown-linux-gnu"{{.*}}"-x" "ir"
3634

clang/test/Driver/hip-sanitize-options.hip

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -57,13 +57,11 @@
5757
// CHECK-NOT: {{"[^"]*lld(\.exe){0,1}".* ".*hip.bc"}}
5858
// CHECK: {{"[^"]*clang[^"]*".* "-triple" "x86_64-unknown-linux-gnu".* "-fsanitize=address"}}
5959

60-
// NORDC: {{"[^"]*clang[^"]*".* "-emit-obj".* "-fcuda-is-device".* .* "-mlink-bitcode-file" ".*asanrtl.bc".* "-fsanitize=address".*}} "-o" "[[OUT:[^"]*.o]]"
61-
// NORDC-NOT: {{"[^"]*lld(\.exe){0,1}".*}} "[[OUT]]" {{".*asanrtl.bc" ".*hip.bc"}}
60+
// NORDC: {{"[^"]*clang[^"]*".* "-emit-llvm-bc".* "-fcuda-is-device".* .* "-mlink-bitcode-file" ".*asanrtl.bc".* "-fsanitize=address".*}} "-o" "[[OUT:[^"]*.bc]]"
6261
// NORDC: {{"[^"]*clang[^"]*".* "-triple" "x86_64-unknown-linux-gnu".* "-fsanitize=address"}}
6362

6463
// RDC: {{"[^"]*clang[^"]*".* "-emit-llvm-bc".* "-fcuda-is-device".* "-mlink-bitcode-file" ".*asanrtl.bc".* "-fsanitize=address".*}} "-o" "[[OUT:[^"]*.bc]]"
6564
// RDC: {{"[^"]*clang[^"]*".* "-triple" "x86_64-unknown-linux-gnu".* "-fsanitize=address"}}
66-
// RDC-NOT: {{"[^"]*lld(\.exe){0,1}".*}} "[[OUT]]" {{".*asanrtl.bc" ".*hip.bc"}}
6765

6866
// FAIL: error: cannot find ROCm device library for ABI version 5; provide its path via '--rocm-path' or '--rocm-device-lib-path', or pass '-nogpulib' to build without ROCm device library
6967

clang/test/Driver/hip-toolchain-opt.hip

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -74,6 +74,17 @@
7474
// O0-CGO2-SAME: "-O0"
7575
// O0-CGO2-NOT: "--lto-CGO2"
7676

77+
// ALL: "{{.*}}clang-linker-wrapper{{.*}}" "--should-extract=gfx900"
78+
// DEFAULT-NOT: "--device-compiler=amdgcn-amd-amdhsa=-O{{.*}}"
79+
// O0-SAME: "--device-compiler=amdgcn-amd-amdhsa=-O0"
80+
// O1-SAME: "--device-compiler=amdgcn-amd-amdhsa=-O1"
81+
// O2-SAME: "--device-compiler=amdgcn-amd-amdhsa=-O2"
82+
// O3-SAME: "--device-compiler=amdgcn-amd-amdhsa=-O3"
83+
// Os-SAME: "--device-compiler=amdgcn-amd-amdhsa=-Os"
84+
// Oz-SAME: "--device-compiler=amdgcn-amd-amdhsa=-Oz"
85+
// Og-SAME: "--device-compiler=amdgcn-amd-amdhsa=-Og"
86+
// O0-CGO2-SAME: "--device-compiler=amdgcn-amd-amdhsa=-O0"
87+
7788
// ALL: "-cc1" "-triple" "x86_64-unknown-linux-gnu"
7889
// DEFAULT-NOT: "-O{{.}}"
7990
// O0-SAME: "-O0"
@@ -85,14 +96,3 @@
8596
// Og-SAME: "-Og"
8697
// O0-CGO2-SAME: "-O0"
8798
// O0-CGO2-NOT: "--lto-CGO2"
88-
89-
// ALL: "{{.*}}clang-linker-wrapper{{.*}}" "--should-extract=gfx900"
90-
// DEFAULT-NOT: "--device-compiler=amdgcn-amd-amdhsa=-O{{.*}}"
91-
// O0-SAME: "--device-compiler=amdgcn-amd-amdhsa=-O0"
92-
// O1-SAME: "--device-compiler=amdgcn-amd-amdhsa=-O1"
93-
// O2-SAME: "--device-compiler=amdgcn-amd-amdhsa=-O2"
94-
// O3-SAME: "--device-compiler=amdgcn-amd-amdhsa=-O3"
95-
// Os-SAME: "--device-compiler=amdgcn-amd-amdhsa=-Os"
96-
// Oz-SAME: "--device-compiler=amdgcn-amd-amdhsa=-Oz"
97-
// Og-SAME: "--device-compiler=amdgcn-amd-amdhsa=-Og"
98-
// O0-CGO2-SAME: "--device-compiler=amdgcn-amd-amdhsa=-O0"

clang/test/Driver/no-gpu-bundle-respected.hip

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,8 @@
1010
// RUN: --no-gpu-bundle-output --offload-arch=gfx900,gfx1030 -O3 -x hip %s \
1111
// RUN: 2>&1 | FileCheck %s --check-prefixes=COMPILER,GFX1030,GFX900,OFFLOAD,NOBUNDLE
1212

13-
// BUNDLE: clang-offload-bundler
14-
// NOBUNDLE-NOT: clang-offload-bundler
13+
// BUNDLE: llvm-offload-binary
14+
// NOBUNDLE-NOT: llvm-offload-binary
1515

1616
// COM: sanity checks
1717
// COMPILER: compiler

0 commit comments

Comments
 (0)