[llvm] [SLP] Don't truncate compare constants that change value at the demoted width (PR #209030)
via llvm-commits
llvm-commits at lists.llvm.org
Sun Jul 12 10:02:37 PDT 2026
github-actions[bot] wrote:
<!--PREMERGE ADVISOR COMMENT: Linux-->
# :penguin: Linux x64 Test Results
* 178753 tests passed
* 3596 tests skipped
* 1 test failed
## Failed Tests
(click on a test name to see its output)
### LLVM
<details>
<summary>LLVM.Transforms/SLPVectorizer/X86/minbitwidth-icmp-signed-const-trunc.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 -mtriple=x86_64-unknown-linux-gnu < /home/gha/actions-runner/_work/llvm-project/llvm-project/llvm/test/Transforms/SLPVectorizer/X86/minbitwidth-icmp-signed-const-trunc.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/minbitwidth-icmp-signed-const-trunc.ll
# executed command: /home/gha/actions-runner/_work/llvm-project/llvm-project/build/bin/opt -passes=slp-vectorizer -S -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/minbitwidth-icmp-signed-const-trunc.ll
# .---command stderr------------
# | /home/gha/actions-runner/_work/llvm-project/llvm-project/llvm/test/Transforms/SLPVectorizer/X86/minbitwidth-icmp-signed-const-trunc.ll:16:15: error: CHECK-NEXT: expected string not found in input
# | ; CHECK-NEXT: [[TMP0:%.*]] = insertelement <8 x i16> poison, i16 [[C]], i32 0
# | ^
# | <stdin>:9:23: note: scanning from here
# | %or = or i32 %conv, 5
# | ^
# | <stdin>:9:23: note: with "C" equal to "%c"
# | %or = or i32 %conv, 5
# | ^
# | <stdin>:9:23: note: pattern attempts to capture variables: "TMP0"
# | %or = or i32 %conv, 5
# | ^
# | <stdin>:10:2: note: possible intended match here
# | %0 = insertelement <8 x i16> poison, i16 %c, i64 0
# | ^
# |
# | Input file: <stdin>
# | Check file: /home/gha/actions-runner/_work/llvm-project/llvm-project/llvm/test/Transforms/SLPVectorizer/X86/minbitwidth-icmp-signed-const-trunc.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 i1 @test(i16 %a, i16 %c) {
# | 7: entry:
# | 8: %conv = sext i16 %a to i32
# | 9: %or = or i32 %conv, 5
# | next:16'0 { search range start (exclusive)
# | next:16'1 error: no match found in search range
# | next:16'2 with "C" equal to "%c"
# | next:16'3 pattern attempts to capture variables: "TMP0"
# | 10: %0 = insertelement <8 x i16> poison, i16 %c, i64 0
# | next:16'4 ? possible intended match
# | 11: %1 = shufflevector <8 x i16> %0, <8 x i16> poison, <8 x i32> zeroinitializer
# | 12: %2 = add <8 x i16> %1, <i16 1, i16 2, i16 3, i16 4, i16 5, i16 6, i16 7, i16 8>
# | 13: %3 = trunc i32 %or to i16
# | 14: %4 = insertelement <8 x i16> poison, i16 %3, i64 0
# | 15: %5 = shufflevector <8 x i16> %4, <8 x i16> poison, <8 x i32> zeroinitializer
# | .
# | .
# | .
# | 22: }
# | 23:
# | 24: ; Function Attrs: nocallback nocreateundeforpoison nofree nosync nounwind speculatable willreturn memory(none)
# | 25: declare i1 @llvm.vector.reduce.and.v8i1(<8 x i1>) #0
# | 26:
# | 27: attributes #0 = { nocallback nocreateundeforpoison nofree nosync nounwind speculatable willreturn memory(none) }
# | next:16'5 } search range end (exclusive)
# | >>>>>>
# `-----------------------------
# 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/209030
More information about the llvm-commits
mailing list