[llvm-branch-commits] [llvm] InstCombine: Infer fast math flags for sqrt (PR #176003)

via llvm-branch-commits llvm-branch-commits at lists.llvm.org
Thu Jan 15 11:31:50 PST 2026


github-actions[bot] wrote:

<!--PREMERGE ADVISOR COMMENT: Windows-->
# :window: Windows x64 Test Results

* 129520 tests passed
* 2866 tests skipped
* 2 tests failed

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

### LLVM
<details>
<summary>LLVM.CodeGen/PowerPC/peephole-mma-phi-liveness.ll</summary>

```
Exit Code: 1

Command Output (stdout):
--
# RUN: at line 2
c:\_work\llvm-project\llvm-project\build\bin\llc.exe -verify-machineinstrs -mcpu=ppc -mtriple=powerpc64-ibm-aix < C:\_work\llvm-project\llvm-project\llvm\test\CodeGen\PowerPC\peephole-mma-phi-liveness.ll | c:\_work\llvm-project\llvm-project\build\bin\filecheck.exe C:\_work\llvm-project\llvm-project\llvm\test\CodeGen\PowerPC\peephole-mma-phi-liveness.ll
# executed command: 'c:\_work\llvm-project\llvm-project\build\bin\llc.exe' -verify-machineinstrs -mcpu=ppc -mtriple=powerpc64-ibm-aix
# 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\llvm\test\CodeGen\PowerPC\peephole-mma-phi-liveness.ll'
# .---command stderr------------
# | C:\_work\llvm-project\llvm-project\llvm\test\CodeGen\PowerPC\peephole-mma-phi-liveness.ll:22:15: error: CHECK-NEXT: is not on the line after the previous match
# | ; CHECK-NEXT: stxv 2, 0(3)
# |               ^
# | <stdin>:28:2: note: 'next' match was here
# |  stxv 2, 0(3)
# |  ^
# | <stdin>:25:19: note: previous match ended here
# |  xvmaddadp 0, 1, 1
# |                   ^
# | <stdin>:26:1: note: non-matching line after previous match is here
# |  xvadddp 2, 2, 1
# | ^
# | 
# | Input file: <stdin>
# | Check file: C:\_work\llvm-project\llvm-project\llvm\test\CodeGen\PowerPC\peephole-mma-phi-liveness.ll
# | 
# | -dump-input=help explains the following input dump.
# | 
# | Input was:
# | <<<<<<
# |          .
# |          .
# |          .
# |         23:  xvmuldp 0, 0, 1 
# |         24:  xvmaddadp 2, 1, 1 
# |         25:  xvmaddadp 0, 1, 1 
# |         26:  xvadddp 2, 2, 1 
# |         27:  xvadddp 0, 0, 1 
# |         28:  stxv 2, 0(3) 
# | next:22      !~~~~~~~~~~~  error: match on wrong line
# |         29:  stxv 0, 0(3) 
# |         30:  # implicit-def: $acc0 
# |         31:  bc 12, 20, L..BB0_2 
# |         32: # %bb.1: # %bb10 
# |         33:  xvf64gerpp 0, 34, 0 
# |          .
# |          .
# |          .
# | >>>>>>
# `-----------------------------
# error: command failed with exit status: 1

--

```
</details>
<details>
<summary>LLVM.Transforms/InstCombine/fabs.ll</summary>

```
Exit Code: 1

Command Output (stdout):
--
# RUN: at line 2
c:\_work\llvm-project\llvm-project\build\bin\opt.exe -mtriple=x86_64-unknown-linux-gnu < C:\_work\llvm-project\llvm-project\llvm\test\Transforms\InstCombine\fabs.ll -passes=instcombine -S | c:\_work\llvm-project\llvm-project\build\bin\filecheck.exe C:\_work\llvm-project\llvm-project\llvm\test\Transforms\InstCombine\fabs.ll
# executed command: 'c:\_work\llvm-project\llvm-project\build\bin\opt.exe' -mtriple=x86_64-unknown-linux-gnu -passes=instcombine -S
# 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\llvm\test\Transforms\InstCombine\fabs.ll'
# .---command stderr------------
# | C:\_work\llvm-project\llvm-project\llvm\test\Transforms\InstCombine\fabs.ll:210:15: error: CHECK-NEXT: expected string not found in input
# | ; CHECK-NEXT: ret float [[FMA]]
# |               ^
# | <stdin>:125:78: note: scanning from here
# |  %fma = call nnan float @llvm.fma.f32(float %x, float %x, float 1.000000e+00)
# |                                                                              ^
# | <stdin>:125:78: note: with "FMA" equal to "%fma"
# |  %fma = call nnan float @llvm.fma.f32(float %x, float %x, float 1.000000e+00)
# |                                                                              ^
# | <stdin>:127:2: note: possible intended match here
# |  ret float %fabsf
# |  ^
# | C:\_work\llvm-project\llvm-project\llvm\test\Transforms\InstCombine\fabs.ll:231:15: error: CHECK-NEXT: expected string not found in input
# | ; CHECK-NEXT: ret float [[FMULADD]]
# |               ^
# | <stdin>:137:86: note: scanning from here
# |  %fmuladd = call nnan float @llvm.fmuladd.f32(float %x, float %x, float 1.000000e+00)
# |                                                                                      ^
# | <stdin>:137:86: note: with "FMULADD" equal to "%fmuladd"
# |  %fmuladd = call nnan float @llvm.fmuladd.f32(float %x, float %x, float 1.000000e+00)
# |                                                                                      ^
# | <stdin>:139:2: note: possible intended match here
# |  ret float %fabsf
# |  ^
# | 
# | Input file: <stdin>
# | Check file: C:\_work\llvm-project\llvm-project\llvm\test\Transforms\InstCombine\fabs.ll
# | 
# | -dump-input=help explains the following input dump.
# | 
# | Input was:
# | <<<<<<
# |             .
# |             .
# |             .
# |           120:  %fabsf = call float @llvm.fabs.f32(float %fma) 
# |           121:  ret float %fabsf 
# |           122: } 
# |           123:  
# |           124: define float @square_nnan_fma_fabs_intrinsic_f32(float noundef %x) { 
# |           125:  %fma = call nnan float @llvm.fma.f32(float %x, float %x, float 1.000000e+00) 
# | next:210'0                                                                                  X error: no match found
# | next:210'1                                                                                    with "FMA" equal to "%fma"
# |           126:  %fabsf = call float @llvm.fabs.f32(float %fma) 
# | next:210'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# |           127:  ret float %fabsf 
# | next:210'0     ~~~~~~~~~~~~~~~~~~
# | next:210'2      ?                 possible intended match
# |           128: } 
# | next:210'0     ~~
# |           129:  
# | next:210'0     ~
# |           130: define float @square_fmuladd_fabs_intrinsic_f32(float noundef %x) { 
# | next:210'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# |           131:  %fmuladd = call float @llvm.fmuladd.f32(float %x, float %x, float 1.000000e+00) 
# |           132:  %fabsf = call float @llvm.fabs.f32(float %fmuladd) 
# |           133:  ret float %fabsf 
# |           134: } 
# |           135:  
# |           136: define float @square_nnan_fmuladd_fabs_intrinsic_f32(float noundef %x) { 
# |           137:  %fmuladd = call nnan float @llvm.fmuladd.f32(float %x, float %x, float 1.000000e+00) 
# | next:231'0                                                                                          X error: no match found
# | next:231'1                                                                                            with "FMULADD" equal to "%fmuladd"
# |           138:  %fabsf = call float @llvm.fabs.f32(float %fmuladd) 
# | next:231'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# |           139:  ret float %fabsf 
# | next:231'0     ~~~~~~~~~~~~~~~~~~
# | next:231'2      ?                 possible intended match
# |           140: } 
# | next:231'0     ~~
# |           141:  
# | next:231'0     ~
# |           142: define double @multi_use_fabs_fpext(float %x) { 
# | next:231'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# |           143:  %fpext = fpext float %x to double 
# |           144:  %fabs = call double @llvm.fabs.f64(double %fpext) 
# |             .
# |             .
# |             .
# | >>>>>>
# `-----------------------------
# 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/176003


More information about the llvm-branch-commits mailing list