| Issue |
172010
|
| Summary |
[X86] Assertion `llvm::all_of(Mask, [&](int M) { return M < (NElts * 2) && M >= -1; }) && "Index out of range"' failed
|
| Labels |
backend:X86,
crash-on-valid
|
| Assignees |
|
| Reporter |
XChy
|
It seems to be a recent regression, as godbolt cannot trigger the assertion.
Testcase:
```llvm
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"
target triple = "x86_64-unknown-linux-gnu"
define <9 x i16> @backsmith_pure_9(<4 x i64> %shuffle.i) #0 {
entry:
%shuffle = shufflevector <4 x i64> %shuffle.i, <4 x i64> zeroinitializer, <16 x i32> <i32 5, i32 3, i32 0, i32 5, i32 2, i32 2, i32 1, i32 1, i32 4, i32 6, i32 5, i32 3, i32 1, i32 7, i32 2, i32 1>
%conv3 = trunc nuw <16 x i64> %shuffle to <16 x i16>
%shuffle4 = shufflevector <16 x i16> zeroinitializer, <16 x i16> %conv3, <9 x i32> <i32 31, i32 18, i32 28, i32 20, i32 7, i32 5, i32 8, i32 4, i32 7>
ret <9 x i16> %shuffle4
}
attributes #0 = { "target-features"="+avx2" }
```
Command:
```
llc -O1 a.ll
```
Dump:
```
clang-22: /home/shareduser/XChy/Projects/llvm-project/llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp:2194: llvm::SDValue llvm::SelectionDAG::getVectorShuffle(llvm::EVT, const llvm::SDLoc&, llvm::SDValue, llvm::SDValue, llvm::ArrayRef<int>): Assertion `llvm::all_of(Mask, [&](int M) { return M < (NElts * 2) && M >= -1; }) && "Index out of range"' failed.
```
clang version: 4427e34a6476721b53364e7dad97340dc38f5cb6
_______________________________________________
llvm-bugs mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs