[clang] [flang] [llvm] [mlir] [LLVM] Remove "no-nans-fp-math" attribute support (PR #186285)

via cfe-commits cfe-commits at lists.llvm.org
Thu Mar 12 18:21:03 PDT 2026


github-actions[bot] wrote:

<!--PREMERGE ADVISOR COMMENT: Linux-->
# :penguin: Linux x64 Test Results

* 171191 tests passed
* 3036 tests skipped
* 4 tests failed

## Failed Tests
(click on a test name to see its output)

### LLVM
<details>
<summary>LLVM.CodeGen/AMDGPU/inline-attr.ll</summary>

```
Exit Code: 1

Command Output (stdout):
--
# RUN: at line 2
/home/gha/actions-runner/_work/llvm-project/llvm-project/build/bin/opt -mtriple=amdgcn-amd-amdhsa -S -O3 /home/gha/actions-runner/_work/llvm-project/llvm-project/llvm/test/CodeGen/AMDGPU/inline-attr.ll  | /home/gha/actions-runner/_work/llvm-project/llvm-project/build/bin/FileCheck --check-prefixes=GCN,UNSAFE /home/gha/actions-runner/_work/llvm-project/llvm-project/llvm/test/CodeGen/AMDGPU/inline-attr.ll
# executed command: /home/gha/actions-runner/_work/llvm-project/llvm-project/build/bin/opt -mtriple=amdgcn-amd-amdhsa -S -O3 /home/gha/actions-runner/_work/llvm-project/llvm-project/llvm/test/CodeGen/AMDGPU/inline-attr.ll
# note: command had no output on stdout or stderr
# executed command: /home/gha/actions-runner/_work/llvm-project/llvm-project/build/bin/FileCheck --check-prefixes=GCN,UNSAFE /home/gha/actions-runner/_work/llvm-project/llvm-project/llvm/test/CodeGen/AMDGPU/inline-attr.ll
# .---command stderr------------
# | /home/gha/actions-runner/_work/llvm-project/llvm-project/llvm/test/CodeGen/AMDGPU/inline-attr.ll:46:11: error: UNSAFE: expected string not found in input
# | ; UNSAFE: attributes #[[ATTR1]] = { nounwind "less-precise-fpmad"="false" "no-nans-fp-math"="false" }
# |           ^
# | <stdin>:27:29: note: scanning from here
# | attributes #0 = { nounwind }
# |                             ^
# | <stdin>:27:29: note: with "ATTR1" equal to "1"
# | attributes #0 = { nounwind }
# |                             ^
# | <stdin>:28:1: note: possible intended match here
# | attributes #1 = { nounwind "less-precise-fpmad"="false" "no-nans-fp-math"="true" }
# | ^
# | 
# | Input file: <stdin>
# | Check file: /home/gha/actions-runner/_work/llvm-project/llvm-project/llvm/test/CodeGen/AMDGPU/inline-attr.ll
# | 
# | -dump-input=help explains the following input dump.
# | 
# | Input was:
# | <<<<<<
# |             .
# |             .
# |             .
# |            22:  %mul.i = fmul float %load, 1.500000e+01 
# |            23:  store float %mul.i, ptr addrspace(1) %p, align 4 
# |            24:  ret void 
# |            25: } 
# |            26:  
# |            27: attributes #0 = { nounwind } 
# | check:46'0                                 X error: no match found
# | check:46'1                                   with "ATTR1" equal to "1"
# |            28: attributes #1 = { nounwind "less-precise-fpmad"="false" "no-nans-fp-math"="true" } 
# | check:46'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# | check:46'2     ?                                                                                   possible intended match
# |            29:  
# | check:46'0     ~
# |            30: !0 = !{} 
# | check:46'0     ~~~~~~~~~
# | >>>>>>
# `-----------------------------
# error: command failed with exit status: 1

--

```
</details>
<details>
<summary>LLVM.Transforms/IROutliner/outlining-compatible-and-attribute-transfer.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=verify,iroutliner -ir-outlining-no-cost < /home/gha/actions-runner/_work/llvm-project/llvm-project/llvm/test/Transforms/IROutliner/outlining-compatible-and-attribute-transfer.ll | /home/gha/actions-runner/_work/llvm-project/llvm-project/build/bin/FileCheck /home/gha/actions-runner/_work/llvm-project/llvm-project/llvm/test/Transforms/IROutliner/outlining-compatible-and-attribute-transfer.ll
# executed command: /home/gha/actions-runner/_work/llvm-project/llvm-project/build/bin/opt -S -passes=verify,iroutliner -ir-outlining-no-cost
# note: command had no output on stdout or stderr
# executed command: /home/gha/actions-runner/_work/llvm-project/llvm-project/build/bin/FileCheck /home/gha/actions-runner/_work/llvm-project/llvm-project/llvm/test/Transforms/IROutliner/outlining-compatible-and-attribute-transfer.ll
# .---command stderr------------
# | /home/gha/actions-runner/_work/llvm-project/llvm-project/llvm/test/Transforms/IROutliner/outlining-compatible-and-attribute-transfer.ll:124:10: error: CHECK: expected string not found in input
# | ; CHECK: attributes [[ATTR1]] = { minsize optsize "less-precise-fpmad"="false" "no-nans-fp-math"="false" "no-signed-zeros-fp-math"="false" }
# |          ^
# | <stdin>:70:33: note: scanning from here
# |  %cl = load i32, ptr %2, align 4
# |                                 ^
# | <stdin>:70:33: note: with "ATTR1" equal to "#1"
# |  %cl = load i32, ptr %2, align 4
# |                                 ^
# | <stdin>:78:1: note: possible intended match here
# | attributes #1 = { minsize optsize "less-precise-fpmad"="false" "no-nans-fp-math"="true" "no-signed-zeros-fp-math"="false" }
# | ^
# | 
# | Input file: <stdin>
# | Check file: /home/gha/actions-runner/_work/llvm-project/llvm-project/llvm/test/Transforms/IROutliner/outlining-compatible-and-attribute-transfer.ll
# | 
# | -dump-input=help explains the following input dump.
# | 
# | Input was:
# | <<<<<<
# |              .
# |              .
# |              .
# |             65:  store i32 2, ptr %0, align 4 
# |             66:  store i32 3, ptr %1, align 4 
# |             67:  store i32 4, ptr %2, align 4 
# |             68:  %al = load i32, ptr %0, align 4 
# |             69:  %bl = load i32, ptr %1, align 4 
# |             70:  %cl = load i32, ptr %2, align 4 
# | check:124'0                                     X error: no match found
# | check:124'1                                       with "ATTR1" equal to "#1"
# |             71:  br label %entry_after_outline.exitStub 
# | check:124'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# |             72:  
# | check:124'0     ~
# |             73: entry_after_outline.exitStub: ; preds = %entry_to_outline 
# | check:124'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# |             74:  ret void 
# | check:124'0     ~~~~~~~~~~
# |             75: } 
# | check:124'0     ~~
# |             76:  
# | check:124'0     ~
# |             77: attributes #0 = { "less-precise-fpmad"="true" "no-nans-fp-math"="true" "no-signed-zeros-fp-math"="true" } 
# | check:124'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# |             78: attributes #1 = { minsize optsize "less-precise-fpmad"="false" "no-nans-fp-math"="true" "no-signed-zeros-fp-math"="false" } 
# | check:124'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# | check:124'2     ?                                                                                                                            possible intended match
# |             79: attributes #2 = { minsize optsize "less-precise-fpmad"="true" "no-nans-fp-math"="true" "no-signed-zeros-fp-math"="true" } 
# | check:124'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# | >>>>>>
# `-----------------------------
# error: command failed with exit status: 1

--

```
</details>
<details>
<summary>LLVM.Transforms/Inline/attributes.ll</summary>

```
Exit Code: 1

Command Output (stdout):
--
# RUN: at line 1
/home/gha/actions-runner/_work/llvm-project/llvm-project/build/bin/opt < /home/gha/actions-runner/_work/llvm-project/llvm-project/llvm/test/Transforms/Inline/attributes.ll -passes=inline -S | /home/gha/actions-runner/_work/llvm-project/llvm-project/build/bin/FileCheck /home/gha/actions-runner/_work/llvm-project/llvm-project/llvm/test/Transforms/Inline/attributes.ll
# executed command: /home/gha/actions-runner/_work/llvm-project/llvm-project/build/bin/opt -passes=inline -S
# note: command had no output on stdout or stderr
# executed command: /home/gha/actions-runner/_work/llvm-project/llvm-project/build/bin/FileCheck /home/gha/actions-runner/_work/llvm-project/llvm-project/llvm/test/Transforms/Inline/attributes.ll
# .---command stderr------------
# | /home/gha/actions-runner/_work/llvm-project/llvm-project/llvm/test/Transforms/Inline/attributes.ll:512:10: error: CHECK: expected string not found in input
# | ; CHECK: @test_no-nans-fp-math2(i32 %i) [[NO_NANS_FPMATH_FALSE]] {
# |          ^
# | <stdin>:325:9: note: scanning from here
# |  ret i32 %i
# |         ^
# | <stdin>:325:9: note: with "NO_NANS_FPMATH_FALSE" equal to "#26"
# |  ret i32 %i
# |         ^
# | <stdin>:328:12: note: possible intended match here
# | define i32 @test_no-nans-fp-math2(i32 %i) #27 {
# |            ^
# | 
# | Input file: <stdin>
# | Check file: /home/gha/actions-runner/_work/llvm-project/llvm-project/llvm/test/Transforms/Inline/attributes.ll
# | 
# | -dump-input=help explains the following input dump.
# | 
# | Input was:
# | <<<<<<
# |              .
# |              .
# |              .
# |            320: define i32 @test_no-nans-fp-math0(i32 %i) #26 { 
# |            321:  ret i32 %i 
# |            322: } 
# |            323:  
# |            324: define i32 @test_no-nans-fp-math1(i32 %i) #26 { 
# |            325:  ret i32 %i 
# | check:512'0             X~~~ error: no match found
# | check:512'1                  with "NO_NANS_FPMATH_FALSE" equal to "#26"
# |            326: } 
# | check:512'0     ~~
# |            327:  
# | check:512'0     ~
# |            328: define i32 @test_no-nans-fp-math2(i32 %i) #27 { 
# | check:512'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# | check:512'2                ?                                     possible intended match
# |            329:  ret i32 %i 
# | check:512'0     ~~~~~~~~~~~~
# |            330: } 
# | check:512'0     ~~
# |            331:  
# | check:512'0     ~
# |            332: define i32 @test_no-nans-fp-math3(i32 %i) #27 { 
# | check:512'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# |            333:  ret i32 %i 
# | check:512'0     ~~~~~~~~~~~~
# |              .
# |              .
# |              .
# | >>>>>>
# `-----------------------------
# error: command failed with exit status: 1

--

```
</details>

### Clang
<details>
<summary>Clang.CodeGen/fp-function-attrs.cpp</summary>

```
Exit Code: 1

Command Output (stdout):
--
# RUN: at line 1
/home/gha/actions-runner/_work/llvm-project/llvm-project/build/bin/clang -cc1 -internal-isystem /home/gha/actions-runner/_work/llvm-project/llvm-project/build/lib/clang/23/include -nostdsysteminc -triple x86_64-linux-gnu -ffast-math -ffp-contract=fast -emit-llvm -o - /home/gha/actions-runner/_work/llvm-project/llvm-project/clang/test/CodeGen/fp-function-attrs.cpp | /home/gha/actions-runner/_work/llvm-project/llvm-project/build/bin/FileCheck /home/gha/actions-runner/_work/llvm-project/llvm-project/clang/test/CodeGen/fp-function-attrs.cpp
# executed command: /home/gha/actions-runner/_work/llvm-project/llvm-project/build/bin/clang -cc1 -internal-isystem /home/gha/actions-runner/_work/llvm-project/llvm-project/build/lib/clang/23/include -nostdsysteminc -triple x86_64-linux-gnu -ffast-math -ffp-contract=fast -emit-llvm -o - /home/gha/actions-runner/_work/llvm-project/llvm-project/clang/test/CodeGen/fp-function-attrs.cpp
# note: command had no output on stdout or stderr
# executed command: /home/gha/actions-runner/_work/llvm-project/llvm-project/build/bin/FileCheck /home/gha/actions-runner/_work/llvm-project/llvm-project/clang/test/CodeGen/fp-function-attrs.cpp
# .---command stderr------------
# | /home/gha/actions-runner/_work/llvm-project/llvm-project/clang/test/CodeGen/fp-function-attrs.cpp:56:11: error: CHECK: expected string not found in input
# | // CHECK: attributes [[FAST_ATTRS]] = { "no-signed-zeros-fp-math"="true"{{.*}} }
# |           ^
# | <stdin>:94:57: note: scanning from here
# |  %add = fadd reassoc nnan ninf nsz arcp afn float %3, %2
# |                                                         ^
# | <stdin>:94:57: note: with "FAST_ATTRS" equal to "#0"
# |  %add = fadd reassoc nnan ninf nsz arcp afn float %3, %2
# |                                                         ^
# | <stdin>:100:70: note: possible intended match here
# | attributes #0 = { mustprogress noinline nounwind optnone "min-legal-vector-width"="0" "no-signed-zeros-fp-math"="true" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-features"="+cx8,+mmx,+sse,+sse2,+x87" }
# |                                                                      ^
# | 
# | Input file: <stdin>
# | Check file: /home/gha/actions-runner/_work/llvm-project/llvm-project/clang/test/CodeGen/fp-function-attrs.cpp
# | 
# | -dump-input=help explains the following input dump.
# | 
# | Input was:
# | <<<<<<
# |             .
# |             .
# |             .
# |            89:  %1 = load float, ptr %b.addr, align 4 
# |            90:  %mul = fmul fast float %0, %1 
# |            91:  store float %mul, ptr %tmp, align 4 
# |            92:  %2 = load float, ptr %c.addr, align 4 
# |            93:  %3 = load float, ptr %tmp, align 4 
# |            94:  %add = fadd reassoc nnan ninf nsz arcp afn float %3, %2 
# | check:56'0                                                             X error: no match found
# | check:56'1                                                               with "FAST_ATTRS" equal to "#0"
# |            95:  store float %add, ptr %tmp, align 4 
# | check:56'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# |            96:  %4 = load float, ptr %tmp, align 4 
# | check:56'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# |            97:  ret float %4 
# | check:56'0     ~~~~~~~~~~~~~~
# |            98: } 
# | check:56'0     ~~
# |            99:  
# | check:56'0     ~
# |           100: attributes #0 = { mustprogress noinline nounwind optnone "min-legal-vector-width"="0" "no-signed-zeros-fp-math"="true" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-features"="+cx8,+mmx,+sse,+sse2,+x87" } 
# | check:56'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# | check:56'2                                                                          ?                                                                                                                                                              possible intended match
# |           101: attributes #1 = { mustprogress noinline nounwind optnone "min-legal-vector-width"="0" "no-signed-zeros-fp-math"="false" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-features"="+cx8,+mmx,+sse,+sse2,+x87" } 
# | check:56'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# |           102:  
# | check:56'0     ~
# |           103: !llvm.ident = !{!0} 
# | check:56'0     ~~~~~~~~~~~~~~~~~~~~
# |           104:  
# | check:56'0     ~
# |           105: !0 = !{!"clang version 23.0.0git (https://github.com/llvm/llvm-project ec3f31e75d3570fe7054eb0ac723bd1efd29a3fb)"} 
# | check:56'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/186285


More information about the cfe-commits mailing list