Skip to content

Commit af11c17

Browse files
author
iclsrc
committed
Merge from 'sycl' to 'sycl-web' (1 commits)
2 parents 8fd97e5 + a258a55 commit af11c17

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

51 files changed

+71
-76
lines changed
Lines changed: 6 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,9 @@
1-
// RUN: %clang -cc1 -triple spir64-unknown-unknown -fsycl-is-device -emit-llvm-bc -O1 -fno-legacy-pass-manager -fdebug-pass-manager -fenable-sycl-dae -o /dev/null -x c++ < %s 2>&1 | FileCheck %s
2-
// RUN: %clang -cc1 -triple spir64-unknown-unknown -fsycl-is-device -emit-llvm-bc -O0 -fno-legacy-pass-manager -fdebug-pass-manager -o /dev/null -x c++ < %s 2>&1 | FileCheck %s --check-prefix DISABLE
3-
// RUN: %clang -cc1 -triple spir64-unknown-unknown -fsycl-is-device -emit-llvm-bc -O1 -fno-legacy-pass-manager -fdebug-pass-manager -fenable-sycl-dae -disable-llvm-passes -o /dev/null -x c++ < %s 2>&1 | FileCheck %s --check-prefix DISABLE
4-
// RUN: %clang -cc1 -triple spir64-unknown-unknown -fsycl-is-device -emit-llvm-bc -O1 -flegacy-pass-manager -mllvm -debug-pass=Structure -fenable-sycl-dae -o /dev/null -x c++ < %s 2>&1 | FileCheck %s --check-prefix OLDPM
5-
// RUN: %clang -cc1 -triple spir64-unknown-unknown -fsycl-is-device -emit-llvm-bc -O1 -flegacy-pass-manager -mllvm -debug-pass=Structure -o /dev/null -x c++ < %s 2>&1 | FileCheck %s --check-prefix DISABLE
6-
// RUN: %clang -cc1 -triple spir64-unknown-unknown -fsycl-is-device -emit-llvm-bc -O1 -flegacy-pass-manager -mllvm -debug-pass=Structure -fenable-sycl-dae -disable-llvm-passes -o /dev/null -x c++ < %s 2>&1 | FileCheck %s --check-prefix DISABLE
7-
81
// Verify that Dead Arguments Elimination for SYCL kernels is/is not added to the PM.
92

3+
// RUN: %clang -cc1 -triple spir64-unknown-unknown -fsycl-is-device -emit-llvm-bc -O1 -fdebug-pass-manager -fenable-sycl-dae -o /dev/null -x c++ < %s 2>&1 | FileCheck %s
4+
// RUN: %clang -cc1 -triple spir64-unknown-unknown -fsycl-is-device -emit-llvm-bc -O0 -fdebug-pass-manager -o /dev/null -x c++ < %s 2>&1 | FileCheck %s --check-prefix DISABLE
5+
// RUN: %clang -cc1 -triple spir64-unknown-unknown -fsycl-is-device -emit-llvm-bc -O1 -fdebug-pass-manager -fenable-sycl-dae -disable-llvm-passes -o /dev/null -x c++ < %s 2>&1 | FileCheck %s --check-prefix DISABLE
6+
7+
108
// CHECK: Running pass: DeadArgumentEliminationSYCLPass on [module]
11-
// OLDPM: Dead Argument Elimination for SYCL kernels
12-
// DISABLE-NOT: DeadArgumentEliminationSYCLPass
13-
// DISABLE-NOT: Dead Argument Elimination for SYCL kernels
9+
// DISABLE-NOT: DeadArgumentEliminationSYCLPass

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

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
// REQUIRES: x86-registered-target
22
// REQUIRES: amdgpu-registered-target
3-
// RUN: %clang -### --target=x86_64-unknown-linux-gnu -fopenmp -fopenmp-targets=amdgcn-amd-amdhsa \
3+
// RUN: %clang -### --target=x86_64-unknown-linux-gnu -fopenmp -fopenmp-new-driver -fopenmp-targets=amdgcn-amd-amdhsa \
44
// RUN: -Xopenmp-target=amdgcn-amd-amdhsa -march=gfx906 --libomptarget-amdgpu-bc-path=%S/Inputs/hip_dev_lib %s 2>&1 \
55
// RUN: | FileCheck %s
66

@@ -10,7 +10,7 @@
1010
// CHECK: "-cc1" "-triple" "x86_64-unknown-linux-gnu"{{.*}}"-emit-obj"
1111
// CHECK: clang-linker-wrapper{{.*}}"--"{{.*}} "-o" "a.out"
1212

13-
// RUN: %clang -ccc-print-phases --target=x86_64-unknown-linux-gnu -fopenmp -fopenmp-targets=amdgcn-amd-amdhsa -Xopenmp-target=amdgcn-amd-amdhsa -march=gfx906 %s 2>&1 \
13+
// RUN: %clang -ccc-print-phases --target=x86_64-unknown-linux-gnu -fopenmp -fopenmp-new-driver -fopenmp-targets=amdgcn-amd-amdhsa -Xopenmp-target=amdgcn-amd-amdhsa -march=gfx906 %s 2>&1 \
1414
// RUN: | FileCheck --check-prefix=CHECK-PHASES %s
1515
// CHECK-PHASES: 0: input, "[[INPUT:.*]]", c, (host-openmp)
1616
// CHECK-PHASES: 1: preprocessor, {0}, cpp-output, (host-openmp)
@@ -27,20 +27,20 @@
2727
// CHECK-PHASES: 12: clang-linker-wrapper, {11}, image, (host-openmp)
2828

2929
// handling of --libomptarget-amdgpu-bc-path
30-
// RUN: %clang -### --target=x86_64-unknown-linux-gnu -fopenmp -fopenmp-targets=amdgcn-amd-amdhsa -Xopenmp-target=amdgcn-amd-amdhsa -march=gfx803 --libomptarget-amdgpu-bc-path=%S/Inputs/hip_dev_lib/libomptarget-amdgpu-gfx803.bc %s 2>&1 | FileCheck %s --check-prefix=CHECK-LIBOMPTARGET
30+
// RUN: %clang -### --target=x86_64-unknown-linux-gnu -fopenmp -fopenmp-new-driver -fopenmp-targets=amdgcn-amd-amdhsa -Xopenmp-target=amdgcn-amd-amdhsa -march=gfx803 --libomptarget-amdgpu-bc-path=%S/Inputs/hip_dev_lib/libomptarget-amdgpu-gfx803.bc %s 2>&1 | FileCheck %s --check-prefix=CHECK-LIBOMPTARGET
3131
// CHECK-LIBOMPTARGET: "-cc1" "-triple" "amdgcn-amd-amdhsa"{{.*}}"-target-cpu" "gfx803" "-fcuda-is-device" "-mlink-builtin-bitcode"{{.*}}Inputs/hip_dev_lib/libomptarget-amdgpu-gfx803.bc"{{.*}}
3232

33-
// RUN: %clang -### --target=x86_64-unknown-linux-gnu -fopenmp -fopenmp-targets=amdgcn-amd-amdhsa -Xopenmp-target=amdgcn-amd-amdhsa -march=gfx803 -nogpulib %s 2>&1 | FileCheck %s --check-prefix=CHECK-NOGPULIB
33+
// RUN: %clang -### --target=x86_64-unknown-linux-gnu -fopenmp -fopenmp-new-driver -fopenmp-targets=amdgcn-amd-amdhsa -Xopenmp-target=amdgcn-amd-amdhsa -march=gfx803 -nogpulib %s 2>&1 | FileCheck %s --check-prefix=CHECK-NOGPULIB
3434
// CHECK-NOGPULIB-NOT: "-cc1" "-triple" "amdgcn-amd-amdhsa"{{.*}}"-target-cpu" "gfx803" "-fcuda-is-device" "-mlink-builtin-bitcode"{{.*}}libomptarget-amdgpu-gfx803.bc"{{.*}}
3535

36-
// RUN: %clang -### --target=x86_64-unknown-linux-gnu -ccc-print-bindings -fopenmp -fopenmp-targets=amdgcn-amd-amdhsa -Xopenmp-target=amdgcn-amd-amdhsa -march=gfx803 -nogpulib %s 2>&1 | FileCheck %s --check-prefix=CHECK-BINDINGS
36+
// RUN: %clang -### --target=x86_64-unknown-linux-gnu -ccc-print-bindings -fopenmp -fopenmp-new-driver -fopenmp-targets=amdgcn-amd-amdhsa -Xopenmp-target=amdgcn-amd-amdhsa -march=gfx803 -nogpulib %s 2>&1 | FileCheck %s --check-prefix=CHECK-BINDINGS
3737
// CHECK-BINDINGS: "x86_64-unknown-linux-gnu" - "clang", inputs: ["[[INPUT:.*]]"], output: "[[HOST_BC:.*]]"
3838
// CHECK-BINDINGS: "amdgcn-amd-amdhsa" - "clang", inputs: ["[[INPUT]]", "[[HOST_BC]]"], output: "[[DEVICE_BC:.*]]"
3939
// CHECK-BINDINGS: "x86_64-unknown-linux-gnu" - "clang", inputs: ["[[HOST_BC]]", "[[DEVICE_BC]]"], output: "[[HOST_OBJ:.*]]"
4040
// CHECK-BINDINGS: "x86_64-unknown-linux-gnu" - "Offload::Linker", inputs: ["[[HOST_OBJ]]"], output: "a.out"
4141

42-
// RUN: %clang -### --target=x86_64-unknown-linux-gnu -emit-llvm -S -fopenmp -fopenmp-targets=amdgcn-amd-amdhsa -Xopenmp-target=amdgcn-amd-amdhsa -march=gfx803 -nogpulib %s 2>&1 | FileCheck %s --check-prefix=CHECK-EMIT-LLVM-IR
42+
// RUN: %clang -### --target=x86_64-unknown-linux-gnu -emit-llvm -S -fopenmp -fopenmp-new-driver -fopenmp-targets=amdgcn-amd-amdhsa -Xopenmp-target=amdgcn-amd-amdhsa -march=gfx803 -nogpulib %s 2>&1 | FileCheck %s --check-prefix=CHECK-EMIT-LLVM-IR
4343
// CHECK-EMIT-LLVM-IR: "-cc1" "-triple" "amdgcn-amd-amdhsa"{{.*}}"-emit-llvm"
4444

45-
// RUN: %clang -### -target x86_64-pc-linux-gnu -fopenmp -fopenmp-targets=amdgcn-amd-amdhsa -Xopenmp-target=amdgcn-amd-amdhsa -march=gfx803 -lm --rocm-device-lib-path=%S/Inputs/rocm/amdgcn/bitcode -fopenmp-new-driver %s 2>&1 | FileCheck %s --check-prefix=CHECK-LIB-DEVICE-NEW
45+
// RUN: %clang -### -target x86_64-pc-linux-gnu -fopenmp -fopenmp-new-driver -fopenmp-targets=amdgcn-amd-amdhsa -Xopenmp-target=amdgcn-amd-amdhsa -march=gfx803 -lm --rocm-device-lib-path=%S/Inputs/rocm/amdgcn/bitcode -fopenmp-new-driver %s 2>&1 | FileCheck %s --check-prefix=CHECK-LIB-DEVICE-NEW
4646
// CHECK-LIB-DEVICE-NEW: {{.*}}clang-linker-wrapper{{.*}}-target-library=openmp-amdgcn-amd-amdhsa-gfx803={{.*}}ocml.bc"{{.*}}ockl.bc"{{.*}}oclc_daz_opt_on.bc"{{.*}}oclc_unsafe_math_off.bc"{{.*}}oclc_finite_only_off.bc"{{.*}}oclc_correctly_rounded_sqrt_on.bc"{{.*}}oclc_wavefrontsize64_on.bc"{{.*}}oclc_isa_version_803.bc"

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
// CHECK: llvm-link{{.*}}"-o" "{{.*}}amdgpu-openmp-toolchain-{{.*}}-gfx906-linked-{{.*}}.bc"
1111
// CHECK: llc{{.*}}amdgpu-openmp-toolchain-{{.*}}-gfx906-linked-{{.*}}.bc" "-mtriple=amdgcn-amd-amdhsa" "-mcpu=gfx906" "-filetype=obj" "-o"{{.*}}amdgpu-openmp-toolchain-{{.*}}-gfx906-{{.*}}.o"
1212
// CHECK: lld{{.*}}"-flavor" "gnu" "--no-undefined" "-shared" "-o"{{.*}}amdgpu-openmp-toolchain-{{.*}}.out" "{{.*}}amdgpu-openmp-toolchain-{{.*}}-gfx906-{{.*}}.o"
13-
// CHECK: clang-offload-wrapper{{.*}}"-target" "x86_64-unknown-linux-gnu" "-o" "{{.*}}a-{{.*}}.bc" {{.*}}amdgpu-openmp-toolchain-{{.*}}.out"
13+
// CHECK: clang-offload-wrapper{{.*}}"-host" "x86_64-unknown-linux-gnu" "-o" "{{.*}}a-{{.*}}.bc" {{.*}}amdgpu-openmp-toolchain-{{.*}}.out"
1414
// CHECK: "-cc1" "-triple" "x86_64-unknown-linux-gnu"{{.*}}"-o" "{{.*}}a-{{.*}}.o" "-x" "ir" "{{.*}}a-{{.*}}.bc"
1515
// CHECK: ld{{.*}}"-o" "a.out"{{.*}}"{{.*}}amdgpu-openmp-toolchain-{{.*}}.o" "{{.*}}a-{{.*}}.o" "-lomp" "-lomptarget"
1616

llvm-spirv/.clang-tidy

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
Checks: '-*,clang-diagnostic-*,llvm-*,misc-*,-misc-unused-parameters,readability-identifier-naming,-llvm-header-guard'
2-
WarningsAsErrors: 'llvm-*,misc-*,-misc-unused-parameters,readability-identifier-naming,-llvm-header-guard'
1+
Checks: '-*,clang-diagnostic-*,llvm-*,misc-*,-misc-no-recursion,-misc-unused-parameters,readability-identifier-naming,-llvm-header-guard'
2+
WarningsAsErrors: 'llvm-*,misc-*,-misc-no-recursion,-misc-unused-parameters,readability-identifier-naming,-llvm-header-guard'
33
CheckOptions:
44
- key: readability-identifier-naming.ClassCase
55
value: CamelCase
@@ -17,4 +17,3 @@ CheckOptions:
1717
value: CamelCase
1818
- key: llvm-namespace-comment.ShortNamespaceLines
1919
value: '25'
20-

llvm-spirv/lib/SPIRV/SPIRVReader.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2815,7 +2815,7 @@ Function *SPIRVToLLVM::transFunction(SPIRVFunction *BF) {
28152815
AttrTy = cast<PointerType>(I->getType())->getPointerElementType();
28162816
break;
28172817
case Attribute::AttrKind::StructRet:
2818-
AttrTy = I->getType();
2818+
AttrTy = cast<PointerType>(I->getType())->getPointerElementType();
28192819
break;
28202820
default:
28212821
break; // do nothing

llvm-spirv/test/CXX/global-ctor.cl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// RUN: %clang_cc1 -cl-std=clc++ -emit-llvm-bc -triple spir -O0 %s -o %t.bc
1+
// RUN: %clang_cc1 -cl-std=clc++ -emit-llvm-bc -triple spir -O0 %s -o %t.bc -no-opaque-pointers
22
// RUN: llvm-spirv %t.bc -o %t.spv
33
// RUN: spirv-val %t.spv
44
// RUN: llvm-spirv %t.spv -to-text -o - | FileCheck %s --check-prefix=CHECK-SPIRV

llvm-spirv/test/ComparePointers.cl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ kernel void test(int global *in, int global *in2) {
88
if (in < in2)
99
return;
1010
}
11-
// RUN: %clang_cc1 -triple spir64 -x cl -cl-std=CL2.0 -O0 -emit-llvm-bc %s -o %t.bc
11+
// RUN: %clang_cc1 -triple spir64 -x cl -cl-std=CL2.0 -O0 -emit-llvm-bc %s -o %t.bc -no-opaque-pointers
1212
// RUN: llvm-spirv %t.bc -spirv-text -o %t.spt
1313
// RUN: FileCheck < %t.spt %s --check-prefix=CHECK-SPIRV
1414
// RUN: llvm-spirv %t.bc -o %t.spv

llvm-spirv/test/DebugInfo/BuiltinCallLocation.cl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
// Check that DebugLoc attached to a builtin call is preserved after translation.
22

3-
// RUN: %clang_cc1 -triple spir -fdeclare-opencl-builtins -finclude-default-header %s -disable-llvm-passes -emit-llvm-bc -debug-info-kind=line-tables-only -o %t.bc
3+
// RUN: %clang_cc1 -triple spir -fdeclare-opencl-builtins -finclude-default-header %s -disable-llvm-passes -emit-llvm-bc -debug-info-kind=line-tables-only -o %t.bc -no-opaque-pointers
44
// RUN: llvm-spirv %t.bc -spirv-text -o - | FileCheck %s --check-prefix=CHECK-SPIRV
55
// RUN: llvm-spirv %t.bc -o %t.spv
66
// RUN: llvm-spirv -r %t.spv -o - | llvm-dis -o - | FileCheck %s --check-prefix=CHECK-LLVM

llvm-spirv/test/DebugInfo/DebugControlFlow.cl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// RUN: %clang_cc1 -triple spir64-unknown-unknown -cl-std=CL2.0 -O0 -debug-info-kind=standalone -gno-column-info -emit-llvm %s -o %t.ll
1+
// RUN: %clang_cc1 -triple spir64-unknown-unknown -cl-std=CL2.0 -O0 -debug-info-kind=standalone -gno-column-info -emit-llvm %s -o %t.ll -no-opaque-pointers
22
// RUN: llvm-as %t.ll -o %t.bc
33
// RUN: llvm-spirv %t.bc -spirv-text -o %t.spt
44
// RUN: FileCheck < %t.spt %s --check-prefix=CHECK-SPIRV

llvm-spirv/test/DebugInfo/DebugDeclareUnused.cl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
// Check that we can translate llvm.dbg.declare for a local variable which was
22
// deleted by mem2reg pass(disabled by default in llvm-spirv)
33

4-
// RUN: %clang_cc1 %s -triple spir -disable-llvm-passes -debug-info-kind=standalone -emit-llvm-bc -o - | llvm-spirv -spirv-mem2reg -o %t.spv
4+
// RUN: %clang_cc1 %s -triple spir -disable-llvm-passes -debug-info-kind=standalone -emit-llvm-bc -o - -no-opaque-pointers | llvm-spirv -spirv-mem2reg -o %t.spv
55
// RUN: llvm-spirv %t.spv -to-text -o - | FileCheck %s --check-prefix=CHECK-SPIRV
66
// RUN: llvm-spirv -r %t.spv -o - | llvm-dis -o - | FileCheck %s --check-prefix=CHECK-LLVM
77

0 commit comments

Comments
 (0)