[llvm] [KnownFPClass] Propagate non-`sNaN` for `fadd`/`fsub`, `fmul`, `fdiv`, and `fma` (PR #221876)
via llvm-commits
llvm-commits at lists.llvm.org
Mon Sep 7 22:50:05 PDT 2026
github-actions[bot] wrote:
<!--PREMERGE ADVISOR COMMENT: Linux-->
# :penguin: Linux x64 Test Results
* 152717 tests passed
* 3268 tests skipped
* 6 tests failed
## Failed Tests
(click on a test name to see its output)
### LLVM
<details>
<summary>LLVM.Transforms/Attributor/AMDGPU/nofpclass-amdgcn-trig-preop.ll</summary>
```
Exit Code: 1
Command Output (stdout):
--
# RUN: at line 2
/home/gha/actions-runner/_work/llvm-project/llvm-project/build/bin/opt -S -passes=attributor -attributor-manifest-internal < /home/gha/actions-runner/_work/llvm-project/llvm-project/llvm/test/Transforms/Attributor/AMDGPU/nofpclass-amdgcn-trig-preop.ll | /home/gha/actions-runner/_work/llvm-project/llvm-project/build/bin/FileCheck --allow-unused-prefixes /home/gha/actions-runner/_work/llvm-project/llvm-project/llvm/test/Transforms/Attributor/AMDGPU/nofpclass-amdgcn-trig-preop.ll
# executed command: /home/gha/actions-runner/_work/llvm-project/llvm-project/build/bin/opt -S -passes=attributor -attributor-manifest-internal
# note: command had no output on stdout or stderr
# executed command: /home/gha/actions-runner/_work/llvm-project/llvm-project/build/bin/FileCheck --allow-unused-prefixes /home/gha/actions-runner/_work/llvm-project/llvm-project/llvm/test/Transforms/Attributor/AMDGPU/nofpclass-amdgcn-trig-preop.ll
# .---command stderr------------
# | /home/gha/actions-runner/_work/llvm-project/llvm-project/llvm/test/Transforms/Attributor/AMDGPU/nofpclass-amdgcn-trig-preop.ll:39:16: error: CHECK-LABEL: expected string not found in input
# | ; CHECK-LABEL: define double @ret_not_nan__fmul__trig_preop(
# | ^
# | <stdin>:18:61: note: scanning from here
# | define nofpclass(inf) double @ret_trig_preop__fmul__not_inf(double nofpclass(inf) %not.inf, double %x, i32 %n) #0 {
# | ^
# | <stdin>:25:17: note: possible intended match here
# | define nofpclass(snan) double @ret_not_nan__fmul__trig_preop(double nofpclass(nan) %not.nan, double %x, i32 %n) #0 {
# | ^
# |
# | Input file: <stdin>
# | Check file: /home/gha/actions-runner/_work/llvm-project/llvm-project/llvm/test/Transforms/Attributor/AMDGPU/nofpclass-amdgcn-trig-preop.ll
# |
# | -dump-input=help explains the following input dump.
# |
# | Input was:
# | <<<<<<
# | .
# | .
# | .
# | 13: %mul = fmul double %not.inf, %trig.preop
# | 14: ret double %mul
# | 15: }
# | 16:
# | 17: ; Function Attrs: mustprogress nofree norecurse nosync nounwind willreturn memory(none)
# | 18: define nofpclass(inf) double @ret_trig_preop__fmul__not_inf(double nofpclass(inf) %not.inf, double %x, i32 %n) #0 {
# | label:39'0 { search range start (exclusive)
# | label:39'1 error: no match found in search range
# | 19: %trig.preop = call double @llvm.amdgcn.trig.preop.f64(double %x, i32 %n) #2
# | 20: %mul = fmul double %trig.preop, %not.inf
# | 21: ret double %mul
# | 22: }
# | 23:
# | 24: ; Function Attrs: mustprogress nofree norecurse nosync nounwind willreturn memory(none)
# | 25: define nofpclass(snan) double @ret_not_nan__fmul__trig_preop(double nofpclass(nan) %not.nan, double %x, i32 %n) #0 {
# | label:39'2 ? possible intended match
# | 26: %trig.preop = call double @llvm.amdgcn.trig.preop.f64(double %x, i32 %n) #2
# | 27: %mul = fmul double %not.nan, %trig.preop
# | 28: ret double %mul
# | 29: }
# | 30:
# | .
# | .
# | .
# | 72: ; Function Attrs: nocallback nocreateundeforpoison nofree nosync nounwind speculatable willreturn memory(none)
# | 73: declare double @llvm.fma.f64(double, double, double) #1
# | 74:
# | 75: attributes #0 = { mustprogress nofree norecurse nosync nounwind willreturn memory(none) }
# | 76: attributes #1 = { nocallback nocreateundeforpoison nofree nosync nounwind speculatable willreturn memory(none) }
# | 77: attributes #2 = { nofree nosync willreturn }
# | label:39'3 } search range end (exclusive)
# | >>>>>>
# `-----------------------------
# error: command failed with exit status: 1
--
```
</details>
<details>
<summary>LLVM.Transforms/Attributor/nofpclass-nan-fmul.ll</summary>
```
Exit Code: 1
Command Output (stdout):
--
# RUN: at line 2
/home/gha/actions-runner/_work/llvm-project/llvm-project/build/bin/opt -aa-pipeline=basic-aa -passes=attributor -attributor-manifest-internal -S < /home/gha/actions-runner/_work/llvm-project/llvm-project/llvm/test/Transforms/Attributor/nofpclass-nan-fmul.ll | /home/gha/actions-runner/_work/llvm-project/llvm-project/build/bin/FileCheck --allow-unused-prefixes /home/gha/actions-runner/_work/llvm-project/llvm-project/llvm/test/Transforms/Attributor/nofpclass-nan-fmul.ll --check-prefixes=CHECK,TUNIT
# executed command: /home/gha/actions-runner/_work/llvm-project/llvm-project/build/bin/opt -aa-pipeline=basic-aa -passes=attributor -attributor-manifest-internal -S
# note: command had no output on stdout or stderr
# executed command: /home/gha/actions-runner/_work/llvm-project/llvm-project/build/bin/FileCheck --allow-unused-prefixes /home/gha/actions-runner/_work/llvm-project/llvm-project/llvm/test/Transforms/Attributor/nofpclass-nan-fmul.ll --check-prefixes=CHECK,TUNIT
# .---command stderr------------
# | /home/gha/actions-runner/_work/llvm-project/llvm-project/llvm/test/Transforms/Attributor/nofpclass-nan-fmul.ll:5:16: error: CHECK-LABEL: expected string not found in input
# | ; CHECK-LABEL: define float @ret_fmul_ieee_nonan__nonan
# | ^
# | <stdin>:1:1: note: scanning from here
# | ; ModuleID = '<stdin>'
# | ^
# | <stdin>:5:17: note: possible intended match here
# | define nofpclass(snan) float @ret_fmul_ieee_nonan__nonan(float nofpclass(nan) %arg0, float nofpclass(nan) %arg1) #0 {
# | ^
# |
# | Input file: <stdin>
# | Check file: /home/gha/actions-runner/_work/llvm-project/llvm-project/llvm/test/Transforms/Attributor/nofpclass-nan-fmul.ll
# |
# | -dump-input=help explains the following input dump.
# |
# | Input was:
# | <<<<<<
# | 1: ; ModuleID = '<stdin>'
# | label:5'0 { search range start (exclusive)
# | label:5'1 error: no match found in search range
# | 2: source_filename = "<stdin>"
# | 3:
# | 4: ; Function Attrs: mustprogress nofree norecurse nosync nounwind willreturn denormal_fpenv(ieee) memory(none)
# | 5: define nofpclass(snan) float @ret_fmul_ieee_nonan__nonan(float nofpclass(nan) %arg0, float nofpclass(nan) %arg1) #0 {
# | label:5'2 ? possible intended match
# | 6: %fmul = fmul float %arg0, %arg1
# | 7: ret float %fmul
# | 8: }
# | 9:
# | 10: ; Function Attrs: mustprogress nofree norecurse nosync nounwind willreturn denormal_fpenv(ieee) memory(none)
# | .
# | .
# | .
# | 219:
# | 220: attributes #0 = { mustprogress nofree norecurse nosync nounwind willreturn denormal_fpenv(ieee) memory(none) }
# | 221: attributes #1 = { mustprogress nofree norecurse nosync nounwind willreturn denormal_fpenv(ieee|preservesign) memory(none) }
# | 222: attributes #2 = { mustprogress nofree norecurse nosync nounwind willreturn denormal_fpenv(ieee|positivezero) memory(none) }
# | 223: attributes #3 = { mustprogress nofree norecurse nosync nounwind willreturn denormal_fpenv(ieee|dynamic) memory(none) }
# | 224: attributes #4 = { mustprogress nofree norecurse nosync nounwind willreturn memory(none) }
# | label:5'3 } search range end (exclusive)
# | >>>>>>
# `-----------------------------
# error: command failed with exit status: 1
--
```
</details>
### LLVM-Unit
<details>
<summary>LLVM-Unit.Analysis/_/AnalysisTests/ComputeKnownFPClassTest/FAdd</summary>
```
Script:
--
/home/gha/actions-runner/_work/llvm-project/llvm-project/build/unittests/Analysis/./AnalysisTests --gtest_filter=ComputeKnownFPClassTest.FAdd
--
/home/gha/actions-runner/_work/llvm-project/llvm-project/llvm/unittests/Analysis/ValueTrackingTest.cpp:129
Expected equality of these values:
KnownTrue
Which is: 1023
Known.KnownFPClasses
Which is: (qnan inf zero sub norm)
```
</details>
<details>
<summary>LLVM-Unit.Analysis/_/AnalysisTests/ComputeKnownFPClassTest/FMul</summary>
```
Script:
--
/home/gha/actions-runner/_work/llvm-project/llvm-project/build/unittests/Analysis/./AnalysisTests --gtest_filter=ComputeKnownFPClassTest.FMul
--
/home/gha/actions-runner/_work/llvm-project/llvm-project/llvm/unittests/Analysis/ValueTrackingTest.cpp:129
Expected equality of these values:
KnownTrue
Which is: 1023
Known.KnownFPClasses
Which is: (qnan inf zero sub norm)
/home/gha/actions-runner/_work/llvm-project/llvm-project/llvm/unittests/Analysis/ValueTrackingTest.cpp:129
Expected equality of these values:
KnownTrue
Which is: 1023
Known.KnownFPClasses
Which is: (qnan inf zero sub norm)
```
</details>
<details>
<summary>LLVM-Unit.Analysis/_/AnalysisTests/ComputeKnownFPClassTest/FMulNoZero</summary>
```
Script:
--
/home/gha/actions-runner/_work/llvm-project/llvm-project/build/unittests/Analysis/./AnalysisTests --gtest_filter=ComputeKnownFPClassTest.FMulNoZero
--
/home/gha/actions-runner/_work/llvm-project/llvm-project/llvm/unittests/Analysis/ValueTrackingTest.cpp:129
Expected equality of these values:
KnownTrue
Which is: 1023
Known.KnownFPClasses
Which is: (qnan inf zero sub norm)
/home/gha/actions-runner/_work/llvm-project/llvm-project/llvm/unittests/Analysis/ValueTrackingTest.cpp:129
Expected equality of these values:
KnownTrue
Which is: 1023
Known.KnownFPClasses
Which is: (qnan inf zero sub norm)
/home/gha/actions-runner/_work/llvm-project/llvm-project/llvm/unittests/Analysis/ValueTrackingTest.cpp:129
Expected equality of these values:
KnownTrue
Which is: 1023
Known.KnownFPClasses
Which is: (qnan inf zero sub norm)
```
</details>
<details>
<summary>LLVM-Unit.Analysis/_/AnalysisTests/ComputeKnownFPClassTest/FSub</summary>
```
Script:
--
/home/gha/actions-runner/_work/llvm-project/llvm-project/build/unittests/Analysis/./AnalysisTests --gtest_filter=ComputeKnownFPClassTest.FSub
--
/home/gha/actions-runner/_work/llvm-project/llvm-project/llvm/unittests/Analysis/ValueTrackingTest.cpp:129
Expected equality of these values:
KnownTrue
Which is: 1023
Known.KnownFPClasses
Which is: (qnan inf zero sub norm)
```
</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/221876
More information about the llvm-commits
mailing list