[llvm] [SLP] Use the correct identity when combining binary opcodes with AND/MUL (PR #180457)
via llvm-commits
llvm-commits at lists.llvm.org
Sun Feb 8 20:06:56 PST 2026
github-actions[bot] wrote:
<!--PREMERGE ADVISOR COMMENT: Linux-->
# :penguin: Linux x64 Test Results
* 169341 tests passed
* 3051 tests skipped
* 3 tests failed
## Failed Tests
(click on a test name to see its output)
### LLVM
<details>
<summary>LLVM.Transforms/SLPVectorizer/X86/buildvector-postpone-for-dependency.ll</summary>
```
Exit Code: 1
Command Output (stdout):
--
# RUN: at line 2
/home/gha/actions-runner/_work/llvm-project/llvm-project/build/bin/opt -S --passes=slp-vectorizer -slp-threshold=-99999 -mtriple=x86_64-unknown-linux-gnu < /home/gha/actions-runner/_work/llvm-project/llvm-project/llvm/test/Transforms/SLPVectorizer/X86/buildvector-postpone-for-dependency.ll | /home/gha/actions-runner/_work/llvm-project/llvm-project/build/bin/FileCheck /home/gha/actions-runner/_work/llvm-project/llvm-project/llvm/test/Transforms/SLPVectorizer/X86/buildvector-postpone-for-dependency.ll
# executed command: /home/gha/actions-runner/_work/llvm-project/llvm-project/build/bin/opt -S --passes=slp-vectorizer -slp-threshold=-99999 -mtriple=x86_64-unknown-linux-gnu
# 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/Transforms/SLPVectorizer/X86/buildvector-postpone-for-dependency.ll
# .---command stderr------------
# | /home/gha/actions-runner/_work/llvm-project/llvm-project/llvm/test/Transforms/SLPVectorizer/X86/buildvector-postpone-for-dependency.ll:16:15: error: CHECK-NEXT: expected string not found in input
# | ; CHECK-NEXT: [[TMP3:%.*]] = shufflevector <4 x i32> <i32 0, i32 0, i32 poison, i32 poison>, <4 x i32> [[TMP6]], <4 x i32> <i32 0, i32 1, i32 5, i32 4>
# | ^
# | <stdin>:19:101: note: scanning from here
# | %2 = shufflevector <2 x i32> %1, <2 x i32> poison, <4 x i32> <i32 0, i32 1, i32 poison, i32 poison>
# | ^
# | <stdin>:19:101: note: with "TMP6" equal to "%2"
# | %2 = shufflevector <2 x i32> %1, <2 x i32> poison, <4 x i32> <i32 0, i32 1, i32 poison, i32 poison>
# | ^
# | <stdin>:20:2: note: possible intended match here
# | %3 = shufflevector <4 x i32> <i32 1, i32 0, i32 poison, i32 poison>, <4 x i32> %2, <4 x i32> <i32 0, i32 1, i32 5, i32 4>
# | ^
# |
# | Input file: <stdin>
# | Check file: /home/gha/actions-runner/_work/llvm-project/llvm-project/llvm/test/Transforms/SLPVectorizer/X86/buildvector-postpone-for-dependency.ll
# |
# | -dump-input=help explains the following input dump.
# |
# | Input was:
# | <<<<<<
# | .
# | .
# | .
# | 14: %0 = phi <4 x i32> [ poison, %bb1 ], [ %4, %bb6 ]
# | 15: ret void
# | 16:
# | 17: bb6: ; preds = %bb6, %bb
# | 18: %1 = phi <2 x i32> [ zeroinitializer, %bb ], [ %6, %bb6 ]
# | 19: %2 = shufflevector <2 x i32> %1, <2 x i32> poison, <4 x i32> <i32 0, i32 1, i32 poison, i32 poison>
# | next:16'0 X error: no match found
# | next:16'1 with "TMP6" equal to "%2"
# | 20: %3 = shufflevector <4 x i32> <i32 1, i32 0, i32 poison, i32 poison>, <4 x i32> %2, <4 x i32> <i32 0, i32 1, i32 5, i32 4>
# | next:16'0 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# | next:16'2 ? possible intended match
# | 21: %4 = mul <4 x i32> %3, zeroinitializer
# | next:16'0 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# | 22: %5 = shufflevector <2 x i32> %1, <2 x i32> <i32 0, i32 poison>, <2 x i32> <i32 2, i32 1>
# | next:16'0 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# | 23: %6 = mul <2 x i32> zeroinitializer, %5
# | next:16'0 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# | 24: br i1 false, label %bb2, label %bb6
# | next:16'0 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# | 25: }
# | next:16'0 ~~
# | >>>>>>
# `-----------------------------
# error: command failed with exit status: 1
--
```
</details>
<details>
<summary>LLVM.Transforms/SLPVectorizer/X86/bv-shuffle-mask.ll</summary>
```
Exit Code: 1
Command Output (stdout):
--
# RUN: at line 2
/home/gha/actions-runner/_work/llvm-project/llvm-project/build/bin/opt -S --passes=slp-vectorizer -mtriple=x86_64-unknown-linux-gnu < /home/gha/actions-runner/_work/llvm-project/llvm-project/llvm/test/Transforms/SLPVectorizer/X86/bv-shuffle-mask.ll | /home/gha/actions-runner/_work/llvm-project/llvm-project/build/bin/FileCheck /home/gha/actions-runner/_work/llvm-project/llvm-project/llvm/test/Transforms/SLPVectorizer/X86/bv-shuffle-mask.ll
# executed command: /home/gha/actions-runner/_work/llvm-project/llvm-project/build/bin/opt -S --passes=slp-vectorizer -mtriple=x86_64-unknown-linux-gnu
# 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/Transforms/SLPVectorizer/X86/bv-shuffle-mask.ll
# .---command stderr------------
# | /home/gha/actions-runner/_work/llvm-project/llvm-project/llvm/test/Transforms/SLPVectorizer/X86/bv-shuffle-mask.ll:8:15: error: CHECK-NEXT: expected string not found in input
# | ; CHECK-NEXT: [[TMP0:%.*]] = insertelement <4 x i16> <i16 0, i16 0, i16 0, i16 poison>, i16 [[V2]], i32 3
# | ^
# | <stdin>:7:7: note: scanning from here
# | entry:
# | ^
# | <stdin>:7:7: note: with "V2" equal to "%v2"
# | entry:
# | ^
# | <stdin>:9:2: note: possible intended match here
# | %1 = insertelement <4 x i16> <i16 0, i16 0, i16 0, i16 poison>, i16 %v1, i32 3
# | ^
# |
# | Input file: <stdin>
# | Check file: /home/gha/actions-runner/_work/llvm-project/llvm-project/llvm/test/Transforms/SLPVectorizer/X86/bv-shuffle-mask.ll
# |
# | -dump-input=help explains the following input dump.
# |
# | Input was:
# | <<<<<<
# | 1: ; ModuleID = '<stdin>'
# | 2: source_filename = "<stdin>"
# | 3: target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-i128:128-f80:128-n8:16:32:64-S128"
# | 4: target triple = "x86_64-unknown-linux-gnu"
# | 5:
# | 6: define i16 @test(i16 %v1, i16 %v2) {
# | 7: entry:
# | next:8'0 X error: no match found
# | next:8'1 with "V2" equal to "%v2"
# | 8: %0 = insertelement <4 x i16> <i16 -1, i16 -1, i16 -1, i16 poison>, i16 %v2, i32 3
# | next:8'0 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# | 9: %1 = insertelement <4 x i16> <i16 0, i16 0, i16 0, i16 poison>, i16 %v1, i32 3
# | next:8'0 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# | next:8'2 ? possible intended match
# | 10: %2 = and <4 x i16> %0, %1
# | next:8'0 ~~~~~~~~~~~~~~~~~~~~~~~~~~~
# | 11: %3 = shufflevector <4 x i16> %0, <4 x i16> poison, <2 x i32> <i32 poison, i32 3>
# | next:8'0 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# | 12: %4 = insertelement <2 x i16> %3, i16 %v1, i32 0
# | next:8'0 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# | 13: %5 = shufflevector <2 x i16> %4, <2 x i16> poison, <4 x i32> <i32 0, i32 0, i32 0, i32 1>
# | next:8'0 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# | 14: %6 = or <4 x i16> %5, zeroinitializer
# | next:8'0 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# | .
# | .
# | .
# | >>>>>>
# `-----------------------------
# error: command failed with exit status: 1
--
```
</details>
<details>
<summary>LLVM.Transforms/SLPVectorizer/X86/copyable-child-node-used-outside.ll</summary>
```
Exit Code: 1
Command Output (stdout):
--
# RUN: at line 2
/home/gha/actions-runner/_work/llvm-project/llvm-project/build/bin/opt -passes=slp-vectorizer -S -slp-threshold=-99999 -mtriple=x86_64-unknown-linux-gnu < /home/gha/actions-runner/_work/llvm-project/llvm-project/llvm/test/Transforms/SLPVectorizer/X86/copyable-child-node-used-outside.ll | /home/gha/actions-runner/_work/llvm-project/llvm-project/build/bin/FileCheck /home/gha/actions-runner/_work/llvm-project/llvm-project/llvm/test/Transforms/SLPVectorizer/X86/copyable-child-node-used-outside.ll
# executed command: /home/gha/actions-runner/_work/llvm-project/llvm-project/build/bin/opt -passes=slp-vectorizer -S -slp-threshold=-99999 -mtriple=x86_64-unknown-linux-gnu
# 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/Transforms/SLPVectorizer/X86/copyable-child-node-used-outside.ll
# .---command stderr------------
# | /home/gha/actions-runner/_work/llvm-project/llvm-project/llvm/test/Transforms/SLPVectorizer/X86/copyable-child-node-used-outside.ll:13:15: error: CHECK-NEXT: expected string not found in input
# | ; CHECK-NEXT: [[TMP3:%.*]] = and <4 x i32> <i32 -1, i32 0, i32 0, i32 0>, [[TMP2]]
# | ^
# | <stdin>:14:91: note: scanning from here
# | %1 = shufflevector <4 x i32> %0, <4 x i32> poison, <4 x i32> <i32 0, i32 1, i32 0, i32 0>
# | ^
# | <stdin>:14:91: note: with "TMP2" equal to "%1"
# | %1 = shufflevector <4 x i32> %0, <4 x i32> poison, <4 x i32> <i32 0, i32 1, i32 0, i32 0>
# | ^
# | <stdin>:15:2: note: possible intended match here
# | %2 = and <4 x i32> <i32 -1, i32 0, i32 -1, i32 -1>, %1
# | ^
# |
# | Input file: <stdin>
# | Check file: /home/gha/actions-runner/_work/llvm-project/llvm-project/llvm/test/Transforms/SLPVectorizer/X86/copyable-child-node-used-outside.ll
# |
# | -dump-input=help explains the following input dump.
# |
# | Input was:
# | <<<<<<
# | .
# | .
# | .
# | 9: br label %bb1
# | 10:
# | 11: bb1: ; preds = %bb
# | 12: %or = or i32 %trunc, 0
# | 13: %0 = insertelement <4 x i32> <i32 poison, i32 0, i32 poison, i32 poison>, i32 %trunc, i32 0
# | 14: %1 = shufflevector <4 x i32> %0, <4 x i32> poison, <4 x i32> <i32 0, i32 1, i32 0, i32 0>
# | next:13'0 X error: no match found
# | next:13'1 with "TMP2" equal to "%1"
# | 15: %2 = and <4 x i32> <i32 -1, i32 0, i32 -1, i32 -1>, %1
# | next:13'0 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# | next:13'2 ? possible intended match
# | 16: %zext = zext i32 %or to i64
# | next:13'0 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# | 17: br label %bb3
# | next:13'0 ~~~~~~~~~~~~~~~
# | 18:
# | next:13'0 ~
# | 19: bb3: ; preds = %bb1
# | next:13'0 ~~~~~~~~~~~~~~~~~~~~
# | 20: ret <4 x i32> %2
# | next:13'0 ~~~~~~~~~~~~~~~~~~
# | 21: }
# | next:13'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/180457
More information about the llvm-commits
mailing list