[llvm] [VectorCombine] Fold vector sign-bit checks (PR #175194)

via llvm-commits llvm-commits at lists.llvm.org
Thu Jan 22 09:47:09 PST 2026


github-actions[bot] wrote:

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

* 130088 tests passed
* 2879 tests skipped
* 1 test failed

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

### LLVM
<details>
<summary>LLVM.CodeGen/AMDGPU/GlobalISel/mul.ll</summary>

```
Exit Code: 1

Command Output (stdout):
--
# RUN: at line 2
c:\_work\llvm-project\llvm-project\build\bin\llc.exe -global-isel -new-reg-bank-select -mtriple=amdgcn -mcpu=gfx700 < C:\_work\llvm-project\llvm-project\llvm\test\CodeGen\AMDGPU\GlobalISel\mul.ll | c:\_work\llvm-project\llvm-project\build\bin\filecheck.exe -check-prefixes=GCN,GFX7 C:\_work\llvm-project\llvm-project\llvm\test\CodeGen\AMDGPU\GlobalISel\mul.ll
# executed command: 'c:\_work\llvm-project\llvm-project\build\bin\llc.exe' -global-isel -new-reg-bank-select -mtriple=amdgcn -mcpu=gfx700
# note: command had no output on stdout or stderr
# executed command: 'c:\_work\llvm-project\llvm-project\build\bin\filecheck.exe' -check-prefixes=GCN,GFX7 'C:\_work\llvm-project\llvm-project\llvm\test\CodeGen\AMDGPU\GlobalISel\mul.ll'
# .---command stderr------------
# | C:\_work\llvm-project\llvm-project\llvm\test\CodeGen\AMDGPU\GlobalISel\mul.ll:364:14: error: GFX7-NEXT: expected string not found in input
# | ; GFX7-NEXT: s_mul_i32 s0, s0, s2
# |              ^
# | <stdin>:425:9: note: scanning from here
# | ; %bb.0:
# |         ^
# | <stdin>:428:2: note: possible intended match here
# |  s_mul_i32 s0, s0, s1
# |  ^
# | C:\_work\llvm-project\llvm-project\llvm\test\CodeGen\AMDGPU\GlobalISel\mul.ll:439:14: error: GFX7-NEXT: is not on the line after the previous match
# | ; GFX7-NEXT: v_and_b32_e32 v0, 0xffff, v0
# |              ^
# | <stdin>:493:2: note: 'next' match was here
# |  v_and_b32_e32 v0, 0xffff, v0
# |  ^
# | <stdin>:490:41: note: previous match ended here
# |  s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0)
# |                                         ^
# | <stdin>:491:1: note: non-matching line after previous match is here
# |  v_lshrrev_b32_e32 v2, 16, v0
# | ^
# | 
# | Input file: <stdin>
# | Check file: C:\_work\llvm-project\llvm-project\llvm\test\CodeGen\AMDGPU\GlobalISel\mul.ll
# | 
# | -dump-input=help explains the following input dump.
# | 
# | Input was:
# | <<<<<<
# |             .
# |             .
# |             .
# |           420:  .text 
# |           421:  .globl s_mul_v2i16 ; -- Begin function s_mul_v2i16 
# |           422:  .p2align 8 
# |           423:  .type s_mul_v2i16, at function 
# |           424: s_mul_v2i16: ; @s_mul_v2i16 
# |           425: ; %bb.0: 
# | next:364'0             X error: no match found
# |           426:  s_lshr_b32 s2, s0, 16 
# | next:364'0     ~~~~~~~~~~~~~~~~~~~~~~~
# |           427:  s_lshr_b32 s3, s1, 16 
# | next:364'0     ~~~~~~~~~~~~~~~~~~~~~~~
# |           428:  s_mul_i32 s0, s0, s1 
# | next:364'0     ~~~~~~~~~~~~~~~~~~~~~~
# | next:364'1      ?                     possible intended match
# |           429:  s_mul_i32 s1, s2, s3 
# | next:364'0     ~~~~~~~~~~~~~~~~~~~~~~
# |           430:  s_add_i32 s1, s1, s1 
# | next:364'0     ~~~~~~~~~~~~~~~~~~~~~~
# |           431:  s_add_i32 s0, s0, s0 
# | next:364'0     ~~~~~~~~~~~~~~~~~~~~~~
# |           432:  s_and_b32 s1, s1, 0xffff 
# | next:364'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~
# |           433:  s_and_b32 s0, s0, 0xffff 
# | next:364'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~
# |             .
# |             .
# |             .
# |           488: v_mul_v2i16: ; @v_mul_v2i16 
# | next:364'0     ~~~~~~~~~~~~
# |           489: ; %bb.0: 
# |           490:  s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0) 
# |           491:  v_lshrrev_b32_e32 v2, 16, v0 
# |           492:  v_lshrrev_b32_e32 v3, 16, v1 
# |           493:  v_and_b32_e32 v0, 0xffff, v0 
# | next:439        !~~~~~~~~~~~~~~~~~~~~~~~~~~~  error: match on wrong line
# |           494:  v_and_b32_e32 v1, 0xffff, v1 
# |           495:  v_mul_u32_u24_e32 v0, v0, v1 
# |           496:  v_mul_u32_u24_e32 v1, v2, v3 
# |           497:  v_and_b32_e32 v1, 0xffff, v1 
# |           498:  v_and_b32_e32 v0, 0xffff, v0 
# |             .
# |             .
# |             .
# | >>>>>>
# `-----------------------------
# 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/175194


More information about the llvm-commits mailing list