<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 - [llc] crashes with "Cannot emit physreg copy instruction""
   href="https://bugs.llvm.org/show_bug.cgi?id=49706">49706</a>
          </td>
        </tr>

        <tr>
          <th>Summary</th>
          <td>[llc] crashes with "Cannot emit physreg copy instruction"
          </td>
        </tr>

        <tr>
          <th>Product</th>
          <td>libraries
          </td>
        </tr>

        <tr>
          <th>Version</th>
          <td>trunk
          </td>
        </tr>

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

        <tr>
          <th>OS</th>
          <td>Windows NT
          </td>
        </tr>

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

        <tr>
          <th>Severity</th>
          <td>normal
          </td>
        </tr>

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

        <tr>
          <th>Component</th>
          <td>Common Code Generator Code
          </td>
        </tr>

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

        <tr>
          <th>Reporter</th>
          <td>Wolfgang_Pieb@playstation.sony.com
          </td>
        </tr>

        <tr>
          <th>CC</th>
          <td>llvm-bugs@lists.llvm.org
          </td>
        </tr></table>
      <p>
        <div>
        <pre>The following IR crashes with "Cannot emit physreg copy instruction" when
compiled with

llc -O0 -mcpu=btver2

The crash seems to happen as far back as llvm 6.0.

==================================================
define void @foo() {
BB:
  %A1 = alloca i1, align 1
  %L1 = load i1, i1* %A1, align 1
  %Cmp = icmp ugt <4 x i64> zeroinitializer, zeroinitializer
  br label %BB0

BB0:
  %Se = sext <4 x i1> %Cmp to <4 x i64>
  br label %BB1

BB1:
  %Sl = select i1 %L1, <4 x i64> %Se, <4 x i64> zeroinitializer
  ret void
}
===================================================
...
 #9 0x0000000001ade0f0 (anonymous
namespace)::ExpandPostRA::LowerCopy(llvm::MachineInstr*)
/home/test/src/llvm/git-monorepo/llvm-project/llvm/lib/CodeGen/ExpandPostRAPseudos.cpp:169:28
#10 0x0000000001ade0f0 (anonymous
namespace)::ExpandPostRA::runOnMachineFunction(llvm::MachineFunction&)
/home/test/src/llvm/git-monorepo/llvm-project/llvm/lib/CodeGen/ExpandPostRAPseudos.cpp:214:23
#11 0x0000000001ba6e9e
llvm::MachineFunctionPass::runOnFunction(llvm::Function&)
/home/test/src/llvm/git-monorepo/llvm-project/llvm/lib/CodeGen/MachineFunctionPass.cpp:0:13
#12 0x0000000001f6b158 llvm::FPPassManager::runOnFunction(llvm::Function&)
/home/test/src/llvm/git-monorepo/llvm-project/llvm/lib/IR/LegacyPassManager.cpp:1439:27
#13 0x0000000001f71a48 llvm::FPPassManager::runOnModule(llvm::Module&)
/home/test/src/llvm/git-monorepo/llvm-project/llvm/lib/IR/LegacyPassManager.cpp:1485:13
#14 0x0000000001f6b7f8 (anonymous
namespace)::MPPassManager::runOnModule(llvm::Module&)
/home/test/src/llvm/git-monorepo/llvm-project/llvm/lib/IR/LegacyPassManager.cpp:0:27
#15 0x0000000001f6b7f8 llvm::legacy::PassManagerImpl::run(llvm::Module&)
/home/test/src/llvm/git-monorepo/llvm-project/llvm/lib/IR/LegacyPassManager.cpp:542:44
#16 0x00000000007622a8 compileModule(char**, llvm::LLVMContext&)
/home/test/src/llvm/git-monorepo/llvm-project/llvm/tools/llc/llc.cpp:690:49
...</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>