Intel® C++ Compiler
Support and discussions for creating C++ code that runs on platforms based on Intel® processors.
Announcements
This community is designed for sharing of public information. Please do not share Intel or third-party confidential information here.
7668 Discussions

icx -O0 ICE error in backend: Cannot emit physreg copy instruction

vzecca
Beginner
565 Views

cat icxerr4.c
// icx -O0 ICE error in backend: Cannot emit physreg copy instruction
void foo (void)
{
register int r19 asm ("19");

asm volatile ("# %0" : "=r"(r19));
}

icx -S -O0 icxerr4.c
fatal error: error in backend: Cannot emit physreg copy instruction
PLEASE submit a bug report to https://software.intel.com/en-us/support/priority-support and include the crash backtrace, preprocessed source, and associated run script.
Stack dump:
0. Program arguments: /opt/intel/oneapi/compiler/2021.3.0/linux/bin/clang @/tmp/icxargSEcVCE
1. <eof> parser at end of file
2. Code generation
3. Running pass 'Function Pass Manager' on module 'icxerr4.c'.
4. Running pass 'Post-RA pseudo instruction expansion pass' on function ''
#0 0x000055d310f0a68a llvm::sys::PrintStackTrace(llvm::raw_ostream&, int) (/opt/intel/oneapi/compiler/2021.3.0/linux/bin/clang+0x438f68a)
#1 0x000055d310f0a430 llvm::sys::RunSignalHandlers() (/opt/intel/oneapi/compiler/2021.3.0/linux/bin/clang+0x438f430)
#2 0x000055d310ebc2c7 (anonymous namespace)::CrashRecoveryContextImpl::HandleCrash(int, unsigned long) (/opt/intel/oneapi/compiler/2021.3.0/linux/bin/clang+0x43412c7)
#3 0x000055d310ebc27b (/opt/intel/oneapi/compiler/2021.3.0/linux/bin/clang+0x434127b)
#4 0x000055d310689957 llvm::sys::Process::Exit(int, bool) (/opt/intel/oneapi/compiler/2021.3.0/linux/bin/clang+0x3b0e957)
#5 0x000055d310689770 clang::DiagnosticsEngine::Report(unsigned int) (/opt/intel/oneapi/compiler/2021.3.0/linux/bin/clang+0x3b0e770)
#6 0x000055d30f0c3ab4 llvm::report_fatal_error(llvm::Twine const&, bool) (/opt/intel/oneapi/compiler/2021.3.0/linux/bin/clang+0x2548ab4)
#7 0x000055d30f29abe5 (/opt/intel/oneapi/compiler/2021.3.0/linux/bin/clang+0x271fbe5)
#8 0x000055d310413279 llvm::X86InstrInfo::copyPhysReg(llvm::MachineBasicBlock&, llvm::MachineInstrBundleIterator<llvm::MachineInstr, false>, llvm::DebugLoc const&, llvm::MCRegister, llvm::MCRegister, bool) const (/opt/intel/oneapi/compiler/2021.3.0/linux/bin/clang+0x3898279)
#9 0x000055d30fbfcc8b (anonymous namespace)::ExpandPostRA::runOnMachineFunction(llvm::MachineFunction&) (/opt/intel/oneapi/compiler/2021.3.0/linux/bin/clang+0x3081c8b)
#10 0x000055d30f7926c9 llvm::MachineFunctionPass::runOnFunction(llvm::Function&) (/opt/intel/oneapi/compiler/2021.3.0/linux/bin/clang+0x2c176c9)
#11 0x000055d30f0cc2d7 llvm::FPPassManager::runOnFunction(llvm::Function&) (/opt/intel/oneapi/compiler/2021.3.0/linux/bin/clang+0x25512d7)
#12 0x000055d30f0cc11f llvm::FPPassManager::runOnModule(llvm::Module&) (/opt/intel/oneapi/compiler/2021.3.0/linux/bin/clang+0x255111f)
#13 0x000055d3100fcd3a llvm::legacy::PassManagerImpl::run(llvm::Module&) (/opt/intel/oneapi/compiler/2021.3.0/linux/bin/clang+0x3581d3a)
#14 0x000055d3100f7114 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> >) (/opt/intel/oneapi/compiler/2021.3.0/linux/bin/clang+0x357c114)
#15 0x000055d3100f6224 clang::BackendConsumer::HandleTranslationUnit(clang::ASTContext&) (/opt/intel/oneapi/compiler/2021.3.0/linux/bin/clang+0x357b224)
#16 0x000055d310250353 clang::ParseAST(clang::Sema&, bool, bool) (/opt/intel/oneapi/compiler/2021.3.0/linux/bin/clang+0x36d5353)
#17 0x000055d31024f507 clang::CodeGenAction::ExecuteAction() (/opt/intel/oneapi/compiler/2021.3.0/linux/bin/clang+0x36d4507)
#18 0x000055d30f0d1f4e clang::FrontendAction::Execute() (/opt/intel/oneapi/compiler/2021.3.0/linux/bin/clang+0x2556f4e)
#19 0x000055d30f0d14b5 clang::CompilerInstance::ExecuteAction(clang::FrontendAction&) (/opt/intel/oneapi/compiler/2021.3.0/linux/bin/clang+0x25564b5)
#20 0x000055d31038e427 clang::ExecuteCompilerInvocation(clang::CompilerInstance*) (/opt/intel/oneapi/compiler/2021.3.0/linux/bin/clang+0x3813427)
#21 0x000055d31038a676 cc1_main(llvm::ArrayRef<char const*>, char const*, void*) (/opt/intel/oneapi/compiler/2021.3.0/linux/bin/clang+0x380f676)
#22 0x000055d3104349e8 ExecuteCC1Tool(llvm::SmallVectorImpl<char const*>&) (/opt/intel/oneapi/compiler/2021.3.0/linux/bin/clang+0x38b99e8)
#23 0x000055d313214ec2 void llvm::function_ref<void ()>::callback_fn<clang::driver::CC1Command::Execute(llvm::ArrayRef<llvm::Optional<llvm::StringRef> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >*, bool*) const::$_1>(long) (/opt/intel/oneapi/compiler/2021.3.0/linux/bin/clang+0x6699ec2)
#24 0x000055d310413f11 llvm::CrashRecoveryContext::RunSafely(llvm::function_ref<void ()>) (/opt/intel/oneapi/compiler/2021.3.0/linux/bin/clang+0x3898f11)
#25 0x000055d310413d65 clang::driver::CC1Command::Execute(llvm::ArrayRef<llvm::Optional<llvm::StringRef> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >*, bool*) const (/opt/intel/oneapi/compiler/2021.3.0/linux/bin/clang+0x3898d65)
#26 0x000055d31002edfd clang::driver::Compilation::ExecuteCommand(clang::driver::Command const&, clang::driver::Command const*&) const (/opt/intel/oneapi/compiler/2021.3.0/linux/bin/clang+0x34b3dfd)
#27 0x000055d31002e89f clang::driver::Compilation::ExecuteJobs(clang::driver::JobList const&, llvm::SmallVectorImpl<std::__1::pair<int, clang::driver::Command const*> >&) const (/opt/intel/oneapi/compiler/2021.3.0/linux/bin/clang+0x34b389f)
#28 0x000055d31002dec9 clang::driver::Driver::ExecuteCompilation(clang::driver::Compilation&, llvm::SmallVectorImpl<std::__1::pair<int, clang::driver::Command const*> >&) (/opt/intel/oneapi/compiler/2021.3.0/linux/bin/clang+0x34b2ec9)
#29 0x000055d310024e39 main (/opt/intel/oneapi/compiler/2021.3.0/linux/bin/clang+0x34a9e39)
#30 0x000014ed6a154b75 (/usr/lib64/libc.so.6+0x27b75)
#31 0x000055d3130f7c78 _start (/opt/intel/oneapi/compiler/2021.3.0/linux/bin/clang+0x657cc78)
clang: error: clang frontend command failed with exit code 70 (use -v to see invocation)
Intel(R) oneAPI DPC++/C++ Compiler 2021.3.0 (2021.3.0.20210619)
Target: x86_64-unknown-linux-gnu
Thread model: posix

0 Kudos
4 Replies
ShivaniK_Intel
Moderator
549 Views

Hi,


Thanks for reaching out to us.


We are able to reproduce the error at our end. We are working on it and will get back to you soon.


Thanks & Regards

Shivani  


Sravani_K_Intel
Moderator
523 Views

Issue escalated to Engineering via CMPLRLLVM-29860



Sravani_K_Intel
Moderator
486 Views

Hi Vittorio,


What's the expected behavior here? The test also failed on GCC and ICC https://godbolt.org/z/T5bnWTWbY. It looks more like test case problem. A good example https://godbolt.org/z/Pfdx3vPPc


JyotsnaK_Intel
Moderator
365 Views

We have not heard back from you. This thread will no longer be monitored by Intel. If you need further assistance, please post a new question.

Reply