vit9696 added a comment. @jhibbits sorry for not answering earlier, I was occupied with NY holidays, and then had a lot of stuff on the road.
Trying to sync to your latest changes, I merged the updated https://reviews.llvm.org/D54583 in my local copy with your fixes to libcall expansion. From what I understood (correct me if I am wrong) it should have fixed the __divdc3 case. However, it still appears appears unresolved to me, with a segmentation fault instead of selection error. I narrowed a potentially smaller example, which reproduces the issue. Does it reproduce for you locally? void f1(long double v) { } void f2(void* v, __builtin_va_list arg) { f1(__builtin_va_arg(arg, long double)); } $ clang -c sample.c -target powerpc-gnu-linux-eabi -ffreestanding -nostdlib -femulated-tls -mcpu=8548 -mspe Stack dump: 0. Program arguments: clang-7 -cc1 -triple powerpc-gnu-linux-eabi -emit-obj -mrelax-all -disable-free -disable-llvm-verifier -discard-value-names -main-file-name sample.c -mrelocation-model static -mthread-model posix -mdisable-fp-elim -fmath-errno -masm-verbose -mconstructor-aliases -ffreestanding -fuse-init-array -target-cpu ppc -target-feature +spe -mfloat-abi hard -dwarf-column-info -debugger-tuning=gdb -target-linker-version 409.12 -coverage-notes-file Desktop/sample/sample.gcno -resource-dir /llvm/llvm-7.0.1-Darwin-x86_64/lib/clang/7.0.1 -internal-isystem /usr/local/include -internal-isystem /llvm/llvm-7.0.1-Darwin-x86_64/lib/clang/7.0.1/include -internal-externc-isystem /include -internal-externc-isystem /usr/include -fdebug-compilation-dir Desktop/sample -ferror-limit 19 -fmessage-length 265 -femulated-tls -fno-signed-char -fobjc-runtime=gcc -fdiagnostics-show-option -fcolor-diagnostics -o sample.o -x c Desktop/sample/sample.c -faddrsig 1. <eof> parser at end of file 2. Code generation 3. Running pass 'Function Pass Manager' on module 'Desktop/sample/sample.c'. 4. Running pass 'PowerPC DAG->DAG Pattern Instruction Selection' on function '@f2' 0 clang-7 0x00000001099af90a llvm::sys::PrintStackTrace(llvm::raw_ostream&) + 37 1 clang-7 0x00000001099afcfa SignalHandler(int) + 200 2 libsystem_platform.dylib 0x00007fff52975f5a _sigtramp + 26 3 libsystem_platform.dylib 0x00007fe219f0eec0 _sigtramp + 3344535424 4 clang-7 0x00000001091093e1 llvm::PPCTargetLowering::LowerCall(llvm::TargetLowering::CallLoweringInfo&, llvm::SmallVectorImpl<llvm::SDValue>&) const + 867 5 clang-7 0x0000000109f55b7a llvm::TargetLowering::LowerCallTo(llvm::TargetLowering::CallLoweringInfo&) const + 3856 6 clang-7 0x0000000109f686fd llvm::SelectionDAGBuilder::lowerInvokable(llvm::TargetLowering::CallLoweringInfo&, llvm::BasicBlock const*) + 357 7 clang-7 0x0000000109f5ad64 llvm::SelectionDAGBuilder::LowerCallTo(llvm::ImmutableCallSite, llvm::SDValue, bool, llvm::BasicBlock const*) + 1178 8 clang-7 0x0000000109f4e05a llvm::SelectionDAGBuilder::visitCall(llvm::CallInst const&) + 1016 9 clang-7 0x0000000109f474c0 llvm::SelectionDAGBuilder::visit(llvm::Instruction const&) + 114 10 clang-7 0x0000000109fa76d3 llvm::SelectionDAGISel::SelectBasicBlock(llvm::ilist_iterator<llvm::ilist_detail::node_options<llvm::Instruction, false, false, void>, false, true>, llvm::ilist_iterator<llvm::ilist_detail::node_options<llvm::Instruction, false, false, void>, false, true>, bool&) + 177 11 clang-7 0x0000000109fa6dde llvm::SelectionDAGISel::SelectAllBasicBlocks(llvm::Function const&) + 5532 12 clang-7 0x0000000109fa50f4 llvm::SelectionDAGISel::runOnMachineFunction(llvm::MachineFunction&) + 1474 13 clang-7 0x00000001090e0bcc (anonymous namespace)::PPCDAGToDAGISel::runOnMachineFunction(llvm::MachineFunction&) + 70 14 clang-7 0x00000001094d4785 llvm::MachineFunctionPass::runOnFunction(llvm::Function&) + 117 15 clang-7 0x000000010965c36b llvm::FPPassManager::runOnFunction(llvm::Function&) + 335 16 clang-7 0x000000010965c505 llvm::FPPassManager::runOnModule(llvm::Module&) + 49 17 clang-7 0x000000010965c7e6 llvm::legacy::PassManagerImpl::run(llvm::Module&) + 558 18 clang-7 0x0000000109ae2839 clang::EmitBackendOutput(clang::DiagnosticsEngine&, clang::HeaderSearchOptions const&, clang::CodeGenOptions const&, clang::TargetOptions const&, clang::LangOptions const&, llvm::DataLayout const&, llvm::Module*, clang::BackendAction, std::__1::unique_ptr<llvm::raw_pwrite_stream, std::__1::default_delete<llvm::raw_pwrite_stream> >) + 12981 19 clang-7 0x0000000109c48ea2 clang::BackendConsumer::HandleTranslationUnit(clang::ASTContext&) + 864 20 clang-7 0x000000010a40bbbf clang::ParseAST(clang::Sema&, bool, bool) + 458 21 clang-7 0x0000000109dcb7d7 clang::FrontendAction::Execute() + 69 22 clang-7 0x0000000109d9d9fc clang::CompilerInstance::ExecuteAction(clang::FrontendAction&) + 664 23 clang-7 0x0000000109dfea50 clang::ExecuteCompilerInvocation(clang::CompilerInstance*) + 1265 24 clang-7 0x0000000108f1238a cc1_main(llvm::ArrayRef<char const*>, char const*, void*) + 1140 25 clang-7 0x0000000108f115a4 main + 7638 26 libdyld.dylib 0x00007fff52667015 start + 1 27 libdyld.dylib 0x000000000000003c start + 2912522280 clang-7: error: unable to execute command: Segmentation fault: 11 clang-7: error: clang frontend command failed due to signal (use -v to see invocation) clang version 7.0.1 (tags/RELEASE_701/final 351415) Target: powerpc-gnu-linux-eabi Thread model: posix InstalledDir: /llvm/toolchain/bin clang-7: note: diagnostic msg: PLEASE submit a bug report to https://bugs.llvm.org/ and include the crash backtrace, preprocessed source, and associated run script. clang-7: note: diagnostic msg: ******************** PLEASE ATTACH THE FOLLOWING FILES TO THE BUG REPORT: Preprocessed source(s) and associated run script(s) are located at: clang-7: note: diagnostic msg: /var/folders/9y/zl96m3v94kgcc6wxx0tvqhsc0000gn/T/sample-e182be.c clang-7: note: diagnostic msg: /var/folders/9y/zl96m3v94kgcc6wxx0tvqhsc0000gn/T/sample-e182be.sh clang-7: note: diagnostic msg: Crash backtrace is located in clang-7: note: diagnostic msg: /Library/Logs/DiagnosticReports/clang-7_<YYYY-MM-DD-HHMMSS>_<hostname>.crash clang-7: note: diagnostic msg: (choose the .crash file that corresponds to your crash) clang-7: note: diagnostic msg: ******************** Repository: rC Clang CHANGES SINCE LAST ACTION https://reviews.llvm.org/D49754/new/ https://reviews.llvm.org/D49754 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits