We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
clang: /home/luhaocong/llvm-project-debug/llvm/lib/Target/X86/X86FloatingPoint.cpp:318: unsigned int getFPReg(const llvm::MachineOperand&): Assertion `Reg >= X86::FP0 && Reg <= X86::FP6 && "Expected FP register!"' failed. PLEASE submit a bug report to https://github.com/llvm/llvm-project/issues/ and include the crash backtrace, preprocessed source, and associated run script. Stack dump: 0. Program arguments: /home/luhaocong/llvm-project-debug/build/bin/clang -O2 -S test.c -mno-sse2 1. <eof> parser at end of file 2. Code generation 3. Running pass 'Function Pass Manager' on module 'test.c'. 4. Running pass 'X86 FP Stackifier' on function '@main' #0 0x0000560a7cb8a666 llvm::sys::PrintStackTrace(llvm::raw_ostream&, int) /home/luhaocong/llvm-project-debug/llvm/lib/Support/Unix/Signals.inc:565:0 #1 0x0000560a7cb8a71d PrintStackTraceSignalHandler(void*) /home/luhaocong/llvm-project-debug/llvm/lib/Support/Unix/Signals.inc:632:0 #2 0x0000560a7cb883cc llvm::sys::RunSignalHandlers() /home/luhaocong/llvm-project-debug/llvm/lib/Support/Signals.cpp:94:0 #3 0x0000560a7cb89ec0 llvm::sys::CleanupOnSignal(unsigned long) /home/luhaocong/llvm-project-debug/llvm/lib/Support/Unix/Signals.inc:361:0 #4 0x0000560a7caaaa3c (anonymous namespace)::CrashRecoveryContextImpl::HandleCrash(int, unsigned long) /home/luhaocong/llvm-project-debug/llvm/lib/Support/CrashRecoveryContext.cpp:76:0 #5 0x0000560a7caaaf57 CrashRecoverySignalHandler(int) /home/luhaocong/llvm-project-debug/llvm/lib/Support/CrashRecoveryContext.cpp:390:0 #6 0x00007f54dff59980 __restore_rt (/lib/x86_64-linux-gnu/libpthread.so.0+0x12980) #7 0x00007f54df051e87 raise /build/glibc-uZu3wS/glibc-2.27/signal/../sysdeps/unix/sysv/linux/raise.c:51:0 #8 0x00007f54df0537f1 abort /build/glibc-uZu3wS/glibc-2.27/stdlib/abort.c:81:0 #9 0x00007f54df0433fa __assert_fail_base /build/glibc-uZu3wS/glibc-2.27/assert/assert.c:89:0 #10 0x00007f54df043472 (/lib/x86_64-linux-gnu/libc.so.6+0x30472) #11 0x0000560a7ae357a4 getFPReg(llvm::MachineOperand const&) /home/luhaocong/llvm-project-debug/llvm/lib/Target/X86/X86FloatingPoint.cpp:318:0 #12 0x0000560a7ae395f8 (anonymous namespace)::FPS::handleSpecialFP(llvm::MachineInstrBundleIterator<llvm::MachineInstr, false>&) /home/luhaocong/llvm-project-debug/llvm/lib/Target/X86/X86FloatingPoint.cpp:1532:0 #13 0x0000560a7ae36236 (anonymous namespace)::FPS::processBasicBlock(llvm::MachineFunction&, llvm::MachineBasicBlock&) /home/luhaocong/llvm-project-debug/llvm/lib/Target/X86/X86FloatingPoint.cpp:460:0 #14 0x0000560a7ae35ac0 (anonymous namespace)::FPS::runOnMachineFunction(llvm::MachineFunction&) /home/luhaocong/llvm-project-debug/llvm/lib/Target/X86/X86FloatingPoint.cpp:375:0 #15 0x0000560a7b90ba79 llvm::MachineFunctionPass::runOnFunction(llvm::Function&) /home/luhaocong/llvm-project-debug/llvm/lib/CodeGen/MachineFunctionPass.cpp:73:0 #16 0x0000560a7c072d22 llvm::FPPassManager::runOnFunction(llvm::Function&) /home/luhaocong/llvm-project-debug/llvm/lib/IR/LegacyPassManager.cpp:1434:0 #17 0x0000560a7c072fcb llvm::FPPassManager::runOnModule(llvm::Module&) /home/luhaocong/llvm-project-debug/llvm/lib/IR/LegacyPassManager.cpp:1480:0 #18 0x0000560a7c0733f3 (anonymous namespace)::MPPassManager::runOnModule(llvm::Module&) /home/luhaocong/llvm-project-debug/llvm/lib/IR/LegacyPassManager.cpp:1549:0 #19 0x0000560a7c06e415 llvm::legacy::PassManagerImpl::run(llvm::Module&) /home/luhaocong/llvm-project-debug/llvm/lib/IR/LegacyPassManager.cpp:539:0 #20 0x0000560a7c073c7d llvm::legacy::PassManager::run(llvm::Module&) /home/luhaocong/llvm-project-debug/llvm/lib/IR/LegacyPassManager.cpp:1677:0 #21 0x0000560a7d04742c (anonymous namespace)::EmitAssemblyHelper::RunCodegenPipeline(clang::BackendAction, std::unique_ptr<llvm::raw_pwrite_stream, std::default_delete<llvm::raw_pwrite_stream> >&, std::unique_ptr<llvm::ToolOutputFile, std::default_delete<llvm::ToolOutputFile> >&) /home/luhaocong/llvm-project-debug/clang/lib/CodeGen/BackendUtil.cpp:1535:0 #22 0x0000560a7d047630 (anonymous namespace)::EmitAssemblyHelper::EmitAssembly(clang::BackendAction, std::unique_ptr<llvm::raw_pwrite_stream, std::default_delete<llvm::raw_pwrite_stream> >) /home/luhaocong/llvm-project-debug/clang/lib/CodeGen/BackendUtil.cpp:1568:0 #23 0x0000560a7d0486c3 clang::EmitBackendOutput(clang::DiagnosticsEngine&, clang::HeaderSearchOptions const&, clang::CodeGenOptions const&, clang::TargetOptions const&, clang::LangOptions const&, llvm::StringRef, llvm::Module*, clang::BackendAction, std::unique_ptr<llvm::raw_pwrite_stream, std::default_delete<llvm::raw_pwrite_stream> >) /home/luhaocong/llvm-project-debug/clang/lib/CodeGen/BackendUtil.cpp:1729:0 #24 0x0000560a7e3f5196 clang::BackendConsumer::HandleTranslationUnit(clang::ASTContext&) /home/luhaocong/llvm-project-debug/clang/lib/CodeGen/CodeGenAction.cpp:370:0 #25 0x0000560a80075d8c clang::ParseAST(clang::Sema&, bool, bool) /home/luhaocong/llvm-project-debug/clang/lib/Parse/ParseAST.cpp:182:0 #26 0x0000560a7dad14f9 clang::ASTFrontendAction::ExecuteAction() /home/luhaocong/llvm-project-debug/clang/lib/Frontend/FrontendAction.cpp:1083:0 #27 0x0000560a7e3f180a clang::CodeGenAction::ExecuteAction() /home/luhaocong/llvm-project-debug/clang/lib/CodeGen/CodeGenAction.cpp:1107:0 #28 0x0000560a7dad0dc2 clang::FrontendAction::Execute() /home/luhaocong/llvm-project-debug/clang/lib/Frontend/FrontendAction.cpp:980:0 #29 0x0000560a7da09475 clang::CompilerInstance::ExecuteAction(clang::FrontendAction&) /home/luhaocong/llvm-project-debug/clang/lib/Frontend/CompilerInstance.cpp:1036:0 #30 0x0000560a7dc69b28 clang::ExecuteCompilerInvocation(clang::CompilerInstance*) /home/luhaocong/llvm-project-debug/clang/lib/FrontendTool/ExecuteCompilerInvocation.cpp:263:0 #31 0x0000560a7ad07a16 cc1_main(llvm::ArrayRef<char const*>, char const*, void*) /home/luhaocong/llvm-project-debug/clang/tools/driver/cc1_main.cpp:248:0 #32 0x0000560a7acfbb35 ExecuteCC1Tool(llvm::SmallVectorImpl<char const*>&) /home/luhaocong/llvm-project-debug/clang/tools/driver/driver.cpp:317:0 #33 0x0000560a7d8d9289 clang::driver::CC1Command::Execute(llvm::ArrayRef<llvm::Optional<llvm::StringRef> >, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >*, bool*) const::'lambda'()::operator()() const /home/luhaocong/llvm-project-debug/clang/lib/Driver/Job.cpp:407:0 #34 0x0000560a7d8d98aa void llvm::function_ref<void ()>::callback_fn<clang::driver::CC1Command::Execute(llvm::ArrayRef<llvm::Optional<llvm::StringRef> >, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >*, bool*) const::'lambda'()>(long) /home/luhaocong/llvm-project-debug/llvm/include/llvm/ADT/STLFunctionalExtras.h:46:0 #35 0x0000560a7ca9ff00 llvm::function_ref<void ()>::operator()() const /home/luhaocong/llvm-project-debug/llvm/include/llvm/ADT/STLFunctionalExtras.h:68:0 #36 0x0000560a7caab157 llvm::CrashRecoveryContext::RunSafely(llvm::function_ref<void ()>) /home/luhaocong/llvm-project-debug/llvm/lib/Support/CrashRecoveryContext.cpp:426:0 #37 0x0000560a7d8d94a3 clang::driver::CC1Command::Execute(llvm::ArrayRef<llvm::Optional<llvm::StringRef> >, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >*, bool*) const /home/luhaocong/llvm-project-debug/clang/lib/Driver/Job.cpp:407:0 #38 0x0000560a7d8841a2 clang::driver::Compilation::ExecuteCommand(clang::driver::Command const&, clang::driver::Command const*&) const /home/luhaocong/llvm-project-debug/clang/lib/Driver/Compilation.cpp:196:0 #39 0x0000560a7d88451e clang::driver::Compilation::ExecuteJobs(clang::driver::JobList const&, llvm::SmallVectorImpl<std::pair<int, clang::driver::Command const*> >&) const /home/luhaocong/llvm-project-debug/clang/lib/Driver/Compilation.cpp:249:0 #40 0x0000560a7d894408 clang::driver::Driver::ExecuteCompilation(clang::driver::Compilation&, llvm::SmallVectorImpl<std::pair<int, clang::driver::Command const*> >&) /home/luhaocong/llvm-project-debug/clang/lib/Driver/Driver.cpp:1617:0 #41 0x0000560a7acfccc0 main /home/luhaocong/llvm-project-debug/clang/tools/driver/driver.cpp:489:0 #42 0x00007f54df034c87 __libc_start_main /build/glibc-uZu3wS/glibc-2.27/csu/../csu/libc-start.c:344:0 #43 0x0000560a7acfa2aa _start (/home/luhaocong/llvm-project-debug/build/bin/clang+0x2a662aa) clang-14: error: clang frontend command failed with exit code 134 (use -v to see invocation) clang version 15.0.0 ([email protected]:llvm/llvm-project.git 75acad41bcd6cbe688e0609cbd7649ea8a533195) Target: x86_64-unknown-linux-gnu Thread model: posix InstalledDir: /home/luhaocong/llvm-project-debug/build/bin
The failed test case as follow:
// test.c int main() { printf("%f\n", 999.99); }
Build options:
cmake -DCMAKE_INSTALL_PREFIX=$RISCV -DCMAKE_BUILD_TYPE=Debug -DLLVM_OPTIMIZED_TABLEGEN=On -DLLVM_USE_LINKER=gold -DLLVM_ENABLE_PROJECTS="clang;lld;compiler-rt;" -DLLVM_ENABLE_ZLIB=Off -DLLVM_ENABLE_TERMINFO=Off -DLLVM_TARGETS_TO_BUILD="X86;RISCV;" ../llvm
What's more, this case can be compiled successfully with release version, but runs error results.
The text was updated successfully, but these errors were encountered:
@llvm/issue-subscribers-backend-x86
Sorry, something went wrong.
This is a duplicate of bug #29774
No branches or pull requests
The failed test case as follow:
Build options:
What's more, this case can be compiled successfully with release version, but runs error results.
The text was updated successfully, but these errors were encountered: