| Issue |
52867
|
| Summary |
[X86] [SSE2] Assertion `Reg >= X86::FP0 && Reg <= X86::FP6 && "Expected FP register!"' failed.
|
| Labels |
new issue
|
| Assignees |
|
| Reporter |
berolinux
|
With clang 13.0.0:
```
$ cat clang-ssebug.cpp
template <class> void a(double, int);
void b() { a<int>(0.5, 0); }
$ clang -cc1 -triple x86_64-pc-linux-gnu -emit-obj -target-feature -sse2 -x c++ clang-ssebug.cpp
clang: /builddir/build/BUILD/llvm-project-13.0.0.src/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://bugs.llvm.org/ and include the crash backtrace, preprocessed source, and associated run script.
Stack dump:
0. Program arguments: clang -cc1 -triple x86_64-pc-linux-gnu -emit-obj -target-feature -sse2 -x c++ clang-ssebug.cpp
1. <eof> parser at end of file
2. Code generation
3. Running pass 'Function Pass Manager' on module 'clang-ssebug.cpp'.
4. Running pass 'X86 FP Stackifier' on function '@_Z1bv'
#0 0x00007f6f190a7091 llvm::sys::PrintStackTrace(llvm::raw_ostream&, int) (/usr/lib64/libLLVMSupport.so.13+0x23b091)
#1 0x00007f6f190a736d (/usr/lib64/libLLVMSupport.so.13+0x23b36d)
#2 0x00007f6f190a4c4a llvm::sys::RunSignalHandlers() (/usr/lib64/libLLVMSupport.so.13+0x238c4a)
#3 0x00007f6f190a7686 (/usr/lib64/libLLVMSupport.so.13+0x23b686)
#4 0x00007f6f18a67790 (/lib64/libc.so.6+0x45790)
#5 0x00007f6f18abbe33 pthread_kill (/lib64/libc.so.6+0x99e33)
#6 0x00007f6f18a676e2 gsignal (/lib64/libc.so.6+0x456e2)
#7 0x00007f6f18a4e44b abort (/lib64/libc.so.6+0x2c44b)
#8 0x00007f6f18a4e377 (/lib64/libc.so.6+0x2c377)
#9 0x00007f6f18a5f0f2 (/lib64/libc.so.6+0x3d0f2)
#10 0x00007f6f1e5d0a3b (/usr/lib64/libLLVMX86CodeGen.so.13+0x30aa3b)
#11 0x00007f6f1e5cccdc (/usr/lib64/libLLVMX86CodeGen.so.13+0x306cdc)
#12 0x00007f6f1c5eb19e llvm::MachineFunctionPass::runOnFunction(llvm::Function&) (/usr/lib64/libLLVMCodeGen.so.13+0x4f419e)
#13 0x00007f6f19eb446b llvm::FPPassManager::runOnFunction(llvm::Function&) (/usr/lib64/libLLVMCore.so.13+0x3fa46b)
#14 0x00007f6f19ebcf63 llvm::FPPassManager::runOnModule(llvm::Module&) (/usr/lib64/libLLVMCore.so.13+0x402f63)
#15 0x00007f6f19eb5111 llvm::legacy::PassManagerImpl::run(llvm::Module&) (/usr/lib64/libLLVMCore.so.13+0x3fb111)
#16 0x00007f6f19ebd487 llvm::legacy::PassManager::run(llvm::Module&) (/usr/lib64/libLLVMCore.so.13+0x403487)
#17 0x00007f6f1ccf990a (/usr/lib64/libclangCodeGen.so.13+0x2b690a)
#18 0x00007f6f1ccf5206 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> >) (/usr/lib64/libclangCodeGen.so.13+0x2b2206)
#19 0x00007f6f1d08d64e (/usr/lib64/libclangCodeGen.so.13+0x64a64e)
#20 0x00007f6f168522a4 clang::ParseAST(clang::Sema&, bool, bool) (/usr/lib64/libclangParse.so.13+0x6e2a4)
#21 0x00007f6f1b1cd92f clang::ASTFrontendAction::ExecuteAction() (/usr/lib64/libclangFrontend.so.13+0x1bf92f)
#22 0x00007f6f1d087d93 clang::CodeGenAction::ExecuteAction() (/usr/lib64/libclangCodeGen.so.13+0x644d93)
#23 0x00007f6f1b1cd024 clang::FrontendAction::Execute() (/usr/lib64/libclangFrontend.so.13+0x1bf024)
#24 0x00007f6f1b123c0f clang::CompilerInstance::ExecuteAction(clang::FrontendAction&) (/usr/lib64/libclangFrontend.so.13+0x115c0f)
#25 0x00007f6f1de5ace6 clang::ExecuteCompilerInvocation(clang::CompilerInstance*) (/usr/lib64/libclangFrontendTool.so.13+0x5ce6)
#26 0x00000000002196de cc1_main(llvm::ArrayRef<char const*>, char const*, void*) (/usr/bin/clang-13+0x2196de)
#27 0x0000000000216e40 (/usr/bin/clang-13+0x216e40)
#28 0x0000000000216583 main (/usr/bin/clang-13+0x216583)
#29 0x00007f6f18a4fd8c (/lib64/libc.so.6+0x2dd8c)
#30 0x00007f6f18a4fe39 __libc_start_main (/lib64/libc.so.6+0x2de39)
#31 0x0000000000212c21 _start (/usr/bin/clang-13+0x212c21)
./clang-ssebug.sh: line 1: 3344810 Aborted (core dumped) clang -cc1 -triple x86_64-pc-linux-gnu -emit-obj -target-feature -sse2 -x c++ clang-ssebug.cpp
```
_______________________________________________
llvm-bugs mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs