[llvm] ValueTracking: Teach computeKnownFPClass to look at bitcast + integer max (PR #184073)

via llvm-commits llvm-commits at lists.llvm.org
Mon Mar 2 00:50:19 PST 2026


github-actions[bot] wrote:

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

* 131533 tests passed
* 2956 tests skipped
* 1 test failed

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

### LLVM
<details>
<summary>LLVM.Transforms/Attributor/nofpclass.ll</summary>

```
Exit Code: 1

Command Output (stdout):
--
# RUN: at line 2
c:\_work\llvm-project\llvm-project\build\bin\opt.exe -aa-pipeline=basic-aa -passes=attributor -attributor-manifest-internal -attributor-annotate-decl-cs -use-constant-fp-for-scalable-splat=false -S < C:\_work\llvm-project\llvm-project\llvm\test\Transforms\Attributor\nofpclass.ll | c:\_work\llvm-project\llvm-project\build\bin\filecheck.exe --allow-unused-prefixes C:\_work\llvm-project\llvm-project\llvm\test\Transforms\Attributor\nofpclass.ll --check-prefixes=CHECK,CHECK-CV,TUNIT,TUNIT-CV
# executed command: 'c:\_work\llvm-project\llvm-project\build\bin\opt.exe' -aa-pipeline=basic-aa -passes=attributor -attributor-manifest-internal -attributor-annotate-decl-cs -use-constant-fp-for-scalable-splat=false -S
# note: command had no output on stdout or stderr
# executed command: 'c:\_work\llvm-project\llvm-project\build\bin\filecheck.exe' --allow-unused-prefixes 'C:\_work\llvm-project\llvm-project\llvm\test\Transforms\Attributor\nofpclass.ll' --check-prefixes=CHECK,CHECK-CV,TUNIT,TUNIT-CV
# .---command stderr------------
# | C:\_work\llvm-project\llvm-project\llvm\test\Transforms\Attributor\nofpclass.ll:2922:16: error: CHECK-LABEL: expected string not found in input
# | ; CHECK-LABEL: define nofpclass(nan inf nzero nsub nnorm) <2 x float> @bitcast_to_float_vect_nnan
# |                ^
# | <stdin>:1428:82: note: scanning from here
# | define nofpclass(ninf nzero nsub nnorm) <2 x float> @bitcast_to_float_vect_sign_0(<2 x i32> %arg) #3 {
# |                                                                                  ^
# | <stdin>:1435:1: note: possible intended match here
# | define nofpclass(ninf nzero nsub nnorm) <2 x float> @bitcast_to_float_vect_nnan(<2 x i32> %arg) #3 {
# | ^
# | 
# | Input file: <stdin>
# | Check file: C:\_work\llvm-project\llvm-project\llvm\test\Transforms\Attributor\nofpclass.ll
# | 
# | -dump-input=help explains the following input dump.
# | 
# | Input was:
# | <<<<<<
# |               .
# |               .
# |               .
# |            1423:  %cast = bitcast i64 %or to double 
# |            1424:  ret double %cast 
# |            1425: } 
# |            1426:  
# |            1427: ; Function Attrs: mustprogress nofree norecurse nosync nounwind willreturn memory(none) 
# |            1428: define nofpclass(ninf nzero nsub nnorm) <2 x float> @bitcast_to_float_vect_sign_0(<2 x i32> %arg) #3 { 
# | label:2922'0                                                                                      X~~~~~~~~~~~~~~~~~~~~~ error: no match found
# |            1429:  %shr = lshr <2 x i32> %arg, <i32 1, i32 2> 
# | label:2922'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# |            1430:  %cast = bitcast <2 x i32> %shr to <2 x float> 
# | label:2922'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# |            1431:  ret <2 x float> %cast 
# | label:2922'0     ~~~~~~~~~~~~~~~~~~~~~~~
# |            1432: } 
# | label:2922'0     ~~
# |            1433:  
# | label:2922'0     ~
# |            1434: ; Function Attrs: mustprogress nofree norecurse nosync nounwind willreturn memory(none) 
# | label:2922'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# |            1435: define nofpclass(ninf nzero nsub nnorm) <2 x float> @bitcast_to_float_vect_nnan(<2 x i32> %arg) #3 { 
# | label:2922'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# | label:2922'1     ?                                                                                                     possible intended match
# |            1436:  %shr = lshr <2 x i32> %arg, splat (i32 4) 
# | label:2922'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# |            1437:  %cast = bitcast <2 x i32> %shr to <2 x float> 
# | label:2922'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# |            1438:  ret <2 x float> %cast 
# | label:2922'0     ~~~~~~~~~~~~~~~~~~~~~~~
# |            1439: } 
# | label:2922'0     ~~
# |            1440:  
# | label:2922'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/184073


More information about the llvm-commits mailing list