[llvm] [InstCombine] Simplify `floor`/`ceil` to `trunc` for integral tests (PR #190620)
via llvm-commits
llvm-commits at lists.llvm.org
Mon Apr 6 17:10:16 PDT 2026
github-actions[bot] wrote:
<!--PREMERGE ADVISOR COMMENT: Windows-->
# :window: Windows x64 Test Results
* 133096 tests passed
* 3066 tests skipped
* 1 test failed
## Failed Tests
(click on a test name to see its output)
### LLVM
<details>
<summary>LLVM.Transforms/InstCombine/fp-floor-ceil.ll</summary>
```
Exit Code: 1
Command Output (stdout):
--
# RUN: at line 2
c:\_work\llvm-project\llvm-project\build\bin\opt.exe < C:\_work\llvm-project\llvm-project\llvm\test\Transforms\InstCombine\fp-floor-ceil.ll -passes=instcombine -S | c:\_work\llvm-project\llvm-project\build\bin\filecheck.exe C:\_work\llvm-project\llvm-project\llvm\test\Transforms\InstCombine\fp-floor-ceil.ll
# executed command: 'c:\_work\llvm-project\llvm-project\build\bin\opt.exe' -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\fp-floor-ceil.ll'
# .---command stderr------------
# | C:\_work\llvm-project\llvm-project\llvm\test\Transforms\InstCombine\fp-floor-ceil.ll:113:15: error: CHECK-NEXT: expected string not found in input
# | ; CHECK-NEXT: [[FLOOR:%.*]] = call float @llvm.floor.f32(float [[X:%.*]])
# | ^
# | <stdin>:56:28: note: scanning from here
# | define i1 @x_floor_ueq_neg(float %x) {
# | ^
# | <stdin>:57:2: note: possible intended match here
# | %1 = call float @llvm.trunc.f32(float %x)
# | ^
# | C:\_work\llvm-project\llvm-project\llvm\test\Transforms\InstCombine\fp-floor-ceil.ll:124:15: error: CHECK-NEXT: expected string not found in input
# | ; CHECK-NEXT: [[FLOOR:%.*]] = call float @llvm.floor.f32(float [[X:%.*]])
# | ^
# | <stdin>:62:28: note: scanning from here
# | define i1 @x_floor_une_neg(float %x) {
# | ^
# | <stdin>:63:2: note: possible intended match here
# | %1 = call float @llvm.trunc.f32(float %x)
# | ^
# | C:\_work\llvm-project\llvm-project\llvm\test\Transforms\InstCombine\fp-floor-ceil.ll:242:15: error: CHECK-NEXT: expected string not found in input
# | ; CHECK-NEXT: [[CEIL:%.*]] = call float @llvm.ceil.f32(float [[X:%.*]])
# | ^
# | <stdin>:120:27: note: scanning from here
# | define i1 @x_ceil_oeq_neg(float %x) {
# | ^
# | <stdin>:121:2: note: possible intended match here
# | %1 = call float @llvm.trunc.f32(float %x)
# | ^
# | C:\_work\llvm-project\llvm-project\llvm\test\Transforms\InstCombine\fp-floor-ceil.ll:253:15: error: CHECK-NEXT: expected string not found in input
# | ; CHECK-NEXT: [[CEIL:%.*]] = call float @llvm.ceil.f32(float [[X:%.*]])
# | ^
# | <stdin>:126:27: note: scanning from here
# | define i1 @x_ceil_one_neg(float %x) {
# | ^
# | <stdin>:127:2: note: possible intended match here
# | %1 = call float @llvm.trunc.f32(float %x)
# | ^
# |
# | Input file: <stdin>
# | Check file: C:\_work\llvm-project\llvm-project\llvm\test\Transforms\InstCombine\fp-floor-ceil.ll
# |
# | -dump-input=help explains the following input dump.
# |
# | Input was:
# | <<<<<<
# | .
# | .
# | .
# | 51: %floor = call float @llvm.floor.f32(float %x)
# | 52: %ret = fcmp ogt float %x, %floor
# | 53: ret i1 %ret
# | 54: }
# | 55:
# | 56: define i1 @x_floor_ueq_neg(float %x) {
# | next:113'0 X~~~~~~~~~~~ error: no match found
# | 57: %1 = call float @llvm.trunc.f32(float %x)
# | next:113'0 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# | next:113'1 ? possible intended match
# | 58: %ret = fcmp ueq float %1, %x
# | next:113'0 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# | 59: ret i1 %ret
# | next:113'0 ~~~~~~~~~~~~~
# | 60: }
# | next:113'0 ~~
# | 61:
# | next:113'0 ~
# | 62: define i1 @x_floor_une_neg(float %x) {
# | next:113'0 ~~~~~~~~~~~~~~~~~~~~~~~~~~~
# | next:124'0 X~~~~~~~~~~~ error: no match found
# | 63: %1 = call float @llvm.trunc.f32(float %x)
# | next:124'0 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# | next:124'1 ? possible intended match
# | 64: %ret = fcmp une float %1, %x
# | next:124'0 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# | 65: ret i1 %ret
# | next:124'0 ~~~~~~~~~~~~~
# | 66: }
# | next:124'0 ~~
# | 67:
# | next:124'0 ~
# | 68: define i1 @ceil_x_oge(float %x) {
# | next:124'0 ~~~~~~~~~~~~~~~~~~~~~~
# | .
# | .
# | .
# | 115: %ceil = call float @llvm.ceil.f32(float %x)
# | 116: %ret = fcmp olt float %x, %ceil
# | 117: ret i1 %ret
# | 118: }
# | 119:
# | 120: define i1 @x_ceil_oeq_neg(float %x) {
# | next:242'0 X~~~~~~~~~~~ error: no match found
# | 121: %1 = call float @llvm.trunc.f32(float %x)
# | next:242'0 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# | next:242'1 ? possible intended match
# | 122: %ret = fcmp oeq float %1, %x
# | next:242'0 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# | 123: ret i1 %ret
# | next:242'0 ~~~~~~~~~~~~~
# | 124: }
# | next:242'0 ~~
# | 125:
# | next:242'0 ~
# | 126: define i1 @x_ceil_one_neg(float %x) {
# | next:242'0 ~~~~~~~~~~~~~~~~~~~~~~~~~~
# | next:253'0 X~~~~~~~~~~~ error: no match found
# | 127: %1 = call float @llvm.trunc.f32(float %x)
# | next:253'0 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# | next:253'1 ? possible intended match
# | 128: %ret = fcmp one float %1, %x
# | next:253'0 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# | 129: ret i1 %ret
# | next:253'0 ~~~~~~~~~~~~~
# | 130: }
# | next:253'0 ~~
# | 131:
# | next:253'0 ~
# | 132: ; Function Attrs: nocallback nocreateundeforpoison nofree nosync nounwind speculatable willreturn memory(none)
# | next:253'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/190620
More information about the llvm-commits
mailing list