Issue |
159912
|
Summary |
LLVM ERROR: Do not know how to scalarize this operator's operand!
|
Labels |
backend:AArch64,
SVE,
crash,
llvm:SelectionDAG
|
Assignees |
abhishek-kaushik22
|
Reporter |
abhishek-kaushik22
|
Godbolt: https://godbolt.org/z/Y1KrrxM5T
Minimal reproducer
```llvm
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i8:8:32-i16:16:32-i64:64-i128:128-n32:64-S128-Fn32"
target triple = "aarch64-none-linux-gnu"
@BlendedStore_p = external global i64
define void @_Z20CompressBlendedStorev(<1 x i1> %cmp.i) #0 {
entry:
%0 = load <1 x i64>, ptr @BlendedStore_p, align 8
%1 = select <1 x i1> %cmp.i, <1 x i64> zeroinitializer, <1 x i64> %0
store <1 x i64> %1, ptr @BlendedStore_p, align 8
ret void
}
attributes #0 = { "target-features"="+sve" }
```
Crash backtrace:
```
ScalarizeVectorOperand Op #4: t13: ch = masked_store<(store (s64) into @BlendedStore_p)> t0, t9, GlobalAddress:i64<ptr @BlendedStore_p> 0, undef:i64, t4
LLVM ERROR: Do not know how to scalarize this operator's operand!
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-assertions-trunk/bin/llc -o /app/output.s -x86-asm-syntax=intel <source>
1. Running pass 'Function Pass Manager' on module '<source>'.
2. Running pass 'AArch64 Instruction Selection' on function '@_Z20CompressBlendedStorev'
#0 0x00000000040f38b8 llvm::sys::PrintStackTrace(llvm::raw_ostream&, int) (/opt/compiler-explorer/clang-assertions-trunk/bin/llc+0x40f38b8)
#1 0x00000000040f0764 SignalHandler(int, siginfo_t*, void*) Signals.cpp:0:0
#2 0x00007759e7242520 (/lib/x86_64-linux-gnu/libc.so.6+0x42520)
#3 0x00007759e72969fc pthread_kill (/lib/x86_64-linux-gnu/libc.so.6+0x969fc)
#4 0x00007759e7242476 gsignal (/lib/x86_64-linux-gnu/libc.so.6+0x42476)
#5 0x00007759e72287f3 abort (/lib/x86_64-linux-gnu/libc.so.6+0x287f3)
#6 0x00000000007b6b55 llvm::json::operator==(llvm::json::Value const&, llvm::json::Value const&) (.cold) JSON.cpp:0:0
#7 0x000000000403cac1 (/opt/compiler-explorer/clang-assertions-trunk/bin/llc+0x403cac1)
#8 0x0000000003f839bf llvm::DAGTypeLegalizer::ScalarizeVectorOperand(llvm::SDNode*, unsigned int) (/opt/compiler-explorer/clang-assertions-trunk/bin/llc+0x3f839bf)
#9 0x0000000003f26b42 llvm::DAGTypeLegalizer::run() (/opt/compiler-explorer/clang-assertions-trunk/bin/llc+0x3f26b42)
#10 0x0000000003f27899 llvm::SelectionDAG::LegalizeTypes() (/opt/compiler-explorer/clang-assertions-trunk/bin/llc+0x3f27899)
#11 0x0000000003e8c91b llvm::SelectionDAGISel::CodeGenAndEmitDAG() (/opt/compiler-explorer/clang-assertions-trunk/bin/llc+0x3e8c91b)
#12 0x0000000003e9067d llvm::SelectionDAGISel::SelectAllBasicBlocks(llvm::Function const&) (/opt/compiler-explorer/clang-assertions-trunk/bin/llc+0x3e9067d)
#13 0x0000000003e91c65 llvm::SelectionDAGISel::runOnMachineFunction(llvm::MachineFunction&) (/opt/compiler-explorer/clang-assertions-trunk/bin/llc+0x3e91c65)
#14 0x0000000003e7d45f llvm::SelectionDAGISelLegacy::runOnMachineFunction(llvm::MachineFunction&) (/opt/compiler-explorer/clang-assertions-trunk/bin/llc+0x3e7d45f)
#15 0x00000000030039f9 llvm::MachineFunctionPass::runOnFunction(llvm::Function&) (.part.0) MachineFunctionPass.cpp:0:0
#16 0x000000000363cb28 llvm::FPPassManager::runOnFunction(llvm::Function&) (/opt/compiler-explorer/clang-assertions-trunk/bin/llc+0x363cb28)
#17 0x000000000363cd61 llvm::FPPassManager::runOnModule(llvm::Module&) (/opt/compiler-explorer/clang-assertions-trunk/bin/llc+0x363cd61)
#18 0x000000000363d5cf llvm::legacy::PassManagerImpl::run(llvm::Module&) (/opt/compiler-explorer/clang-assertions-trunk/bin/llc+0x363d5cf)
#19 0x00000000008ed56d compileModule(char**, llvm::LLVMContext&) llc.cpp:0:0
#20 0x00000000007be93e main (/opt/compiler-explorer/clang-assertions-trunk/bin/llc+0x7be93e)
#21 0x00007759e7229d90 (/lib/x86_64-linux-gnu/libc.so.6+0x29d90)
#22 0x00007759e7229e40 __libc_start_main (/lib/x86_64-linux-gnu/libc.so.6+0x29e40)
#23 0x00000000008e39c5 _start (/opt/compiler-explorer/clang-assertions-trunk/bin/llc+0x8e39c5)
Program terminated with signal: SIGSEGV
Compiler returned: 139
```
The problem occurs because of https://github.com/llvm/llvm-project/commit/1c0ac80d4a9ef6c21914f2317003979952c2a2c3 which combines the `v1i64 store` to a masked store before legalization.
_______________________________________________
llvm-bugs mailing list
llvm-bugs@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs