[libclc] [libclc] Fix fmod returning NaN for subnormal inputs (PR #225351)
via cfe-commits
cfe-commits at lists.llvm.org
Sun Nov 15 19:31:43 PST 2026
github-actions[bot] wrote:
<!--PREMERGE ADVISOR COMMENT: Windows-->
# :window: Windows x64 Test Results
* 9 tests passed
* 2 tests skipped
* 1 test failed
## Failed Tests
(click on a test name to see its output)
### libclc
<details>
<summary>libclc.math/cos.cl</summary>
```
Exit Code: 1
Command Output (stdout):
--
# RUN: at line 4
c:\_work\llvm-project\llvm-project\build\bin\clang.exe --target=amdgcn-amd-amdhsa-llvm -mcpu=gfx900 -cl-std=CL3.0 -O2 -fno-discard-value-names -emit-llvm -S -o - C:\_work\llvm-project\llvm-project\libclc\test\math\cos.cl | c:\_work\llvm-project\llvm-project\build\bin\filecheck.exe C:\_work\llvm-project\llvm-project\libclc\test\math\cos.cl --check-prefix=AMDGCN
# executed command: 'c:\_work\llvm-project\llvm-project\build\bin\clang.exe' --target=amdgcn-amd-amdhsa-llvm -mcpu=gfx900 -cl-std=CL3.0 -O2 -fno-discard-value-names -emit-llvm -S -o - 'C:\_work\llvm-project\llvm-project\libclc\test\math\cos.cl'
# 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\libclc\test\math\cos.cl' --check-prefix=AMDGCN
# .---command stderr------------
# | C:\_work\llvm-project\llvm-project\libclc\test\math\cos.cl:10:17: error: AMDGCN-NEXT: expected string not found in input
# | // AMDGCN-NEXT: [[TMP1:%.*]] = fcmp une float [[TMP0]], +inf
# | ^
# | <stdin>:9:47: note: scanning from here
# | %0 = tail call float @llvm.fabs.f32(float %x)
# | ^
# | <stdin>:9:47: note: with "TMP0" equal to "%0"
# | %0 = tail call float @llvm.fabs.f32(float %x)
# | ^
# | <stdin>:9:47: note: pattern attempts to capture variables: "TMP1"
# | %0 = tail call float @llvm.fabs.f32(float %x)
# | ^
# | <stdin>:10:9: note: possible intended match here
# | %1 = fcmp contract une float %0, +inf
# | ^
# |
# | Input file: <stdin>
# | Check file: C:\_work\llvm-project\llvm-project\libclc\test\math\cos.cl
# |
# | -dump-input=help explains the following input dump.
# |
# | Input was:
# | <<<<<<
# | 1: ; ModuleID = 'C:\_work\llvm-project\llvm-project\libclc\test\math\cos.cl'
# | 2: source_filename = "C:\\_work\\llvm-project\\llvm-project\\libclc\\test\\math\\cos.cl"
# | 3: target datalayout = "e-m:e-p:64:64-p1:64:64-p2:32:32-p3:32:32-p4:64:64-p5:32:32-p6:32:32-p7:160:256:256:32-p8:128:128:128:48-p9:192:256:256:32-p10:32:32-p11:32:32-p12:32:32-p13:32:32-p14:32:32-p15:32:32-i64:64-v16:16-v24:32-v32:32-v48:64-v96:128-v192:256-v256:256-v512:512-v1024:1024-v2048:2048-n32:64-S32-A5-G1-ni:7:8:9"
# | 4: target triple = "amdgpu9.00-amd-amdhsa-llvm"
# | 5:
# | 6: ; Function Attrs: mustprogress nofree norecurse nosync nounwind willreturn memory(none) uwtable
# | 7: define hidden float @test_float(float noundef %x) local_unnamed_addr #0 {
# | 8: entry:
# | 9: %0 = tail call float @llvm.fabs.f32(float %x)
# | next:10'0 { search range start (exclusive)
# | next:10'1 error: no match found in search range
# | next:10'2 with "TMP0" equal to "%0"
# | next:10'3 pattern attempts to capture variables: "TMP1"
# | 10: %1 = fcmp contract une float %0, +inf
# | next:10'4 ? possible intended match
# | 11: %2 = select contract i1 %1, float %0, float +qnan
# | 12: %3 = fcmp ult float %2, 1.310720e+05
# | 13: br i1 %3, label %109, label %4
# | 14:
# | 15: 4: ; preds = %entry
# | .
# | .
# | .
# | 203: !8 = !{!"clang version 24.0.0git (https://github.com/llvm/llvm-project 12eb4fbe444d141a94a9fa2831fb8c00425c4c8d)"}
# | 204: !9 = !{!10, !11, i64 0}
# | 205: !10 = !{!"__libc_errno", !11, i64 0}
# | 206: !11 = !{!"int", !12, i64 0}
# | 207: !12 = !{!"omnipotent char", !13, i64 0}
# | 208: !13 = !{!"Simple C/C++ TBAA"}
# | next:10'5 } search range end (exclusive)
# | >>>>>>
# `-----------------------------
# 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/225351
More information about the cfe-commits
mailing list