Issue |
91979
|
Summary |
LLVM ERROR: Unsupported library call operation!
|
Labels |
new issue
|
Assignees |
|
Reporter |
DigOrDog
|
# Description
The following code crashes aarch64 backend with "LLVM ERROR: Unsupported library call operation!"
# Minimal Reproduction
https://godbolt.org/z/h3zvfE69b
## Code
```
; ModuleID = 'Fuzzer input'
source_filename = "M"
@G = global float 0x36A0000000000000
@G.1 = global <32 x i2> <i2 1, i2 1, i2 1, i2 1, i2 1, i2 1, i2 1, i2 1, i2 1, i2 1, i2 1, i2 1, i2 1, i2 1, i2 1, i2 1, i2 1, i2 1, i2 1, i2 1, i2 1, i2 1, i2 1, i2 1, i2 1, i2 1, i2 1, i2 1, i2 1, i2 1, i2 1, i2 1>
define i32 @f() {
BB:
%A2 = alloca x86_fp80, align 16
store x86_fp80 undef, ptr %A2, align 16
%A = alloca <32 x i2>, align 8
%L1 = load float, ptr %A, align 4
store <32 x i2> undef, ptr %A, align 8
%CastIToFP = sitofp i64 -1 to float
%RP = alloca i32, align 4
%CastFPTrunc = fpext float %L1 to x86_fp80
%L = load i64, ptr %RP, align 4
%Castbitcast = bitcast i64 %L to <32 x i2>
%0 = load i32, ptr %RP, align 4
store float %CastIToFP, ptr @G, align 4
%Castbitcast1 = bitcast i64 %L to <32 x i2>
store <32 x i2> %Castbitcast, ptr %A, align 8
store <32 x i2> %Castbitcast1, ptr @G.1, align 8
store x86_fp80 %CastFPTrunc, ptr %A2, align 16
ret i32 %0
}
```
## Stack Trace
```
LLVM ERROR: Unsupported library call operation!
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 -mtriple=aarch64 -O=0 <source>
1. Running pass 'Function Pass Manager' on module '<source>'.
2. Running pass 'AArch64 Instruction Selection' on function '@f'
#0 0x000000000369cd38 llvm::sys::PrintStackTrace(llvm::raw_ostream&, int) (/opt/compiler-explorer/clang-trunk/bin/llc+0x369cd38)
#1 0x000000000369a6ac SignalHandler(int) Signals.cpp:0:0
#2 0x0000781980a42520 (/lib/x86_64-linux-gnu/libc.so.6+0x42520)
#3 0x0000781980a969fc pthread_kill (/lib/x86_64-linux-gnu/libc.so.6+0x969fc)
#4 0x0000781980a42476 gsignal (/lib/x86_64-linux-gnu/libc.so.6+0x42476)
#5 0x0000781980a287f3 abort (/lib/x86_64-linux-gnu/libc.so.6+0x287f3)
#6 0x0000000000729d2e llvm::UniqueStringSaver::save(llvm::StringRef) (.cold) StringSaver.cpp:0:0
#7 0x00000000035f53f8 (/opt/compiler-explorer/clang-trunk/bin/llc+0x35f53f8)
#8 0x00000000034dc187 llvm::TargetLowering::makeLibCall(llvm::SelectionDAG&, llvm::RTLIB::Libcall, llvm::EVT, llvm::ArrayRef<llvm::SDValue>, llvm::TargetLowering::MakeLibCallOptions, llvm::SDLoc const&, llvm::SDValue) const (/opt/compiler-explorer/clang-trunk/bin/llc+0x34dc187)
#9 0x000000000356e08f llvm::DAGTypeLegalizer::SoftenFloatRes_FP_EXTEND(llvm::SDNode*) (/opt/compiler-explorer/clang-trunk/bin/llc+0x356e08f)
#10 0x000000000356e44b llvm::DAGTypeLegalizer::SoftenFloatResult(llvm::SDNode*, unsigned int) (/opt/compiler-explorer/clang-trunk/bin/llc+0x356e44b)
#11 0x0000000003501aa2 llvm::DAGTypeLegalizer::run() (/opt/compiler-explorer/clang-trunk/bin/llc+0x3501aa2)
#12 0x00000000035020f1 llvm::SelectionDAG::LegalizeTypes() (/opt/compiler-explorer/clang-trunk/bin/llc+0x35020f1)
#13 0x0000000003478a21 llvm::SelectionDAGISel::CodeGenAndEmitDAG() (/opt/compiler-explorer/clang-trunk/bin/llc+0x3478a21)
#14 0x000000000347b868 llvm::SelectionDAGISel::SelectAllBasicBlocks(llvm::Function const&) (/opt/compiler-explorer/clang-trunk/bin/llc+0x347b868)
#15 0x000000000347e049 llvm::SelectionDAGISel::runOnMachineFunction(llvm::MachineFunction&) (.part.0) SelectionDAGISel.cpp:0:0
#16 0x00000000027d3810 llvm::MachineFunctionPass::runOnFunction(llvm::Function&) (.part.0) MachineFunctionPass.cpp:0:0
#17 0x0000000002cf7af2 llvm::FPPassManager::runOnFunction(llvm::Function&) (/opt/compiler-explorer/clang-trunk/bin/llc+0x2cf7af2)
#18 0x0000000002cf7c71 llvm::FPPassManager::runOnModule(llvm::Module&) (/opt/compiler-explorer/clang-trunk/bin/llc+0x2cf7c71)
#19 0x0000000002cf9920 llvm::legacy::PassManagerImpl::run(llvm::Module&) (/opt/compiler-explorer/clang-trunk/bin/llc+0x2cf9920)
#20 0x000000000083e4f4 compileModule(char**, llvm::LLVMContext&) llc.cpp:0:0
#21 0x000000000073befe main (/opt/compiler-explorer/clang-trunk/bin/llc+0x73befe)
#22 0x0000781980a29d90 (/lib/x86_64-linux-gnu/libc.so.6+0x29d90)
#23 0x0000781980a29e40 __libc_start_main (/lib/x86_64-linux-gnu/libc.so.6+0x29e40)
#24 0x000000000083613e _start (/opt/compiler-explorer/clang-trunk/bin/llc+0x83613e)
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