[llvm] [DAG] Add ISD::FSQRT handling to computeKnownFPClass (PR #213620)

via llvm-commits llvm-commits at lists.llvm.org
Mon Aug 3 05:41:11 PDT 2026


github-actions[bot] wrote:

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

* 179868 tests passed
* 3613 tests skipped
* 1 test failed

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

### LLVM
<details>
<summary>LLVM.CodeGen/AMDGPU/fsqrt.f32.ll</summary>

```
Exit Code: 1

Command Output (stdout):
--
# RUN: at line 2
/home/gha/actions-runner/_work/llvm-project/llvm-project/build/bin/llc -global-isel=0 -mtriple=amdgpu6.00 < /home/gha/actions-runner/_work/llvm-project/llvm-project/llvm/test/CodeGen/AMDGPU/fsqrt.f32.ll | /home/gha/actions-runner/_work/llvm-project/llvm-project/build/bin/FileCheck -check-prefixes=GCN,SDAG,GCN-IEEE,SDAG-IEEE /home/gha/actions-runner/_work/llvm-project/llvm-project/llvm/test/CodeGen/AMDGPU/fsqrt.f32.ll
# executed command: /home/gha/actions-runner/_work/llvm-project/llvm-project/build/bin/llc -global-isel=0 -mtriple=amdgpu6.00
# 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,SDAG,GCN-IEEE,SDAG-IEEE /home/gha/actions-runner/_work/llvm-project/llvm-project/llvm/test/CodeGen/AMDGPU/fsqrt.f32.ll
# .---command stderr------------
# | /home/gha/actions-runner/_work/llvm-project/llvm-project/llvm/test/CodeGen/AMDGPU/fsqrt.f32.ll:417:19: error: SDAG-IEEE-NEXT: expected string not found in input
# | ; SDAG-IEEE-NEXT: v_mov_b32_e32 v2, 0x260
# |                   ^
# | <stdin>:263:35: note: scanning from here
# |  v_cndmask_b32_e32 v1, v1, v2, vcc
# |                                   ^
# | <stdin>:264:2: note: possible intended match here
# |  v_mov_b32_e32 v2, 0x60
# |  ^
# | /home/gha/actions-runner/_work/llvm-project/llvm-project/llvm/test/CodeGen/AMDGPU/fsqrt.f32.ll:511:19: error: SDAG-IEEE-NEXT: expected string not found in input
# | ; SDAG-IEEE-NEXT: v_mov_b32_e32 v2, 0x260
# |                   ^
# | <stdin>:320:35: note: scanning from here
# |  v_cndmask_b32_e32 v1, v1, v2, vcc
# |                                   ^
# | <stdin>:321:2: note: possible intended match here
# |  v_mov_b32_e32 v2, 0x60
# |  ^
# | /home/gha/actions-runner/_work/llvm-project/llvm-project/llvm/test/CodeGen/AMDGPU/fsqrt.f32.ll:817:19: error: SDAG-IEEE-NEXT: expected string not found in input
# | ; SDAG-IEEE-NEXT: v_mov_b32_e32 v2, 0x260
# |                   ^
# | <stdin>:518:38: note: scanning from here
# |  v_cndmask_b32_e64 v1, v1, v2, s[0:1]
# |                                      ^
# | <stdin>:519:2: note: possible intended match here
# |  v_mov_b32_e32 v2, 0x60
# |  ^
# | /home/gha/actions-runner/_work/llvm-project/llvm-project/llvm/test/CodeGen/AMDGPU/fsqrt.f32.ll:1051:19: error: SDAG-IEEE-NEXT: expected string not found in input
# | ; SDAG-IEEE-NEXT: v_mov_b32_e32 v2, 0x260
# |                   ^
# | <stdin>:769:35: note: scanning from here
# |  v_cndmask_b32_e32 v1, v1, v2, vcc
# |                                   ^
# | <stdin>:770:2: note: possible intended match here
# |  v_mov_b32_e32 v2, 0x60
# |  ^
# | /home/gha/actions-runner/_work/llvm-project/llvm-project/llvm/test/CodeGen/AMDGPU/fsqrt.f32.ll:1145:19: error: SDAG-IEEE-NEXT: expected string not found in input
# | ; SDAG-IEEE-NEXT: v_mov_b32_e32 v2, 0x260
# |                   ^
# | <stdin>:826:35: note: scanning from here
# |  v_cndmask_b32_e32 v1, v1, v2, vcc
# |                                   ^
# | <stdin>:827:2: note: possible intended match here
# |  v_mov_b32_e32 v2, 0x60
# |  ^
# | /home/gha/actions-runner/_work/llvm-project/llvm-project/llvm/test/CodeGen/AMDGPU/fsqrt.f32.ll:3165:19: error: SDAG-IEEE-NEXT: expected string not found in input
# | ; SDAG-IEEE-NEXT: v_mov_b32_e32 v2, 0x260
# |                   ^
# | <stdin>:3094:35: note: scanning from here
# |  v_cndmask_b32_e32 v1, v1, v2, vcc
# |                                   ^
# | <stdin>:3095:2: note: possible intended match here
# |  v_mov_b32_e32 v2, 0x60
# |  ^
# | 
# | Input file: <stdin>
# | Check file: /home/gha/actions-runner/_work/llvm-project/llvm-project/llvm/test/CodeGen/AMDGPU/fsqrt.f32.ll
# | 
# | -dump-input=help explains the following input dump.
# | 
# | Input was:
# | <<<<<<
# |              .
# |              .
# |              .
# |            258:  v_add_i32_e64 v3, s[4:5], 1, v1 
# |            259:  v_fma_f32 v1, -v3, v1, v0 
# |            260:  v_cmp_lt_f32_e64 s[4:5], 0, v1 
# |            261:  v_cndmask_b32_e64 v1, v2, v3, s[4:5] 
# |            262:  v_mul_f32_e32 v2, 0x37800000, v1 
# |            263:  v_cndmask_b32_e32 v1, v1, v2, vcc 
# | next:417'0                                       {   search range start (exclusive)
# | next:417'1                                           error: no match found in search range
# |            264:  v_mov_b32_e32 v2, 0x60 
# | next:417'2       ?                        possible intended match
# |            265:  v_cmp_class_f32_e32 vcc, v0, v2 
# |            266:  v_cndmask_b32_e32 v0, v1, v0, vcc 
# |            267:  s_setpc_b64 s[30:31] 
# |            268: .Lfunc_end4: 
# |            269:  .size v_sqrt_f32_ninf, .Lfunc_end4-v_sqrt_f32_ninf 
# |              .
# |              .
# |              .
# |            298:  .long 0 
# |            299:  .text 
# |            300:  .globl v_sqrt_f32_no_infs_attribute ; -- Begin function v_sqrt_f32_no_infs_attribute 
# |            301:  .p2align 6 
# |            302:  .type v_sqrt_f32_no_infs_attribute, at function 
# |            303: v_sqrt_f32_no_infs_attribute: ; @v_sqrt_f32_no_infs_attribute 
# | next:417'3                                   }                                  search range end (exclusive)
# |            304: ; %bb.0: 
# |            305:  s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0) 
# |            306:  s_mov_b32 s4, 0xf800000 
# |            307:  v_mul_f32_e32 v1, 0x4f800000, v0 
# |            308:  v_cmp_gt_f32_e32 vcc, s4, v0 
# |              .
# |              .
# |              .
# |            315:  v_add_i32_e64 v3, s[4:5], 1, v1 
# |            316:  v_fma_f32 v1, -v3, v1, v0 
# |            317:  v_cmp_lt_f32_e64 s[4:5], 0, v1 
# |            318:  v_cndmask_b32_e64 v1, v2, v3, s[4:5] 
# |            319:  v_mul_f32_e32 v2, 0x37800000, v1 
# |            320:  v_cndmask_b32_e32 v1, v1, v2, vcc 
# | next:511'0                                       {   search range start (exclusive)
# | next:511'1                                           error: no match found in search range
# |            321:  v_mov_b32_e32 v2, 0x60 
# | next:511'2       ?                        possible intended match
# |            322:  v_cmp_class_f32_e32 vcc, v0, v2 
# |            323:  v_cndmask_b32_e32 v0, v1, v0, vcc 
# |            324:  s_setpc_b64 s[30:31] 
# |            325: .Lfunc_end5: 
# |            326:  .size v_sqrt_f32_no_infs_attribute, .Lfunc_end5-v_sqrt_f32_no_infs_attribute 
# |              .
# |              .
# |              .
# |            355:  .long 0 
# |            356:  .text 
# |            357:  .globl v_sqrt_f32_nnan ; -- Begin function v_sqrt_f32_nnan 
# |            358:  .p2align 6 
# |            359:  .type v_sqrt_f32_nnan, at function 
# |            360: v_sqrt_f32_nnan: ; @v_sqrt_f32_nnan 
# | next:511'3                      }                     search range end (exclusive)
# |            361: ; %bb.0: 
# |            362:  s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0) 
# |            363:  s_mov_b32 s4, 0xf800000 
# |            364:  v_mul_f32_e32 v1, 0x4f800000, v0 
# |            365:  v_cmp_gt_f32_e32 vcc, s4, v0 
# |              .
# |              .
# |              .
# |            513:  v_add_i32_e32 v3, vcc, 1, v1 
# |            514:  v_fma_f32 v1, -v3, v1, v0 
# |            515:  v_cmp_lt_f32_e32 vcc, 0, v1 
# |            516:  v_cndmask_b32_e32 v1, v2, v3, vcc 
# |            517:  v_mul_f32_e32 v2, 0x37800000, v1 
# |            518:  v_cndmask_b32_e64 v1, v1, v2, s[0:1] 
# | next:817'0                                          {   search range start (exclusive)
# | next:817'1                                              error: no match found in search range
# |            519:  v_mov_b32_e32 v2, 0x60 
# | next:817'2       ?                        possible intended match
# |            520:  v_cmp_class_f32_e32 vcc, v0, v2 
# |            521:  v_cndmask_b32_e32 v0, v1, v0, vcc 
# |            522:  v_readfirstlane_b32 s0, v0 
# |            523:  ; return to shader part epilog 
# |            524: .Lfunc_end8: 
# |              .
# |              .
# |              .
# |            574:  .long 0 
# |            575:  .text 
# |            576:  .globl s_sqrt_f32_afn ; -- Begin function s_sqrt_f32_afn 
# |            577:  .p2align 8 
# |            578:  .type s_sqrt_f32_afn, at function 
# |            579: s_sqrt_f32_afn: ; @s_sqrt_f32_afn 
# | next:817'3                     }                    search range end (exclusive)
# |            580: ; %bb.0: 
# |            581:  v_sqrt_f32_e32 v0, s0 
# |            582:  v_readfirstlane_b32 s0, v0 
# |            583:  ; return to shader part epilog 
# |            584: .Lfunc_end9: 
# |              .
# |              .
# |              .
# |            764:  v_add_i32_e64 v3, s[4:5], 1, v1 
# |            765:  v_fma_f32 v1, -v3, v1, v0 
# |            766:  v_cmp_lt_f32_e64 s[4:5], 0, v1 
# |            767:  v_cndmask_b32_e64 v1, v2, v3, s[4:5] 
# |            768:  v_mul_f32_e32 v2, 0x37800000, v1 
# |            769:  v_cndmask_b32_e32 v1, v1, v2, vcc 
# | next:1051'0                                      {   search range start (exclusive)
# | next:1051'1                                          error: no match found in search range
# |            770:  v_mov_b32_e32 v2, 0x60 
# | next:1051'2      ?                        possible intended match
# |            771:  v_cmp_class_f32_e32 vcc, v0, v2 
# |            772:  v_cndmask_b32_e32 v0, v1, v0, vcc 
# |            773:  s_setpc_b64 s[30:31] 
# |            774: .Lfunc_end12: 
# |            775:  .size v_sqrt_f32_nnan_ninf, .Lfunc_end12-v_sqrt_f32_nnan_ninf 
# |              .
# |              .
# |              .
# |            804:  .long 0 
# |            805:  .text 
# |            806:  .globl v_sqrt_f32_nnan_ninf_nsz ; -- Begin function v_sqrt_f32_nnan_ninf_nsz 
# |            807:  .p2align 6 
# |            808:  .type v_sqrt_f32_nnan_ninf_nsz, at function 
# |            809: v_sqrt_f32_nnan_ninf_nsz: ; @v_sqrt_f32_nnan_ninf_nsz 
# | next:1051'3                              }                              search range end (exclusive)
# |            810: ; %bb.0: 
# |            811:  s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0) 
# |            812:  s_mov_b32 s4, 0xf800000 
# |            813:  v_mul_f32_e32 v1, 0x4f800000, v0 
# |            814:  v_cmp_gt_f32_e32 vcc, s4, v0 
# |              .
# |              .
# |              .
# |            821:  v_add_i32_e64 v3, s[4:5], 1, v1 
# |            822:  v_fma_f32 v1, -v3, v1, v0 
# |            823:  v_cmp_lt_f32_e64 s[4:5], 0, v1 
# |            824:  v_cndmask_b32_e64 v1, v2, v3, s[4:5] 
# |            825:  v_mul_f32_e32 v2, 0x37800000, v1 
# |            826:  v_cndmask_b32_e32 v1, v1, v2, vcc 
# | next:1145'0                                      {   search range start (exclusive)
# | next:1145'1                                          error: no match found in search range
# |            827:  v_mov_b32_e32 v2, 0x60 
# | next:1145'2      ?                        possible intended match
# |            828:  v_cmp_class_f32_e32 vcc, v0, v2 
# |            829:  v_cndmask_b32_e32 v0, v1, v0, vcc 
# |            830:  s_setpc_b64 s[30:31] 
# |            831: .Lfunc_end13: 
# |            832:  .size v_sqrt_f32_nnan_ninf_nsz, .Lfunc_end13-v_sqrt_f32_nnan_ninf_nsz 
# |              .
# |              .
# |              .
# |            861:  .long 0 
# |            862:  .text 
# |            863:  .globl v_sqrt_f32_afn ; -- Begin function v_sqrt_f32_afn 
# |            864:  .p2align 6 
# |            865:  .type v_sqrt_f32_afn, at function 
# |            866: v_sqrt_f32_afn: ; @v_sqrt_f32_afn 
# | next:1145'3                    }                    search range end (exclusive)
# |            867: ; %bb.0: 
# |            868:  s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0) 
# |            869:  v_sqrt_f32_e32 v0, v0 
# |            870:  s_setpc_b64 s[30:31] 
# |            871: .Lfunc_end14: 
# |              .
# |              .
# |             
# | ...
# `---data was truncated (10240/11849) (change limit with -D output_limit=N)
# 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/213620


More information about the llvm-commits mailing list