| Issue |
169205
|
| Summary |
[X86] llc crashed at -O0/O1/O2/O3: Cannot select: 0x2656ecd0: v4i32 = BUILD_VECTOR...
|
| Labels |
backend:X86,
crash-on-valid
|
| Assignees |
|
| Reporter |
XChy
|
Reproducer: https://godbolt.org/z/7vbnczds3
Testcase:
```
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 <4 x i16> @backsmith_pure_2() #0 {
entry:
%0 = tail call <16 x i8> @llvm.x86.sse2.pavg.b(<16 x i8> zeroinitializer, <16 x i8> zeroinitializer)
%shuffle24 = shufflevector <16 x i8> %0, <16 x i8> zeroinitializer, <4 x i32> <i32 2, i32 4, i32 9, i32 9>
%conv25 = zext <4 x i8> %shuffle24 to <4 x i16>
%not.neg = add <4 x i16> %conv25, splat (i16 1)
ret <4 x i16> %not.neg
}
; Function Attrs: nocallback nofree nosync nounwind willreturn memory(none)
declare <16 x i8> @llvm.x86.sse2.pavg.b(<16 x i8>, <16 x i8>) #1
attributes #0 = { "target-features"="+avx" "tune-cpu"="alderlake" }
attributes #1 = { nocallback nofree nosync nounwind willreturn memory(none) }
```
llc dumps:
```
LLVM ERROR: Cannot select: 0x2656ecd0: v4i32 = BUILD_VECTOR Constant:i32<65537>, Constant:i32<65537>, Constant:i32<65537>, Constant:i32<65537>
In function: backsmith_pure_2
PLEASE submit a bug report to https://github.com/llvm/llvm-project/issues/ and include the crash backtrace and instructions to reproduce the bug.
Stack dump:
0. Program arguments: /opt/compiler-explorer/clang-trunk/bin/llc -o /app/output.s -O0 <source>
1. Running pass 'Function Pass Manager' on module '<source>'.
2. Running pass 'X86 DAG->DAG Instruction Selection' on function '@backsmith_pure_2'
#0 0x0000000003bbc648 llvm::sys::PrintStackTrace(llvm::raw_ostream&, int) (/opt/compiler-explorer/clang-trunk/bin/llc+0x3bbc648)
#1 0x0000000003bb9814 SignalHandler(int, siginfo_t*, void*) Signals.cpp:0:0
#2 0x0000710675842520 (/lib/x86_64-linux-gnu/libc.so.6+0x42520)
#3 0x00007106758969fc pthread_kill (/lib/x86_64-linux-gnu/libc.so.6+0x969fc)
#4 0x0000710675842476 gsignal (/lib/x86_64-linux-gnu/libc.so.6+0x42476)
#5 0x00007106758287f3 abort (/lib/x86_64-linux-gnu/libc.so.6+0x287f3)
#6 0x00000000007ba4b0 llvm::json::operator==(llvm::json::Value const&, llvm::json::Value const&) (.cold) JSON.cpp:0:0
#7 0x000000000395d8ca llvm::SelectionDAGISel::CannotYetSelect(llvm::SDNode*) (/opt/compiler-explorer/clang-trunk/bin/llc+0x395d8ca)
#8 0x000000000396350d llvm::SelectionDAGISel::SelectCodeCommon(llvm::SDNode*, unsigned char const*, unsigned int) (/opt/compiler-explorer/clang-trunk/bin/llc+0x396350d)
#9 0x000000000200ccea (anonymous namespace)::X86DAGToDAGISel::Select(llvm::SDNode*) X86ISelDAGToDAG.cpp:0:0
#10 0x000000000395aa04 llvm::SelectionDAGISel::DoInstructionSelection() (/opt/compiler-explorer/clang-trunk/bin/llc+0x395aa04)
#11 0x0000000003966d22 llvm::SelectionDAGISel::CodeGenAndEmitDAG() (/opt/compiler-explorer/clang-trunk/bin/llc+0x3966d22)
#12 0x0000000003969651 llvm::SelectionDAGISel::SelectAllBasicBlocks(llvm::Function const&) (/opt/compiler-explorer/clang-trunk/bin/llc+0x3969651)
#13 0x000000000396b605 llvm::SelectionDAGISel::runOnMachineFunction(llvm::MachineFunction&) (/opt/compiler-explorer/clang-trunk/bin/llc+0x396b605)
#14 0x000000000395a5a1 llvm::SelectionDAGISelLegacy::runOnMachineFunction(llvm::MachineFunction&) (/opt/compiler-explorer/clang-trunk/bin/llc+0x395a5a1)
#15 0x0000000002c5c9fd llvm::MachineFunctionPass::runOnFunction(llvm::Function&) (/opt/compiler-explorer/clang-trunk/bin/llc+0x2c5c9fd)
#16 0x00000000031b3112 llvm::FPPassManager::runOnFunction(llvm::Function&) (/opt/compiler-explorer/clang-trunk/bin/llc+0x31b3112)
#17 0x00000000031b33a1 llvm::FPPassManager::runOnModule(llvm::Module&) (/opt/compiler-explorer/clang-trunk/bin/llc+0x31b33a1)
#18 0x00000000031b4c17 llvm::legacy::PassManagerImpl::run(llvm::Module&) (/opt/compiler-explorer/clang-trunk/bin/llc+0x31b4c17)
#19 0x00000000007cecd2 main (/opt/compiler-explorer/clang-trunk/bin/llc+0x7cecd2)
#20 0x0000710675829d90 (/lib/x86_64-linux-gnu/libc.so.6+0x29d90)
#21 0x0000710675829e40 __libc_start_main (/lib/x86_64-linux-gnu/libc.so.6+0x29e40)
#22 0x00000000008fbf05 _start (/opt/compiler-explorer/clang-trunk/bin/llc+0x8fbf05)
Program terminated with signal: SIGSEGV
Compiler returned: 139
```
cc @RKSimon
_______________________________________________
llvm-bugs mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs