Skip to content

[AArch64][SVE] Unable to widen vector store #54424

@stevesuzuki-arm

Description

@stevesuzuki-arm

add <vscale x 3 x i64> https://godbolt.org/z/cM9YMqEc4

define <vscale x 3 x i64> @add_i64_nxv3(<vscale x 3 x i64> %a0, <vscale x 3 x i64> %a1) #0 {
  %1 = add nsw <vscale x 3 x i64> %a0, %a1
  ret <vscale x 3 x i64> %1
}

Crashes with target triple = "aarch64-linux-gnu" -mattr=+sve2 -O3

The same occurs with sub and mul

LLVM ERROR: Unable to widen vector store
PLEASE submit a bug report to https://github.com/llvm/llvm-project/issues/ and include the crash backtrace.
Stack dump:
0.	Program arguments: /opt/compiler-explorer/clang-assertions-trunk/bin/llc -o /app/output.s -x86-asm-syntax=intel -mattr=+sve2 -O3 <source>
1.	Running pass 'Function Pass Manager' on module '<source>'.
2.	Running pass 'AArch64 Instruction Selection' on function '@add_i64_nxv3'
 #0 0x000055c92c3449ef PrintStackTraceSignalHandler(void*) Signals.cpp:0:0
 #1 0x000055c92c3421ad SignalHandler(int) Signals.cpp:0:0
 #2 0x00007fa7e9e113c0 __restore_rt (/lib/x86_64-linux-gnu/libpthread.so.0+0x143c0)
 #3 0x00007fa7e98de03b raise (/lib/x86_64-linux-gnu/libc.so.6+0x4303b)
 #4 0x00007fa7e98bd859 abort (/lib/x86_64-linux-gnu/libc.so.6+0x22859)
 #5 0x000055c92c2875e8 llvm::report_fatal_error(llvm::Twine const&, bool) (/opt/compiler-explorer/clang-assertions-trunk/bin/llc+0x30875e8)
 #6 0x000055c92c287758 (/opt/compiler-explorer/clang-assertions-trunk/bin/llc+0x3087758)
 #7 0x000055c92c1e79f5 llvm::DAGTypeLegalizer::WidenVecOp_STORE(llvm::SDNode*) (/opt/compiler-explorer/clang-assertions-trunk/bin/llc+0x2fe79f5)
 #8 0x000055c92c1ea4cb llvm::DAGTypeLegalizer::WidenVectorOperand(llvm::SDNode*, unsigned int) (/opt/compiler-explorer/clang-assertions-trunk/bin/llc+0x2fea4cb)
 #9 0x000055c92c1ac883 llvm::DAGTypeLegalizer::run() (/opt/compiler-explorer/clang-assertions-trunk/bin/llc+0x2fac883)
#10 0x000055c92c1ad7e6 llvm::SelectionDAG::LegalizeTypes() (/opt/compiler-explorer/clang-assertions-trunk/bin/llc+0x2fad7e6)
#11 0x000055c92c14361e llvm::SelectionDAGISel::CodeGenAndEmitDAG() (/opt/compiler-explorer/clang-assertions-trunk/bin/llc+0x2f4361e)
#12 0x000055c92c147233 llvm::SelectionDAGISel::SelectAllBasicBlocks(llvm::Function const&) (/opt/compiler-explorer/clang-assertions-trunk/bin/llc+0x2f47233)
#13 0x000055c92c148ee8 llvm::SelectionDAGISel::runOnMachineFunction(llvm::MachineFunction&) (.part.960) SelectionDAGISel.cpp:0:0
#14 0x000055c92b687546 llvm::MachineFunctionPass::runOnFunction(llvm::Function&) (/opt/compiler-explorer/clang-assertions-trunk/bin/llc+0x2487546)
#15 0x000055c92bb3a7d6 llvm::FPPassManager::runOnFunction(llvm::Function&) (/opt/compiler-explorer/clang-assertions-trunk/bin/llc+0x293a7d6)
#16 0x000055c92bb3ab29 llvm::FPPassManager::runOnModule(llvm::Module&) (/opt/compiler-explorer/clang-assertions-trunk/bin/llc+0x293ab29)
#17 0x000055c92bb3b469 llvm::legacy::PassManagerImpl::run(llvm::Module&) (/opt/compiler-explorer/clang-assertions-trunk/bin/llc+0x293b469)
#18 0x000055c929d2f5c8 compileModule(char**, llvm::LLVMContext&) llc.cpp:0:0
#19 0x000055c929c86197 main (/opt/compiler-explorer/clang-assertions-trunk/bin/llc+0xa86197)
#20 0x00007fa7e98bf0b3 __libc_start_main (/lib/x86_64-linux-gnu/libc.so.6+0x240b3)
#21 0x000055c929d2604a _start (/opt/compiler-explorer/clang-assertions-trunk/bin/llc+0xb2604a)
Compiler returned: 139

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions