[clang] [OFFLOAD] Introduce OpenMP cmath wrappers for SPIRV backend (PR #195386)
via cfe-commits
cfe-commits at lists.llvm.org
Fri May 1 17:04:52 PDT 2026
github-actions[bot] wrote:
<!--PREMERGE ADVISOR COMMENT: Windows-->
# :window: Windows x64 Test Results
* 53768 tests passed
* 1172 tests skipped
* 1 test failed
## Failed Tests
(click on a test name to see its output)
### Clang
<details>
<summary>Clang.Headers/openmp_device_math_isnan.cpp</summary>
```
Exit Code: 1
Command Output (stdout):
--
# RUN: at line 1
c:\_work\llvm-project\llvm-project\build\bin\clang.exe -cc1 -internal-isystem C:\_work\llvm-project\llvm-project\build\lib\clang\23\include -nostdsysteminc -x c++ -internal-isystem C:\_work\llvm-project\llvm-project\clang\test\Headers/Inputs/include -fopenmp -triple powerpc64le-unknown-unknown -fopenmp-targets=nvptx64-nvidia-cuda -emit-llvm-bc C:\_work\llvm-project\llvm-project\clang\test\Headers\openmp_device_math_isnan.cpp -o C:\_work\llvm-project\llvm-project\build\tools\clang\test\Headers\Output\openmp_device_math_isnan.cpp.tmp-ppc-host.bc
# executed command: 'c:\_work\llvm-project\llvm-project\build\bin\clang.exe' -cc1 -internal-isystem 'C:\_work\llvm-project\llvm-project\build\lib\clang\23\include' -nostdsysteminc -x c++ -internal-isystem 'C:\_work\llvm-project\llvm-project\clang\test\Headers/Inputs/include' -fopenmp -triple powerpc64le-unknown-unknown -fopenmp-targets=nvptx64-nvidia-cuda -emit-llvm-bc 'C:\_work\llvm-project\llvm-project\clang\test\Headers\openmp_device_math_isnan.cpp' -o 'C:\_work\llvm-project\llvm-project\build\tools\clang\test\Headers\Output\openmp_device_math_isnan.cpp.tmp-ppc-host.bc'
# note: command had no output on stdout or stderr
# RUN: at line 2
c:\_work\llvm-project\llvm-project\build\bin\clang.exe -cc1 -internal-isystem C:\_work\llvm-project\llvm-project\build\lib\clang\23\include -nostdsysteminc -x c++ -internal-isystem C:\_work\llvm-project\llvm-project\clang\test\Headers/Inputs/include -fopenmp -triple powerpc64le-unknown-unknown -fopenmp-targets=spirv64-nvidia-cuda -emit-llvm-bc C:\_work\llvm-project\llvm-project\clang\test\Headers\openmp_device_math_isnan.cpp -o C:\_work\llvm-project\llvm-project\build\tools\clang\test\Headers\Output\openmp_device_math_isnan.cpp.tmp-ppc-host.bc
# executed command: 'c:\_work\llvm-project\llvm-project\build\bin\clang.exe' -cc1 -internal-isystem 'C:\_work\llvm-project\llvm-project\build\lib\clang\23\include' -nostdsysteminc -x c++ -internal-isystem 'C:\_work\llvm-project\llvm-project\clang\test\Headers/Inputs/include' -fopenmp -triple powerpc64le-unknown-unknown -fopenmp-targets=spirv64-nvidia-cuda -emit-llvm-bc 'C:\_work\llvm-project\llvm-project\clang\test\Headers\openmp_device_math_isnan.cpp' -o 'C:\_work\llvm-project\llvm-project\build\tools\clang\test\Headers\Output\openmp_device_math_isnan.cpp.tmp-ppc-host.bc'
# note: command had no output on stdout or stderr
# RUN: at line 3
c:\_work\llvm-project\llvm-project\build\bin\clang.exe -cc1 -internal-isystem C:\_work\llvm-project\llvm-project\build\lib\clang\23\include -nostdsysteminc -x c++ -internal-isystem C:\_work\llvm-project\llvm-project\clang\test\Headers/Inputs/include -fopenmp -triple powerpc64le-unknown-unknown -fopenmp-targets=amdgcn-amd-amdhsa -emit-llvm-bc C:\_work\llvm-project\llvm-project\clang\test\Headers\openmp_device_math_isnan.cpp -o C:\_work\llvm-project\llvm-project\build\tools\clang\test\Headers\Output\openmp_device_math_isnan.cpp.tmp-ppc-host.bc
# executed command: 'c:\_work\llvm-project\llvm-project\build\bin\clang.exe' -cc1 -internal-isystem 'C:\_work\llvm-project\llvm-project\build\lib\clang\23\include' -nostdsysteminc -x c++ -internal-isystem 'C:\_work\llvm-project\llvm-project\clang\test\Headers/Inputs/include' -fopenmp -triple powerpc64le-unknown-unknown -fopenmp-targets=amdgcn-amd-amdhsa -emit-llvm-bc 'C:\_work\llvm-project\llvm-project\clang\test\Headers\openmp_device_math_isnan.cpp' -o 'C:\_work\llvm-project\llvm-project\build\tools\clang\test\Headers\Output\openmp_device_math_isnan.cpp.tmp-ppc-host.bc'
# note: command had no output on stdout or stderr
# RUN: at line 4
c:\_work\llvm-project\llvm-project\build\bin\clang.exe -cc1 -internal-isystem C:\_work\llvm-project\llvm-project\build\lib\clang\23\include -nostdsysteminc -x c++ -include __clang_openmp_device_functions.h -internal-isystem C:\_work\llvm-project\llvm-project\clang\test\Headers/../../lib/Headers/openmp_wrappers -internal-isystem C:\_work\llvm-project\llvm-project\clang\test\Headers/Inputs/include -fopenmp -triple nvptx64-nvidia-cuda -aux-triple powerpc64le-unknown-unknown -fopenmp-targets=nvptx64-nvidia-cuda -emit-llvm C:\_work\llvm-project\llvm-project\clang\test\Headers\openmp_device_math_isnan.cpp -fopenmp-is-target-device -fopenmp-host-ir-file-path C:\_work\llvm-project\llvm-project\build\tools\clang\test\Headers\Output\openmp_device_math_isnan.cpp.tmp-ppc-host.bc -o - | c:\_work\llvm-project\llvm-project\build\bin\filecheck.exe C:\_work\llvm-project\llvm-project\clang\test\Headers\openmp_device_math_isnan.cpp --check-prefix=BOOL_RETURN
# executed command: 'c:\_work\llvm-project\llvm-project\build\bin\clang.exe' -cc1 -internal-isystem 'C:\_work\llvm-project\llvm-project\build\lib\clang\23\include' -nostdsysteminc -x c++ -include __clang_openmp_device_functions.h -internal-isystem 'C:\_work\llvm-project\llvm-project\clang\test\Headers/../../lib/Headers/openmp_wrappers' -internal-isystem 'C:\_work\llvm-project\llvm-project\clang\test\Headers/Inputs/include' -fopenmp -triple nvptx64-nvidia-cuda -aux-triple powerpc64le-unknown-unknown -fopenmp-targets=nvptx64-nvidia-cuda -emit-llvm 'C:\_work\llvm-project\llvm-project\clang\test\Headers\openmp_device_math_isnan.cpp' -fopenmp-is-target-device -fopenmp-host-ir-file-path 'C:\_work\llvm-project\llvm-project\build\tools\clang\test\Headers\Output\openmp_device_math_isnan.cpp.tmp-ppc-host.bc' -o -
# note: command had no output on stdout or stderr
# executed command: 'c:\_work\llvm-project\llvm-project\build\bin\filecheck.exe' 'C:\_work\llvm-project\llvm-project\clang\test\Headers\openmp_device_math_isnan.cpp' --check-prefix=BOOL_RETURN
# note: command had no output on stdout or stderr
# RUN: at line 5
c:\_work\llvm-project\llvm-project\build\bin\clang.exe -cc1 -internal-isystem C:\_work\llvm-project\llvm-project\build\lib\clang\23\include -nostdsysteminc -x c++ -include __clang_openmp_device_functions.h -internal-isystem C:\_work\llvm-project\llvm-project\clang\test\Headers/../../lib/Headers/openmp_wrappers -internal-isystem C:\_work\llvm-project\llvm-project\clang\test\Headers/Inputs/include -fopenmp -triple spirv64 -aux-triple powerpc64le-unknown-unknown -fopenmp-targets=spirv64 -emit-llvm C:\_work\llvm-project\llvm-project\clang\test\Headers\openmp_device_math_isnan.cpp -fopenmp-is-target-device -fopenmp-host-ir-file-path C:\_work\llvm-project\llvm-project\build\tools\clang\test\Headers\Output\openmp_device_math_isnan.cpp.tmp-ppc-host.bc -o - | c:\_work\llvm-project\llvm-project\build\bin\filecheck.exe C:\_work\llvm-project\llvm-project\clang\test\Headers\openmp_device_math_isnan.cpp --check-prefix=SPIRV_BOOL_RETURN
# executed command: 'c:\_work\llvm-project\llvm-project\build\bin\clang.exe' -cc1 -internal-isystem 'C:\_work\llvm-project\llvm-project\build\lib\clang\23\include' -nostdsysteminc -x c++ -include __clang_openmp_device_functions.h -internal-isystem 'C:\_work\llvm-project\llvm-project\clang\test\Headers/../../lib/Headers/openmp_wrappers' -internal-isystem 'C:\_work\llvm-project\llvm-project\clang\test\Headers/Inputs/include' -fopenmp -triple spirv64 -aux-triple powerpc64le-unknown-unknown -fopenmp-targets=spirv64 -emit-llvm 'C:\_work\llvm-project\llvm-project\clang\test\Headers\openmp_device_math_isnan.cpp' -fopenmp-is-target-device -fopenmp-host-ir-file-path 'C:\_work\llvm-project\llvm-project\build\tools\clang\test\Headers\Output\openmp_device_math_isnan.cpp.tmp-ppc-host.bc' -o -
# note: command had no output on stdout or stderr
# executed command: 'c:\_work\llvm-project\llvm-project\build\bin\filecheck.exe' 'C:\_work\llvm-project\llvm-project\clang\test\Headers\openmp_device_math_isnan.cpp' --check-prefix=SPIRV_BOOL_RETURN
# .---command stderr------------
# | C:\_work\llvm-project\llvm-project\clang\test\Headers\openmp_device_math_isnan.cpp:35:24: error: SPIRV_BOOL_RETURN: expected string not found in input
# | // SPIRV_BOOL_RETURN: call spir_func noundef zeroext i1 @_Z5isnanf(float
# | ^
# | <stdin>:1:1: note: scanning from here
# | ; ModuleID = 'C:\_work\llvm-project\llvm-project\clang\test\Headers\openmp_device_math_isnan.cpp'
# | ^
# | <stdin>:47:6: note: possible intended match here
# | %call = call spir_func noundef double @_Z4mathfd(float noundef %3, double noundef %4)
# | ^
# |
# | Input file: <stdin>
# | Check file: C:\_work\llvm-project\llvm-project\clang\test\Headers\openmp_device_math_isnan.cpp
# |
# | -dump-input=help explains the following input dump.
# |
# | Input was:
# | <<<<<<
# | 1: ; ModuleID = 'C:\_work\llvm-project\llvm-project\clang\test\Headers\openmp_device_math_isnan.cpp'
# | check:35'0 X~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ error: no match found
# | 2: source_filename = "C:\\_work\\llvm-project\\llvm-project\\clang\\test\\Headers\\openmp_device_math_isnan.cpp"
# | check:35'0 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# | 3: target datalayout = "e-i64:64-v16:16-v24:32-v32:32-v48:64-v96:128-v192:256-v256:256-v512:512-v1024:1024-n8:16:32:64-G1"
# | check:35'0 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# | 4: target triple = "spirv64"
# | check:35'0 ~~~~~~~~~~~~~~~~~~~~~~~~~~
# | 5:
# | check:35'0 ~
# | 6: %struct.ident_t = type { i32, i32, i32, i32, ptr }
# | check:35'0 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# | .
# | .
# | .
# | 42: br i1 %exec_user_code, label %user_code.entry, label %worker.exit
# | check:35'0 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# | 43:
# | check:35'0 ~
# | 44: user_code.entry: ; preds = %entry
# | check:35'0 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# | 45: %3 = load float, ptr %f.addr, align 4
# | check:35'0 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# | 46: %4 = load double, ptr %d.addr, align 8
# | check:35'0 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# | 47: %call = call spir_func noundef double @_Z4mathfd(float noundef %3, double noundef %4)
# | check:35'0 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# | check:35'1 ? possible intended match
# | 48: %5 = load double, ptr %0, align 8
# | check:35'0 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# | 49: %add = fadd double %5, %call
# | check:35'0 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# | 50: store double %add, ptr %0, align 8
# | check:35'0 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# | 51: call spir_func void @__kmpc_target_deinit()
# | check:35'0 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# | 52: ret void
# | check:35'0 ~~~~~~~~~~
# | .
# | .
# | .
# | >>>>>>
# `-----------------------------
# error: command failed with exit status: 1
--
```
</details>
If these failures are unrelated to your changes (for example tests are broken or flaky at HEAD), please open an issue at https://github.com/llvm/llvm-project/issues and add the `infrastructure` label.
https://github.com/llvm/llvm-project/pull/195386
More information about the cfe-commits
mailing list