Issue 83729
Summary Error when selecting llvm.log for <1 x double> on aarch64
Labels new issue
Assignees
Reporter calebzulawski
    [godbolt](https://llvm.godbolt.org/#g:!((g:!((g:!((h:codeEditor,i:(filename:'1',fontScale:14,fontUsePx:'0',j:1,lang:llvm,selection:(endColumn:20,endLineNumber:2,positionColumn:20,positionLineNumber:2,selectionStartColumn:20,selectionStartLineNumber:2,startColumn:20,startLineNumber:2),source:'define+%3C1+x+double%3E+@log_v1f64(%3C1+x+double%3E+%25x)+%7b%0a++%25r+%3d+tail+call+%3c1+x+double%...@llvm.log(%3C1+x+double%3E+%25x)%0A++ret+%3C1+x+double%3E+%25r%0A%7D'),l:'5',n:'0',o:'LLVM+IR+source+%231',t:'0')),k:33.333333333333336,l:'4',n:'0',o:'',s:0,t:'0'),(g:!((h:compiler,i:(compiler:llctrunk,filters:(b:'0',binary:'1',binaryObject:'1',commentOnly:'0',debugCalls:'1',demangle:'0',directives:'0',execute:'1',intel:'0',libraryCode:'0',trim:'1'),flagsViewOpen:'1',fontScale:14,fontUsePx:'0',j:1,lang:llvm,libs:!(),options:'-O3+-march%3Daarch64',overrides:!(),selection:(endColumn:1,endLineNumber:1,positionColumn:1,positionLineNumber:1,selectionStartColumn:1,selectionStartLineNumber:1,startColumn:1,startLineNumber:1),source:1),l:'5',n:'0',o:'+llc+(trunk)+(Editor+%231)',t:'0')),k:33.333333333333336,l:'4',m:100,n:'0',o:'',s:0,t:'0'),(g:!((h:output,i:(compilerName:'opt+(assertions+trunk)',editorid:1,fontScale:14,fontUsePx:'0',j:1,wrap:'1'),l:'5',n:'0',o:'Output+of+llc+(trunk)+(Compiler+%231)',t:'0')),k:33.33333333333333,l:'4',n:'0',o:'',s:0,t:'0')),l:'2',m:100,n:'0',o:'',t:'0')),version:4)

detected in Rust `std::simd`: https://github.com/rust-lang/portable-simd/actions/runs/8131232601/job/22220325413?pr=401
```
define <1 x double> @log_v1f64(<1 x double> %x) {
  %r = tail call <1 x double> @llvm.log(<1 x double> %x)
  ret <1 x double> %r
}
```
errors with:
```
LLVM ERROR: Cannot select: 0x8e90990: v1f64 = flog 0x8e90920
  0x8e90920: v1f64,ch = CopyFromReg 0x8e0d200, Register:v1f64 %0
    0x8e908b0: v1f64 = Register %0
In function: log_v1f64
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-trunk/bin/llc -o /app/output.s -x86-asm-syntax=intel -O3 -march=aarch64 <source>
1.	Running pass 'Function Pass Manager' on module '<source>'.
2.	Running pass 'AArch64 Instruction Selection' on function '@log_v1f64'
 #0 0x00000000035db368 llvm::sys::PrintStackTrace(llvm::raw_ostream&, int) (/opt/compiler-explorer/clang-trunk/bin/llc+0x35db368)
 #1 0x00000000035d8cdc SignalHandler(int) Signals.cpp:0:0
 #2 0x00007f85ae842520 (/lib/x86_64-linux-gnu/libc.so.6+0x42520)
 #3 0x00007f85ae8969fc pthread_kill (/lib/x86_64-linux-gnu/libc.so.6+0x969fc)
 #4 0x00007f85ae842476 gsignal (/lib/x86_64-linux-gnu/libc.so.6+0x42476)
 #5 0x00007f85ae8287f3 abort (/lib/x86_64-linux-gnu/libc.so.6+0x287f3)
 #6 0x000000000071c894 llvm::RISCVISAInfo::updateCombination() (.cold) RISCVISAInfo.cpp:0:0
 #7 0x00000000033ac904 llvm::SelectionDAGISel::CannotYetSelect(llvm::SDNode*) (/opt/compiler-explorer/clang-trunk/bin/llc+0x33ac904)
 #8 0x00000000033b28f5 llvm::SelectionDAGISel::SelectCodeCommon(llvm::SDNode*, unsigned char const*, unsigned int) (/opt/compiler-explorer/clang-trunk/bin/llc+0x33b28f5)
 #9 0x0000000000b0f1ed (anonymous namespace)::AArch64DAGToDAGISel::Select(llvm::SDNode*) AArch64ISelDAGToDAG.cpp:0:0
#10 0x00000000033a9e87 llvm::SelectionDAGISel::DoInstructionSelection() (/opt/compiler-explorer/clang-trunk/bin/llc+0x33a9e87)
#11 0x00000000033b71d5 llvm::SelectionDAGISel::CodeGenAndEmitDAG() (/opt/compiler-explorer/clang-trunk/bin/llc+0x33b71d5)
#12 0x00000000033b9e88 llvm::SelectionDAGISel::SelectAllBasicBlocks(llvm::Function const&) (/opt/compiler-explorer/clang-trunk/bin/llc+0x33b9e88)
#13 0x00000000033bc669 llvm::SelectionDAGISel::runOnMachineFunction(llvm::MachineFunction&) (.part.0) SelectionDAGISel.cpp:0:0
#14 0x0000000002734790 llvm::MachineFunctionPass::runOnFunction(llvm::Function&) (.part.0) MachineFunctionPass.cpp:0:0
#15 0x0000000002c4ce42 llvm::FPPassManager::runOnFunction(llvm::Function&) (/opt/compiler-explorer/clang-trunk/bin/llc+0x2c4ce42)
#16 0x0000000002c4cfc1 llvm::FPPassManager::runOnModule(llvm::Module&) (/opt/compiler-explorer/clang-trunk/bin/llc+0x2c4cfc1)
#17 0x0000000002c4ebe0 llvm::legacy::PassManagerImpl::run(llvm::Module&) (/opt/compiler-explorer/clang-trunk/bin/llc+0x2c4ebe0)
#18 0x000000000081ad84 compileModule(char**, llvm::LLVMContext&) llc.cpp:0:0
#19 0x000000000072e78e main (/opt/compiler-explorer/clang-trunk/bin/llc+0x72e78e)
#20 0x00007f85ae829d90 (/lib/x86_64-linux-gnu/libc.so.6+0x29d90)
#21 0x00007f85ae829e40 __libc_start_main (/lib/x86_64-linux-gnu/libc.so.6+0x29e40)
#22 0x000000000081297e _start (/opt/compiler-explorer/clang-trunk/bin/llc+0x81297e)
Program terminated with signal: SIGSEGV
Compiler returned: 139
```
_______________________________________________
llvm-bugs mailing list
llvm-bugs@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs

Reply via email to