[llvm] [AArch64][SelectionDAG][Peephole] Only fold into ands directly if AND is one-use (PR #191586)

via llvm-commits llvm-commits at lists.llvm.org
Fri Apr 10 19:51:05 PDT 2026


github-actions[bot] wrote:

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

* 172449 tests passed
* 3138 tests skipped
* 4 tests failed

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

### LLVM
<details>
<summary>LLVM.CodeGen/AArch64/masked-sdiv-fixed-length.ll</summary>

```
Exit Code: 1

Command Output (stdout):
--
# RUN: at line 2
/home/gha/actions-runner/_work/llvm-project/llvm-project/build/bin/llc -mtriple aarch64 < /home/gha/actions-runner/_work/llvm-project/llvm-project/llvm/test/CodeGen/AArch64/masked-sdiv-fixed-length.ll | /home/gha/actions-runner/_work/llvm-project/llvm-project/build/bin/FileCheck /home/gha/actions-runner/_work/llvm-project/llvm-project/llvm/test/CodeGen/AArch64/masked-sdiv-fixed-length.ll --check-prefix=NEON
# executed command: /home/gha/actions-runner/_work/llvm-project/llvm-project/build/bin/llc -mtriple aarch64
# note: command had no output on stdout or stderr
# executed command: /home/gha/actions-runner/_work/llvm-project/llvm-project/build/bin/FileCheck /home/gha/actions-runner/_work/llvm-project/llvm-project/llvm/test/CodeGen/AArch64/masked-sdiv-fixed-length.ll --check-prefix=NEON
# .---command stderr------------
# | /home/gha/actions-runner/_work/llvm-project/llvm-project/llvm/test/CodeGen/AArch64/masked-sdiv-fixed-length.ll:266:14: error: NEON-NEXT: expected string not found in input
# | ; NEON-NEXT: fmov w8, s0
# |              ^
# | <stdin>:186:37: note: scanning from here
# |  // kill: def $d0 killed $d0 def $q0
# |                                     ^
# | <stdin>:187:2: note: possible intended match here
# |  fmov w9, s0
# |  ^
# | 
# | Input file: <stdin>
# | Check file: /home/gha/actions-runner/_work/llvm-project/llvm-project/llvm/test/CodeGen/AArch64/masked-sdiv-fixed-length.ll
# | 
# | -dump-input=help explains the following input dump.
# | 
# | Input was:
# | <<<<<<
# |             .
# |             .
# |             .
# |           181:  .p2align 2 
# |           182:  .type sdiv_v2i128, at function 
# |           183: sdiv_v2i128: // @sdiv_v2i128 
# |           184: // %bb.0: 
# |           185:  stp x30, x25, [sp, #-64]! // 16-byte Folded Spill 
# |           186:  // kill: def $d0 killed $d0 def $q0 
# | next:266'0                                         X error: no match found
# |           187:  fmov w9, s0 
# | next:266'0     ~~~~~~~~~~~~~
# | next:266'1      ?            possible intended match
# |           188:  mov w8, v0.s[1] 
# | next:266'0     ~~~~~~~~~~~~~~~~~
# |           189:  stp x22, x21, [sp, #32] // 16-byte Folded Spill 
# | next:266'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# |           190:  mov x21, x3 
# | next:266'0     ~~~~~~~~~~~~~
# |           191:  mov x22, x2 
# | next:266'0     ~~~~~~~~~~~~~
# |           192:  stp x24, x23, [sp, #16] // 16-byte Folded Spill 
# | next:266'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# |             .
# |             .
# |             .
# | >>>>>>
# `-----------------------------
# error: command failed with exit status: 1

--

```
</details>
<details>
<summary>LLVM.CodeGen/AArch64/masked-srem-fixed-length.ll</summary>

```
Exit Code: 1

Command Output (stdout):
--
# RUN: at line 2
/home/gha/actions-runner/_work/llvm-project/llvm-project/build/bin/llc -mtriple aarch64 < /home/gha/actions-runner/_work/llvm-project/llvm-project/llvm/test/CodeGen/AArch64/masked-srem-fixed-length.ll | /home/gha/actions-runner/_work/llvm-project/llvm-project/build/bin/FileCheck /home/gha/actions-runner/_work/llvm-project/llvm-project/llvm/test/CodeGen/AArch64/masked-srem-fixed-length.ll --check-prefix=NEON
# executed command: /home/gha/actions-runner/_work/llvm-project/llvm-project/build/bin/llc -mtriple aarch64
# note: command had no output on stdout or stderr
# executed command: /home/gha/actions-runner/_work/llvm-project/llvm-project/build/bin/FileCheck /home/gha/actions-runner/_work/llvm-project/llvm-project/llvm/test/CodeGen/AArch64/masked-srem-fixed-length.ll --check-prefix=NEON
# .---command stderr------------
# | /home/gha/actions-runner/_work/llvm-project/llvm-project/llvm/test/CodeGen/AArch64/masked-srem-fixed-length.ll:295:14: error: NEON-NEXT: expected string not found in input
# | ; NEON-NEXT: fmov w8, s0
# |              ^
# | <stdin>:203:37: note: scanning from here
# |  // kill: def $d0 killed $d0 def $q0
# |                                     ^
# | <stdin>:204:2: note: possible intended match here
# |  fmov w9, s0
# |  ^
# | 
# | Input file: <stdin>
# | Check file: /home/gha/actions-runner/_work/llvm-project/llvm-project/llvm/test/CodeGen/AArch64/masked-srem-fixed-length.ll
# | 
# | -dump-input=help explains the following input dump.
# | 
# | Input was:
# | <<<<<<
# |             .
# |             .
# |             .
# |           198:  .p2align 2 
# |           199:  .type srem_v2i128, at function 
# |           200: srem_v2i128: // @srem_v2i128 
# |           201: // %bb.0: 
# |           202:  stp x30, x25, [sp, #-64]! // 16-byte Folded Spill 
# |           203:  // kill: def $d0 killed $d0 def $q0 
# | next:295'0                                         X error: no match found
# |           204:  fmov w9, s0 
# | next:295'0     ~~~~~~~~~~~~~
# | next:295'1      ?            possible intended match
# |           205:  mov w8, v0.s[1] 
# | next:295'0     ~~~~~~~~~~~~~~~~~
# |           206:  stp x22, x21, [sp, #32] // 16-byte Folded Spill 
# | next:295'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# |           207:  mov x21, x3 
# | next:295'0     ~~~~~~~~~~~~~
# |           208:  mov x22, x2 
# | next:295'0     ~~~~~~~~~~~~~
# |           209:  stp x24, x23, [sp, #16] // 16-byte Folded Spill 
# | next:295'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# |             .
# |             .
# |             .
# | >>>>>>
# `-----------------------------
# error: command failed with exit status: 1

--

```
</details>
<details>
<summary>LLVM.CodeGen/AArch64/masked-udiv-fixed-length.ll</summary>

```
Exit Code: 1

Command Output (stdout):
--
# RUN: at line 2
/home/gha/actions-runner/_work/llvm-project/llvm-project/build/bin/llc -mtriple aarch64 < /home/gha/actions-runner/_work/llvm-project/llvm-project/llvm/test/CodeGen/AArch64/masked-udiv-fixed-length.ll | /home/gha/actions-runner/_work/llvm-project/llvm-project/build/bin/FileCheck /home/gha/actions-runner/_work/llvm-project/llvm-project/llvm/test/CodeGen/AArch64/masked-udiv-fixed-length.ll --check-prefix=NEON
# executed command: /home/gha/actions-runner/_work/llvm-project/llvm-project/build/bin/llc -mtriple aarch64
# note: command had no output on stdout or stderr
# executed command: /home/gha/actions-runner/_work/llvm-project/llvm-project/build/bin/FileCheck /home/gha/actions-runner/_work/llvm-project/llvm-project/llvm/test/CodeGen/AArch64/masked-udiv-fixed-length.ll --check-prefix=NEON
# .---command stderr------------
# | /home/gha/actions-runner/_work/llvm-project/llvm-project/llvm/test/CodeGen/AArch64/masked-udiv-fixed-length.ll:266:14: error: NEON-NEXT: expected string not found in input
# | ; NEON-NEXT: fmov w8, s0
# |              ^
# | <stdin>:186:37: note: scanning from here
# |  // kill: def $d0 killed $d0 def $q0
# |                                     ^
# | <stdin>:187:2: note: possible intended match here
# |  fmov w9, s0
# |  ^
# | 
# | Input file: <stdin>
# | Check file: /home/gha/actions-runner/_work/llvm-project/llvm-project/llvm/test/CodeGen/AArch64/masked-udiv-fixed-length.ll
# | 
# | -dump-input=help explains the following input dump.
# | 
# | Input was:
# | <<<<<<
# |             .
# |             .
# |             .
# |           181:  .p2align 2 
# |           182:  .type udiv_v2i128, at function 
# |           183: udiv_v2i128: // @udiv_v2i128 
# |           184: // %bb.0: 
# |           185:  stp x30, x25, [sp, #-64]! // 16-byte Folded Spill 
# |           186:  // kill: def $d0 killed $d0 def $q0 
# | next:266'0                                         X error: no match found
# |           187:  fmov w9, s0 
# | next:266'0     ~~~~~~~~~~~~~
# | next:266'1      ?            possible intended match
# |           188:  mov w8, v0.s[1] 
# | next:266'0     ~~~~~~~~~~~~~~~~~
# |           189:  stp x22, x21, [sp, #32] // 16-byte Folded Spill 
# | next:266'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# |           190:  mov x21, x3 
# | next:266'0     ~~~~~~~~~~~~~
# |           191:  mov x22, x2 
# | next:266'0     ~~~~~~~~~~~~~
# |           192:  stp x24, x23, [sp, #16] // 16-byte Folded Spill 
# | next:266'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# |             .
# |             .
# |             .
# | >>>>>>
# `-----------------------------
# error: command failed with exit status: 1

--

```
</details>
<details>
<summary>LLVM.CodeGen/AArch64/masked-urem-fixed-length.ll</summary>

```
Exit Code: 1

Command Output (stdout):
--
# RUN: at line 2
/home/gha/actions-runner/_work/llvm-project/llvm-project/build/bin/llc -mtriple aarch64 < /home/gha/actions-runner/_work/llvm-project/llvm-project/llvm/test/CodeGen/AArch64/masked-urem-fixed-length.ll | /home/gha/actions-runner/_work/llvm-project/llvm-project/build/bin/FileCheck /home/gha/actions-runner/_work/llvm-project/llvm-project/llvm/test/CodeGen/AArch64/masked-urem-fixed-length.ll --check-prefix=NEON
# executed command: /home/gha/actions-runner/_work/llvm-project/llvm-project/build/bin/llc -mtriple aarch64
# note: command had no output on stdout or stderr
# executed command: /home/gha/actions-runner/_work/llvm-project/llvm-project/build/bin/FileCheck /home/gha/actions-runner/_work/llvm-project/llvm-project/llvm/test/CodeGen/AArch64/masked-urem-fixed-length.ll --check-prefix=NEON
# .---command stderr------------
# | /home/gha/actions-runner/_work/llvm-project/llvm-project/llvm/test/CodeGen/AArch64/masked-urem-fixed-length.ll:295:14: error: NEON-NEXT: expected string not found in input
# | ; NEON-NEXT: fmov w8, s0
# |              ^
# | <stdin>:203:37: note: scanning from here
# |  // kill: def $d0 killed $d0 def $q0
# |                                     ^
# | <stdin>:204:2: note: possible intended match here
# |  fmov w9, s0
# |  ^
# | 
# | Input file: <stdin>
# | Check file: /home/gha/actions-runner/_work/llvm-project/llvm-project/llvm/test/CodeGen/AArch64/masked-urem-fixed-length.ll
# | 
# | -dump-input=help explains the following input dump.
# | 
# | Input was:
# | <<<<<<
# |             .
# |             .
# |             .
# |           198:  .p2align 2 
# |           199:  .type urem_v2i128, at function 
# |           200: urem_v2i128: // @urem_v2i128 
# |           201: // %bb.0: 
# |           202:  stp x30, x25, [sp, #-64]! // 16-byte Folded Spill 
# |           203:  // kill: def $d0 killed $d0 def $q0 
# | next:295'0                                         X error: no match found
# |           204:  fmov w9, s0 
# | next:295'0     ~~~~~~~~~~~~~
# | next:295'1      ?            possible intended match
# |           205:  mov w8, v0.s[1] 
# | next:295'0     ~~~~~~~~~~~~~~~~~
# |           206:  stp x22, x21, [sp, #32] // 16-byte Folded Spill 
# | next:295'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# |           207:  mov x21, x3 
# | next:295'0     ~~~~~~~~~~~~~
# |           208:  mov x22, x2 
# | next:295'0     ~~~~~~~~~~~~~
# |           209:  stp x24, x23, [sp, #16] // 16-byte Folded Spill 
# | next:295'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/191586


More information about the llvm-commits mailing list