Skip to content

Commit 63c648f

Browse files
committed
[Driver][test] Add --rocm-path or -nogpuinc/-nogpulib to some AMDGPU tests
An upcoming change D156363 will change -### to exit with code 1 if hasErrorOccurred. Some AMDGPU tests would exit with code 1.
1 parent 8c1a519 commit 63c648f

File tree

6 files changed

+20
-20
lines changed

6 files changed

+20
-20
lines changed

clang/test/Driver/cl-denorms-are-zero.cl

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,14 @@
11
// Slow FMAF and slow f32 denormals
22
// RUN: %clang -### -target amdgcn--amdhsa -nogpulib -c -mcpu=pitcairn %s 2>&1 | FileCheck -check-prefixes=AMDGCN,AMDGCN-FLUSH %s
3-
// RUN: %clang -### -cl-denorms-are-zero -o - --target=amdgcn--amdhsa -c -mcpu=pitcairn %s 2>&1 | FileCheck -check-prefixes=AMDGCN,AMDGCN-FLUSH %s
3+
// RUN: %clang -### -cl-denorms-are-zero -o - --target=amdgcn--amdhsa -nogpulib -c -mcpu=pitcairn %s 2>&1 | FileCheck -check-prefixes=AMDGCN,AMDGCN-FLUSH %s
44

55
// Fast FMAF, but slow f32 denormals
66
// RUN: %clang -### -target amdgcn--amdhsa -nogpulib -c -mcpu=tahiti %s 2>&1 | FileCheck -check-prefixes=AMDGCN,AMDGCN-FLUSH %s
7-
// RUN: %clang -### -cl-denorms-are-zero -o - --target=amdgcn--amdhsa -c -mcpu=tahiti %s 2>&1 | FileCheck -check-prefixes=AMDGCN,AMDGCN-FLUSH %s
7+
// RUN: %clang -### -cl-denorms-are-zero -o - --target=amdgcn--amdhsa -nogpulib -c -mcpu=tahiti %s 2>&1 | FileCheck -check-prefixes=AMDGCN,AMDGCN-FLUSH %s
88

99
// Fast F32 denormals, but slow FMAF
1010
// RUN: %clang -### -target amdgcn--amdhsa -nogpulib -c -mcpu=fiji %s 2>&1 | FileCheck -check-prefixes=AMDGCN,AMDGCN-FLUSH %s
11-
// RUN: %clang -### -cl-denorms-are-zero -o - --target=amdgcn--amdhsa -c -mcpu=fiji %s 2>&1 | FileCheck -check-prefixes=AMDGCN,AMDGCN-FLUSH %s
11+
// RUN: %clang -### -cl-denorms-are-zero -o - --target=amdgcn--amdhsa -nogpulib -c -mcpu=fiji %s 2>&1 | FileCheck -check-prefixes=AMDGCN,AMDGCN-FLUSH %s
1212

1313
// Fast F32 denormals and fast FMAF
1414
// RUN: %clang -### -target amdgcn--amdhsa -nogpulib -c -mcpu=gfx900 %s 2>&1 | FileCheck -check-prefixes=AMDGCN,AMDGCN-DENORM %s

clang/test/Driver/fast-math.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -130,7 +130,7 @@
130130
// RUN: | FileCheck --check-prefix=CHECK-NO-MATH-ERRNO %s
131131
// RUN: %clang -### -target x86_64-linux-musl -c %s 2>&1 \
132132
// RUN: | FileCheck --check-prefix=CHECK-NO-MATH-ERRNO %s
133-
// RUN: %clang -### --target=amdgcn-amd-amdhsa -c %s 2>&1 \
133+
// RUN: %clang -### --target=amdgcn-amd-amdhsa -nogpuinc -nogpulib -c %s 2>&1 \
134134
// RUN: | FileCheck --check-prefix=CHECK-NO-MATH-ERRNO %s
135135
// RUN: %clang -### -target amdgcn-amd-amdpal -c %s 2>&1 \
136136
// RUN: | FileCheck --check-prefix=CHECK-NO-MATH-ERRNO %s
Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
1-
// RUN: %clang --target=amdgcn-amd-amdhsa -### -S -O3 %s 2>&1 | FileCheck -check-prefix=CHECKNONE %s
2-
// RUN: %clang --target=amdgcn-amd-amdhsa -### -S -O3 -fno-omit-frame-pointer %s 2>&1 | FileCheck -check-prefix=CHECKALL %s
3-
// RUN: %clang --target=amdgcn-amd-amdhsa -### -S %s 2>&1 | FileCheck -check-prefix=CHECKALL %s
4-
// RUN: %clang --target=amdgcn-amd-amdhsa -### -S -O0 %s 2>&1 | FileCheck -check-prefix=CHECKALL %s
5-
// RUN: %clang --target=amdgcn-amd-amdhsa -### -S -cl-opt-disable %s 2>&1 | FileCheck -check-prefix=CHECKALL %s
1+
// RUN: %clang --target=amdgcn-amd-amdhsa -### -nogpuinc -nogpulib -S -O3 %s 2>&1 | FileCheck -check-prefix=CHECKNONE %s
2+
// RUN: %clang --target=amdgcn-amd-amdhsa -### -nogpuinc -nogpulib -S -O3 -fno-omit-frame-pointer %s 2>&1 | FileCheck -check-prefix=CHECKALL %s
3+
// RUN: %clang --target=amdgcn-amd-amdhsa -### -nogpuinc -nogpulib -S %s 2>&1 | FileCheck -check-prefix=CHECKALL %s
4+
// RUN: %clang --target=amdgcn-amd-amdhsa -### -nogpuinc -nogpulib -S -O0 %s 2>&1 | FileCheck -check-prefix=CHECKALL %s
5+
// RUN: %clang --target=amdgcn-amd-amdhsa -### -nogpuinc -nogpulib -S -cl-opt-disable %s 2>&1 | FileCheck -check-prefix=CHECKALL %s
66

77
// CHECKNONE: -mframe-pointer=none
88
// CHECKALL: -mframe-pointer=all

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

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44

55
// RUN: %clang -### --target=x86_64-linux-gnu \
66
// RUN: -mcode-object-version=2 \
7-
// RUN: --offload-arch=gfx906 -nogpulib \
7+
// RUN: --offload-arch=gfx906 --rocm-path=%S/Inputs/rocm \
88
// RUN: %s 2>&1 | FileCheck -check-prefix=V2 %s
99

1010
// V2: "-mllvm" "--amdhsa-code-object-version=2"
@@ -14,12 +14,12 @@
1414

1515
// RUN: %clang -### --target=x86_64-linux-gnu \
1616
// RUN: -mcode-object-version=3 \
17-
// RUN: --offload-arch=gfx906 -nogpulib \
17+
// RUN: --offload-arch=gfx906 --rocm-path=%S/Inputs/rocm \
1818
// RUN: %s 2>&1 | FileCheck -check-prefix=V3 %s
1919

2020
// RUN: %clang -### --target=x86_64-linux-gnu \
2121
// RUN: -mcode-object-version=4 -mcode-object-version=3 \
22-
// RUN: --offload-arch=gfx906 -nogpulib \
22+
// RUN: --offload-arch=gfx906 --rocm-path=%S/Inputs/rocm \
2323
// RUN: %s 2>&1 | FileCheck -check-prefix=V3 %s
2424

2525
// V3: "-mcode-object-version=3"
@@ -30,7 +30,7 @@
3030

3131
// RUN: %clang -### --target=x86_64-linux-gnu \
3232
// RUN: -mcode-object-version=4 \
33-
// RUN: --offload-arch=gfx906 -nogpulib \
33+
// RUN: --offload-arch=gfx906 --rocm-path=%S/Inputs/rocm \
3434
// RUN: %s 2>&1 | FileCheck -check-prefix=V4 %s
3535

3636
// V4: "-mcode-object-version=4"
@@ -41,7 +41,7 @@
4141

4242
// RUN: %clang -### --target=x86_64-linux-gnu \
4343
// RUN: -mcode-object-version=5 \
44-
// RUN: --offload-arch=gfx906 -nogpulib \
44+
// RUN: --offload-arch=gfx906 --rocm-path=%S/Inputs/rocm \
4545
// RUN: %s 2>&1 | FileCheck -check-prefix=V5 %s
4646

4747
// V5: "-mcode-object-version=5"
@@ -51,7 +51,7 @@
5151
// Check bundle ID for code object version default
5252

5353
// RUN: %clang -### --target=x86_64-linux-gnu \
54-
// RUN: --offload-arch=gfx906 -nogpulib \
54+
// RUN: --offload-arch=gfx906 -nogpuinc -nogpulib \
5555
// RUN: %s 2>&1 | FileCheck -check-prefix=VD %s
5656

5757
// VD: "-targets=host-x86_64-unknown-linux,hipv4-amdgcn-amd-amdhsa--gfx906"
@@ -60,7 +60,7 @@
6060

6161
// RUN: %clang -### --target=x86_64-linux-gnu \
6262
// RUN: -mcode-object-version=1 \
63-
// RUN: --offload-arch=gfx906 -nogpulib \
63+
// RUN: --offload-arch=gfx906 --rocm-path=%S/Inputs/rocm \
6464
// RUN: %s 2>&1 | FileCheck -check-prefix=INVALID %s
6565
// INVALID: error: invalid integral value '1' in '-mcode-object-version=1'
6666
// INVALID-NOT: error: invalid integral value
@@ -71,15 +71,15 @@
7171

7272
// RUN: %clang -### --target=x86_64-linux-gnu \
7373
// RUN: -mcode-object-version=5 \
74-
// RUN: --offload-arch=gfx906 -nogpulib -save-temps \
74+
// RUN: --offload-arch=gfx906 --rocm-path=%S/Inputs/rocm -save-temps \
7575
// RUN: %s 2>&1 | FileCheck -check-prefix=CC1 %s
7676

7777
// CC1: "-cc1" {{.*}}"-mcode-object-version=5" {{.*}}"-mllvm" "--amdhsa-code-object-version=5"
7878
// CC1: "-cc1as" {{.*}}"-mllvm" "--amdhsa-code-object-version=5"
7979

8080
// RUN: %clang -### --target=x86_64-linux-gnu \
8181
// RUN: -mcode-object-version=5 \
82-
// RUN: --offload-arch=gfx906 -nogpulib -save-temps \
82+
// RUN: --offload-arch=gfx906 --rocm-path=%S/Inputs/rocm -save-temps \
8383
// RUN: %s 2>&1 | FileCheck -check-prefix=CC1NEG %s
8484

8585
// CC1NEG-NOT: "-cc1as" {{.*}}"-mcode-object-version=5"

clang/test/Driver/opencl.cl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222
// RUN: not %clang -cl-std=c99 -DOPENCL %s 2>&1 | FileCheck --check-prefix=CHECK-C99 %s
2323
// RUN: not %clang -cl-std=invalid -DOPENCL %s 2>&1 | FileCheck --check-prefix=CHECK-INVALID %s
2424
// RUN: %clang -S -### -target spir-unknown-unknown %s 2>&1 | FileCheck --check-prefix=CHECK-W-SPIR-COMPAT %s
25-
// RUN: %clang -S -### --target=amdgcn-amd-amdhsa-opencl %s 2>&1 | FileCheck --check-prefix=CHECK-NO-W-SPIR-COMPAT %s
25+
// RUN: %clang -S -### --target=amdgcn-amd-amdhsa-opencl -nogpuinc -nogpulib %s 2>&1 | FileCheck --check-prefix=CHECK-NO-W-SPIR-COMPAT %s
2626
// RUN: %clang -S -### -cl-ext="+test_ext" %s 2>&1 | FileCheck --check-prefix=CHECK-EXT %s
2727

2828
// CHECK-CL: "-cc1" {{.*}} "-cl-std=CL"

clang/test/Driver/split-debug.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
// SPLIT-SAME: "-split-dwarf-file" "split-debug.dwo" "-split-dwarf-output" "split-debug.dwo"
1616

1717
// RUN: %clang -### -c -target wasm32 -gsplit-dwarf -g %s 2>&1 | FileCheck %s --check-prefix=SPLIT
18-
// RUN: %clang -### -c --target=amdgcn-amd-amdhsa -gsplit-dwarf -g %s 2>&1 | FileCheck %s --check-prefix=SPLIT
18+
// RUN: %clang -### -c --target=amdgcn-amd-amdhsa -nogpuinc -nogpulib -gsplit-dwarf -g %s 2>&1 | FileCheck %s --check-prefix=SPLIT
1919
// RUN: %clang_cl -### -c --target=x86_64-unknown-windows-msvc -gno-split-dwarf -gsplit-dwarf -g -- %s 2>&1 | FileCheck %s --check-prefix=SPLIT
2020

2121
/// -gsplit-dwarf is a no-op on a non-ELF platform.

0 commit comments

Comments
 (0)