Author: Haojian Wu
Date: 2025-01-03T14:16:47+01:00
New Revision: 119fc720a19e047fee59d7f7446c911b158563e0

URL: 
https://github.com/llvm/llvm-project/commit/119fc720a19e047fee59d7f7446c911b158563e0
DIFF: 
https://github.com/llvm/llvm-project/commit/119fc720a19e047fee59d7f7446c911b158563e0.diff

LOG: NFC, explicitly specify the -fopenmp lib in spirv-openmp-toolchain.c test

Don't rely on the default `CLANG_DEFAULT_OPENMP_RUNTIME` env variable
which is `libomp` by default.

Added: 
    

Modified: 
    clang/test/Driver/spirv-openmp-toolchain.c

Removed: 
    


################################################################################
diff  --git a/clang/test/Driver/spirv-openmp-toolchain.c 
b/clang/test/Driver/spirv-openmp-toolchain.c
index 3eb1f22a03ed0a..377b2d9be0b09b 100644
--- a/clang/test/Driver/spirv-openmp-toolchain.c
+++ b/clang/test/Driver/spirv-openmp-toolchain.c
@@ -9,7 +9,7 @@
 // CHECK: "-cc1" "-triple" "x86_64-unknown-linux-gnu"{{.*}}"-emit-obj"
 // CHECK: clang-linker-wrapper{{.*}} "-o" "a.out"
 
-// RUN: %clang -ccc-print-phases --target=x86_64-unknown-linux-gnu -fopenmp 
-fopenmp-targets=spirv64-intel %s 2>&1 \
+// RUN: %clang -ccc-print-phases --target=x86_64-unknown-linux-gnu 
-fopenmp=libomp -fopenmp-targets=spirv64-intel %s 2>&1 \
 // RUN: | FileCheck --check-prefix=CHECK-PHASES %s
 
 // CHECK-PHASES: 0: input, "[[INPUT:.+]]", c, (host-openmp)
@@ -28,8 +28,8 @@
 // CHECK-PHASES: 13: assembler, {12}, object, (host-openmp)
 // CHECK-PHASES: 14: clang-linker-wrapper, {13}, image, (host-openmp)
 
-// RUN: %clang -### --target=x86_64-unknown-linux-gnu -ccc-print-bindings 
-fopenmp -fopenmp-targets=spirv64-intel -nogpulib %s 2>&1 | FileCheck %s 
--check-prefix=CHECK-BINDINGS
-// RUN: %clang -### --target=x86_64-unknown-linux-gnu -ccc-print-bindings 
-fopenmp -fopenmp-targets=spirv64-intel -nogpulib %s 2>&1 | FileCheck %s 
--check-prefix=CHECK-BINDINGS
+// RUN: %clang -### --target=x86_64-unknown-linux-gnu -ccc-print-bindings 
-fopenmp=libomp -fopenmp-targets=spirv64-intel -nogpulib %s 2>&1 | FileCheck %s 
--check-prefix=CHECK-BINDINGS
+// RUN: %clang -### --target=x86_64-unknown-linux-gnu -ccc-print-bindings 
-fopenmp=libomp -fopenmp-targets=spirv64-intel -nogpulib %s 2>&1 | FileCheck %s 
--check-prefix=CHECK-BINDINGS
 
 // CHECK-BINDINGS: "x86_64-unknown-linux-gnu" - "clang", inputs: 
["[[INPUT:.+]]"], output: "[[HOST_BC:.+]]"
 // CHECK-BINDINGS: "spirv64-intel" - "clang", inputs: ["[[INPUT]]", 
"[[HOST_BC]]"], output: "[[DEVICE_TEMP_BC:.+]]"
@@ -38,8 +38,8 @@
 // CHECK-BINDINGS: "x86_64-unknown-linux-gnu" - "clang", inputs: 
["[[HOST_BC]]", "[[DEVICE_IMAGE]]"], output: "[[HOST_OBJ:.+]]"
 // CHECK-BINDINGS: "x86_64-unknown-linux-gnu" - "Offload::Linker", inputs: 
["[[HOST_OBJ]]"], output: "a.out"
 
-// RUN: %clang -### --target=x86_64-unknown-linux-gnu -ccc-print-bindings 
-save-temps -fopenmp -fopenmp-targets=spirv64-intel -nogpulib %s 2>&1 | 
FileCheck %s --check-prefix=CHECK-BINDINGS-TEMPS
-// RUN: %clang -### --target=x86_64-unknown-linux-gnu -ccc-print-bindings 
-save-temps -fopenmp -fopenmp-targets=spirv64-intel %s 2>&1 | FileCheck %s 
--check-prefix=CHECK-BINDINGS-TEMPS
+// RUN: %clang -### --target=x86_64-unknown-linux-gnu -ccc-print-bindings 
-save-temps -fopenmp=libomp -fopenmp-targets=spirv64-intel -nogpulib %s 2>&1 | 
FileCheck %s --check-prefix=CHECK-BINDINGS-TEMPS
+// RUN: %clang -### --target=x86_64-unknown-linux-gnu -ccc-print-bindings 
-save-temps -fopenmp=libomp -fopenmp-targets=spirv64-intel %s 2>&1 | FileCheck 
%s --check-prefix=CHECK-BINDINGS-TEMPS
 // CHECK-BINDINGS-TEMPS: "x86_64-unknown-linux-gnu" - "clang", inputs: 
["[[INPUT:.+]]"], output: "[[HOST_PP:.+]]"
 // CHECK-BINDINGS-TEMPS: "x86_64-unknown-linux-gnu" - "clang", inputs: 
["[[HOST_PP]]"], output: "[[HOST_BC:.+]]"
 // CHECK-BINDINGS-TEMPS: "spirv64-intel" - "clang", inputs: ["[[INPUT]]"], 
output: "[[DEVICE_PP:.+]]"
@@ -51,14 +51,14 @@
 // CHECK-BINDINGS-TEMPS: "x86_64-unknown-linux-gnu" - "clang::as", inputs: 
["[[HOST_ASM]]"], output: "[[HOST_OBJ:.+]]"
 // CHECK-BINDINGS-TEMPS: "x86_64-unknown-linux-gnu" - "Offload::Linker", 
inputs: ["[[HOST_OBJ]]"], output: "a.out"
 
-// RUN: %clang -### --target=x86_64-unknown-linux-gnu -emit-llvm -S -fopenmp 
-fopenmp-targets=spirv64-intel -nogpulib %s 2>&1 | FileCheck %s 
--check-prefix=CHECK-EMIT-LLVM-IR
+// RUN: %clang -### --target=x86_64-unknown-linux-gnu -emit-llvm -S 
-fopenmp=libomp -fopenmp-targets=spirv64-intel -nogpulib %s 2>&1 | FileCheck %s 
--check-prefix=CHECK-EMIT-LLVM-IR
 // CHECK-EMIT-LLVM-IR: "-cc1" "-triple" "spirv64-intel"{{.*}}"-emit-llvm-bc"
 
-// RUN: %clang -### --target=x86_64-unknown-linux-gnu -fopenmp 
-fopenmp-targets=spirv64-intel \
+// RUN: %clang -### --target=x86_64-unknown-linux-gnu -fopenmp=libomp 
-fopenmp-targets=spirv64-intel \
 // RUN: --sysroot=%S/Inputs/spirv-openmp/ %s 2>&1 | FileCheck 
--check-prefix=CHECK-GPULIB %s
 // CHECK-GPULIB: "-cc1" "-triple" 
"spirv64-intel"{{.*}}"-mlink-builtin-bitcode" "{{.*}}libomptarget-spirv64.bc"
 
-// RUN: not %clang -### --target=x86_64-unknown-linux-gnu -fopenmp 
--offload-arch=spirv64-intel \
+// RUN: not %clang -### --target=x86_64-unknown-linux-gnu -fopenmp=libomp 
--offload-arch=spirv64-intel \
 // RUN:        --libomptarget-spirv-bc-path=%t/ -nogpulib %s 2>&1 \
 // RUN: | FileCheck %s --check-prefix=CHECK-OFFLOAD-ARCH-ERROR
 // CHECK-OFFLOAD-ARCH-ERROR: error: failed to deduce triple for target 
architecture 'spirv64-intel'; specify the triple using '-fopenmp-targets' and 
'-Xopenmp-target' instead


        
_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to