[llvm] [ConstantFolding] Add edge cases for llvm.log{, 2, 10} (PR #173304)

via llvm-commits llvm-commits at lists.llvm.org
Mon Dec 22 12:45:50 PST 2025


github-actions[bot] wrote:

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

* 167397 tests passed
* 2968 tests skipped
* 3 tests failed

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

### LLVM
<details>
<summary>LLVM.CodeGen/AMDGPU/llvm.log.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=amdgcn -mcpu=tahiti < /home/gha/actions-runner/_work/llvm-project/llvm-project/llvm/test/CodeGen/AMDGPU/llvm.log.ll | /home/gha/actions-runner/_work/llvm-project/llvm-project/build/bin/FileCheck -check-prefixes=GFX689,SI,GFX689-SDAG,SI-SDAG /home/gha/actions-runner/_work/llvm-project/llvm-project/llvm/test/CodeGen/AMDGPU/llvm.log.ll
# executed command: /home/gha/actions-runner/_work/llvm-project/llvm-project/build/bin/llc -global-isel=0 -mtriple=amdgcn -mcpu=tahiti
# 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=GFX689,SI,GFX689-SDAG,SI-SDAG /home/gha/actions-runner/_work/llvm-project/llvm-project/llvm/test/CodeGen/AMDGPU/llvm.log.ll
# .---command stderr------------
# | /home/gha/actions-runner/_work/llvm-project/llvm-project/llvm/test/CodeGen/AMDGPU/llvm.log.ll:5692:17: error: SI-SDAG-NEXT: expected string not found in input
# | ; SI-SDAG-NEXT: v_log_f32_e32 v0, 0
# |                 ^
# | <stdin>:1614:41: note: scanning from here
# |  s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0)
# |                                         ^
# | <stdin>:1615:2: note: possible intended match here
# |  v_mov_b32_e32 v0, 0xff800000
# |  ^
# | 
# | Input file: <stdin>
# | Check file: /home/gha/actions-runner/_work/llvm-project/llvm-project/llvm/test/CodeGen/AMDGPU/llvm.log.ll
# | 
# | -dump-input=help explains the following input dump.
# | 
# | Input was:
# | <<<<<<
# |              .
# |              .
# |              .
# |           1609:  .globl v_log_f32_0 ; -- Begin function v_log_f32_0 
# |           1610:  .p2align 2 
# |           1611:  .type v_log_f32_0, at function 
# |           1612: v_log_f32_0: ; @v_log_f32_0 
# |           1613: ; %bb.0: 
# |           1614:  s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0) 
# | next:5692'0                                             X error: no match found
# |           1615:  v_mov_b32_e32 v0, 0xff800000 
# | next:5692'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# | next:5692'1      ?                             possible intended match
# |           1616:  s_setpc_b64 s[30:31] 
# | next:5692'0     ~~~~~~~~~~~~~~~~~~~~~~
# |           1617: .Lfunc_end27: 
# | next:5692'0     ~~~~~~~~~~~~~~
# |           1618:  .size v_log_f32_0, .Lfunc_end27-v_log_f32_0 
# | next:5692'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# |           1619:  ; -- End function 
# | next:5692'0     ~~~~~~~~~~~~~~~~~~~
# |           1620:  .set v_log_f32_0.num_vgpr, 1 
# | next:5692'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# |              .
# |              .
# |              .
# | >>>>>>
# `-----------------------------
# error: command failed with exit status: 1

--

```
</details>
<details>
<summary>LLVM.CodeGen/AMDGPU/llvm.log10.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=amdgcn -mcpu=tahiti < /home/gha/actions-runner/_work/llvm-project/llvm-project/llvm/test/CodeGen/AMDGPU/llvm.log10.ll | /home/gha/actions-runner/_work/llvm-project/llvm-project/build/bin/FileCheck -check-prefixes=GFX689,SI,GFX689-SDAG,SI-SDAG /home/gha/actions-runner/_work/llvm-project/llvm-project/llvm/test/CodeGen/AMDGPU/llvm.log10.ll
# executed command: /home/gha/actions-runner/_work/llvm-project/llvm-project/build/bin/llc -global-isel=0 -mtriple=amdgcn -mcpu=tahiti
# 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=GFX689,SI,GFX689-SDAG,SI-SDAG /home/gha/actions-runner/_work/llvm-project/llvm-project/llvm/test/CodeGen/AMDGPU/llvm.log10.ll
# .---command stderr------------
# | /home/gha/actions-runner/_work/llvm-project/llvm-project/llvm/test/CodeGen/AMDGPU/llvm.log10.ll:5692:17: error: SI-SDAG-NEXT: expected string not found in input
# | ; SI-SDAG-NEXT: v_log_f32_e32 v0, 0
# |                 ^
# | <stdin>:1614:41: note: scanning from here
# |  s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0)
# |                                         ^
# | <stdin>:1615:2: note: possible intended match here
# |  v_mov_b32_e32 v0, 0xff800000
# |  ^
# | 
# | Input file: <stdin>
# | Check file: /home/gha/actions-runner/_work/llvm-project/llvm-project/llvm/test/CodeGen/AMDGPU/llvm.log10.ll
# | 
# | -dump-input=help explains the following input dump.
# | 
# | Input was:
# | <<<<<<
# |              .
# |              .
# |              .
# |           1609:  .globl v_log10_f32_0 ; -- Begin function v_log10_f32_0 
# |           1610:  .p2align 2 
# |           1611:  .type v_log10_f32_0, at function 
# |           1612: v_log10_f32_0: ; @v_log10_f32_0 
# |           1613: ; %bb.0: 
# |           1614:  s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0) 
# | next:5692'0                                             X error: no match found
# |           1615:  v_mov_b32_e32 v0, 0xff800000 
# | next:5692'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# | next:5692'1      ?                             possible intended match
# |           1616:  s_setpc_b64 s[30:31] 
# | next:5692'0     ~~~~~~~~~~~~~~~~~~~~~~
# |           1617: .Lfunc_end27: 
# | next:5692'0     ~~~~~~~~~~~~~~
# |           1618:  .size v_log10_f32_0, .Lfunc_end27-v_log10_f32_0 
# | next:5692'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# |           1619:  ; -- End function 
# | next:5692'0     ~~~~~~~~~~~~~~~~~~~
# |           1620:  .set v_log10_f32_0.num_vgpr, 1 
# | next:5692'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# |              .
# |              .
# |              .
# | >>>>>>
# `-----------------------------
# error: command failed with exit status: 1

--

```
</details>
<details>
<summary>LLVM.CodeGen/AMDGPU/llvm.log2.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=amdgcn -mcpu=tahiti < /home/gha/actions-runner/_work/llvm-project/llvm-project/llvm/test/CodeGen/AMDGPU/llvm.log2.ll | /home/gha/actions-runner/_work/llvm-project/llvm-project/build/bin/FileCheck -check-prefixes=GFX689,SI,GFX689-SDAG,SI-SDAG /home/gha/actions-runner/_work/llvm-project/llvm-project/llvm/test/CodeGen/AMDGPU/llvm.log2.ll
# executed command: /home/gha/actions-runner/_work/llvm-project/llvm-project/build/bin/llc -global-isel=0 -mtriple=amdgcn -mcpu=tahiti
# 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=GFX689,SI,GFX689-SDAG,SI-SDAG /home/gha/actions-runner/_work/llvm-project/llvm-project/llvm/test/CodeGen/AMDGPU/llvm.log2.ll
# .---command stderr------------
# | /home/gha/actions-runner/_work/llvm-project/llvm-project/llvm/test/CodeGen/AMDGPU/llvm.log2.ll:3447:21: error: GFX689-SDAG-NEXT: expected string not found in input
# | ; GFX689-SDAG-NEXT: v_log_f32_e32 v0, 0
# |                     ^
# | <stdin>:1377:41: note: scanning from here
# |  s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0)
# |                                         ^
# | <stdin>:1378:2: note: possible intended match here
# |  v_mov_b32_e32 v0, 0xff800000
# |  ^
# | 
# | Input file: <stdin>
# | Check file: /home/gha/actions-runner/_work/llvm-project/llvm-project/llvm/test/CodeGen/AMDGPU/llvm.log2.ll
# | 
# | -dump-input=help explains the following input dump.
# | 
# | Input was:
# | <<<<<<
# |              .
# |              .
# |              .
# |           1372:  .globl v_log2_f32_0 ; -- Begin function v_log2_f32_0 
# |           1373:  .p2align 2 
# |           1374:  .type v_log2_f32_0, at function 
# |           1375: v_log2_f32_0: ; @v_log2_f32_0 
# |           1376: ; %bb.0: 
# |           1377:  s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0) 
# | next:3447'0                                             X error: no match found
# |           1378:  v_mov_b32_e32 v0, 0xff800000 
# | next:3447'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# | next:3447'1      ?                             possible intended match
# |           1379:  s_setpc_b64 s[30:31] 
# | next:3447'0     ~~~~~~~~~~~~~~~~~~~~~~
# |           1380: .Lfunc_end27: 
# | next:3447'0     ~~~~~~~~~~~~~~
# |           1381:  .size v_log2_f32_0, .Lfunc_end27-v_log2_f32_0 
# | next:3447'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# |           1382:  ; -- End function 
# | next:3447'0     ~~~~~~~~~~~~~~~~~~~
# |           1383:  .set v_log2_f32_0.num_vgpr, 1 
# | next:3447'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/173304


More information about the llvm-commits mailing list