nikic wrote:

```llvm
target triple = "x86_64-unknown-linux-gnu"

define <16 x i8> @test(ptr %arg) {
  %load= load <16 x i8>, ptr %arg, align 1
  %shuf = shufflevector <16 x i8> %load, <16 x i8> <i8 poison, i8 poison, i8 
poison, i8 poison, i8 poison, i8 poison, i8 poison, i8 poison, i8 undef, i8 
undef, i8 undef, i8 undef, i8 undef, i8 undef, i8 undef, i8 undef>, <16 x i32> 
<i32 0, i32 1, i32 2, i32 3, i32 4, i32 5, i32 6, i32 7, i32 24, i32 25, i32 
26, i32 27, i32 28, i32 29, i32 30, i32 31>
  ret <16 x i8> %shuf
}
```
```
opt: /home/npopov/repos/llvm-project/llvm/lib/IR/Instructions.cpp:1919: bool 
isSingleSourceMaskImpl(ArrayRef<int>, int): Assertion `I >= 0 && I < (NumOpElts 
* 2) && "Out-of-bounds shuffle mask element"' failed.
PLEASE submit a bug report to https://github.com/llvm/llvm-project/issues/ and 
include the crash backtrace.
Stack dump:
0.      Program arguments: build/bin/opt -S -passes=vector-combine reduced.ll
1.      Running pass "function(vector-combine)" on module "reduced.ll"
2.      Running pass "vector-combine" on function "test"
 #0 0x00000000046727a8 llvm::sys::PrintStackTrace(llvm::raw_ostream&, int) 
(build/bin/opt+0x46727a8)
 #1 0x000000000466fd75 llvm::sys::RunSignalHandlers() (build/bin/opt+0x466fd75)
 #2 0x0000000004673841 SignalHandler(int, siginfo_t*, void*) Signals.cpp:0:0
 #3 0x00007f54c5227c30 __restore_rt (/lib64/libc.so.6+0x19c30)
 #4 0x00007f54c528111c __pthread_kill_implementation (/lib64/libc.so.6+0x7311c)
 #5 0x00007f54c5227afe gsignal (/lib64/libc.so.6+0x19afe)
 #6 0x00007f54c520f6d0 abort (/lib64/libc.so.6+0x16d0)
 #7 0x00007f54c520f639 __assert_perror_fail (/lib64/libc.so.6+0x1639)
 #8 0x0000000004770373 
llvm::ShuffleVectorInst::isExtractSubvectorMask(llvm::ArrayRef<int>, int, int&) 
(build/bin/opt+0x4770373)
 #9 0x0000000007bf7ad0 
llvm::BasicTTIImplBase<llvm::X86TTIImpl>::improveShuffleKindFromMask(llvm::TargetTransformInfo::ShuffleKind,
 llvm::ArrayRef<int>, llvm::VectorType*, int&, llvm::VectorType*&) const 
X86TargetTransformInfo.cpp:0:0
#10 0x0000000007bf5c38 
llvm::X86TTIImpl::getShuffleCost(llvm::TargetTransformInfo::ShuffleKind, 
llvm::VectorType*, llvm::VectorType*, llvm::ArrayRef<int>, 
llvm::TargetTransformInfo::TargetCostKind, int, llvm::VectorType*, 
llvm::ArrayRef<llvm::Value const*>, llvm::Instruction const*) const 
X86TargetTransformInfo.cpp:0:0
#11 0x0000000004d9a9ce 
llvm::TargetTransformInfo::getShuffleCost(llvm::TargetTransformInfo::ShuffleKind,
 llvm::VectorType*, llvm::VectorType*, llvm::ArrayRef<int>, 
llvm::TargetTransformInfo::TargetCostKind, int, llvm::VectorType*, 
llvm::ArrayRef<llvm::Value const*>, llvm::Instruction const*) const 
(build/bin/opt+0x4d9a9ce)
#12 0x0000000005e4e2b6 (anonymous 
namespace)::VectorCombine::run()::$_0::operator()(llvm::Instruction&) const 
VectorCombine.cpp:0:0
```

https://github.com/llvm/llvm-project/pull/128938
_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to