<html>
    <head>
      <base href="https://bugs.llvm.org/">
    </head>
    <body><table border="1" cellspacing="0" cellpadding="8">
        <tr>
          <th>Bug ID</th>
          <td><a class="bz_bug_link 
          bz_status_NEW "
   title="NEW - error: couldn't allocate output register for constraint '{rsp}' at line 2148942589"
   href="https://bugs.llvm.org/show_bug.cgi?id=47568">47568</a>
          </td>
        </tr>

        <tr>
          <th>Summary</th>
          <td>error: couldn't allocate output register for constraint '{rsp}' at line 2148942589
          </td>
        </tr>

        <tr>
          <th>Product</th>
          <td>tools
          </td>
        </tr>

        <tr>
          <th>Version</th>
          <td>11.0
          </td>
        </tr>

        <tr>
          <th>Hardware</th>
          <td>PC
          </td>
        </tr>

        <tr>
          <th>OS</th>
          <td>Linux
          </td>
        </tr>

        <tr>
          <th>Status</th>
          <td>NEW
          </td>
        </tr>

        <tr>
          <th>Severity</th>
          <td>enhancement
          </td>
        </tr>

        <tr>
          <th>Priority</th>
          <td>P
          </td>
        </tr>

        <tr>
          <th>Component</th>
          <td>llc
          </td>
        </tr>

        <tr>
          <th>Assignee</th>
          <td>unassignedbugs@nondot.org
          </td>
        </tr>

        <tr>
          <th>Reporter</th>
          <td>pfeng4@gmu.edu
          </td>
        </tr>

        <tr>
          <th>CC</th>
          <td>llvm-bugs@lists.llvm.org
          </td>
        </tr></table>
      <p>
        <div>
        <pre>When I want to generate the assembly file of "arch/x86/kernel/cpu/bugs.c", this
file is first compiled into IR file "arch/x86/kernel/cpu/bugs.ll", and next the
IR files is translated into assembly file by llc.

Then I enter the following errors:

<span class="quote">> llc -march=x86 arch/x86/kernel/cpu/bugs.ll -o arch/x86/kernel/cpu/bugs.ll.o</span >
<inline asm>:1:8: error: invalid operand for instruction
         btq  %ecx,(%eax)
              ^~~~
note: !srcloc = 2148111198
<inline asm>:1:8: error: invalid operand for instruction
         btq  %ecx,(%eax)
              ^~~~
note: !srcloc = 2148111198
error: couldn't allocate output register for constraint '{rsp}' at line
2148942589
LLVM ERROR: Do not know how to expand the result of this operator!

Stack dump:
0.      Program arguments: llc -march=x86 arch/x86/kernel/cpu/bugs.ll -o
arch/x86/kernel/cpu/bugs.ll.o
1.      Running pass 'Function Pass Manager' on module
'arch/x86/kernel/cpu/bugs.ll'.
2.      Running pass 'X86 DAG->DAG Instruction Selection' on function
'@paravirt_read_msr'
 #0 0x0000562817594dfa llvm::sys::PrintStackTrace(llvm::raw_ostream&)
(/usr/local/bin/llc+0x1938dfa)
 #1 0x0000562817592ba4 llvm::sys::RunSignalHandlers()
(/usr/local/bin/llc+0x1936ba4)
 #2 0x0000562817592cf3 SignalHandler(int) (/usr/local/bin/llc+0x1936cf3)
 #3 0x00007f99bde798a0 __restore_rt
(/lib/x86_64-linux-gnu/libpthread.so.0+0x128a0)
 #4 0x00007f99bcb2af47 raise (/lib/x86_64-linux-gnu/libc.so.6+0x3ef47)
 #5 0x00007f99bcb2c8b1 abort (/lib/x86_64-linux-gnu/libc.so.6+0x408b1)
 #6 0x000056281750dd36 llvm::report_fatal_error(llvm::Twine const&, bool)
(/usr/local/bin/llc+0x18b1d36)
 #7 0x000056281750de58 (/usr/local/bin/llc+0x18b1e58)
 #8 0x00005628174c912d
llvm::DAGTypeLegalizer::ExpandIntegerResult(llvm::SDNode*, unsigned int)
(/usr/local/bin/llc+0x186d12d)
 #9 0x0000562817456485 llvm::DAGTypeLegalizer::run()
(/usr/local/bin/llc+0x17fa485)
#10 0x0000562817456c4e llvm::SelectionDAG::LegalizeTypes()
(/usr/local/bin/llc+0x17fac4e)
#11 0x00005628173f6330 llvm::SelectionDAGISel::CodeGenAndEmitDAG()
(/usr/local/bin/llc+0x179a330)
#12 0x00005628173fa6fb
llvm::SelectionDAGISel::SelectAllBasicBlocks(llvm::Function const&)
(/usr/local/bin/llc+0x179e6fb)
#13 0x00005628173fc7bd
llvm::SelectionDAGISel::runOnMachineFunction(llvm::MachineFunction&)
(.part.825) (/usr/local/bin/llc+0x17a07bd)
#14 0x000056281635eb48 (anonymous
namespace)::X86DAGToDAGISel::runOnMachineFunction(llvm::MachineFunction&)
(/usr/local/bin/llc+0x702b48)
#15 0x0000562816b228b8
llvm::MachineFunctionPass::runOnFunction(llvm::Function&)
(/usr/local/bin/llc+0xec68b8)
#16 0x0000562816ec804f llvm::FPPassManager::runOnFunction(llvm::Function&)
(/usr/local/bin/llc+0x126c04f)
#17 0x0000562816ec8741 llvm::FPPassManager::runOnModule(llvm::Module&)
(/usr/local/bin/llc+0x126c741)
#18 0x0000562816ec7281 llvm::legacy::PassManagerImpl::run(llvm::Module&)
(/usr/local/bin/llc+0x126b281)
#19 0x000056281606816f main (/usr/local/bin/llc+0x40c16f)
#20 0x00007f99bcb0db97 __libc_start_main
(/lib/x86_64-linux-gnu/libc.so.6+0x21b97)
#21 0x00005628160cda2a _start (/usr/local/bin/llc+0x471a2a)
Aborted (core dumped)</pre>
        </div>
      </p>


      <hr>
      <span>You are receiving this mail because:</span>

      <ul>
          <li>You are on the CC list for the bug.</li>
      </ul>
    </body>
</html>