[llvm-bugs] [Bug 49706] New: [llc] crashes with "Cannot emit physreg copy instruction"

via llvm-bugs llvm-bugs at lists.llvm.org
Tue Mar 23 18:26:24 PDT 2021


https://bugs.llvm.org/show_bug.cgi?id=49706

            Bug ID: 49706
           Summary: [llc] crashes with "Cannot emit physreg copy
                    instruction"
           Product: libraries
           Version: trunk
          Hardware: PC
                OS: Windows NT
            Status: NEW
          Severity: normal
          Priority: P
         Component: Common Code Generator Code
          Assignee: unassignedbugs at nondot.org
          Reporter: Wolfgang_Pieb at playstation.sony.com
                CC: llvm-bugs at lists.llvm.org

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
...

-- 
You are receiving this mail because:
You are on the CC list for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-bugs/attachments/20210324/6d24d988/attachment-0001.html>


More information about the llvm-bugs mailing list