[llvm-bugs] [Bug 49729] New: 8-bit H register can not be copied outside GR8_NOREX

via llvm-bugs llvm-bugs at lists.llvm.org
Thu Mar 25 17:44:19 PDT 2021


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

            Bug ID: 49729
           Summary: 8-bit H register can not be copied outside GR8_NOREX
           Product: libraries
           Version: trunk
          Hardware: PC
                OS: All
            Status: NEW
          Severity: normal
          Priority: P
         Component: Backend: X86
          Assignee: unassignedbugs at nondot.org
          Reporter: simonas+llvm.org at kazlauskas.me
                CC: craig.topper at gmail.com, llvm-bugs at lists.llvm.org,
                    llvm-dev at redking.me.uk, pengfei.wang at intel.com,
                    spatel+llvm at rotateright.com

; RUN: llc -mtriple=x86_64 < %s
define dso_local void @main(i64* %arg) unnamed_addr {
  %a = tail call { i64, i8 } asm "", "={bx},={ah}"()
  %_4.0 = extractvalue { i64, i8 } %a, 0
  %_4.1 = extractvalue { i64, i8 } %a, 1
  store i64 %_4.0, i64* %arg
  %1 = xor i8 %_4.1, 0
  call void @banana()
  %_30.not = icmp eq i8 %1, 64
  br i1 %_30.not, label %bb7, label %bb6

bb6:
  unreachable

bb7:
  unreachable
}

declare dso_local void @banana() unnamed_addr

---

llc: llvm/lib/Target/X86/X86InstrInfo.cpp:3464: virtual void
llvm::X86InstrInfo::copyPhysReg(llvm::MachineBasicBlock &,
MachineBasicBlock::iterator, const llvm::DebugLoc &, llvm::MCRegister,
llvm::MCRegister, bool) const: Assertion
`X86::GR8_NOREXRegClass.contains(SrcReg, DestReg) && "8-bit H register can not
be copied outside GR8_NOREX"' failed.
PLEASE submit a bug report to https://bugs.llvm.org/ and include the crash
backtrace.
Stack dump:
0.      Program arguments: build/bin/llc bugpoint-reduced-simplified.ll
-mtriple=x86_64
1.      Running pass 'Function Pass Manager' on module
'bugpoint-reduced-simplified.ll'.
2.      Running pass 'Post-RA pseudo instruction expansion pass' on function
'@main'

 #8 0x000000000090160a llvm::TargetRegisterClass::contains(llvm::Register,
llvm::Register) const llvm/include/llvm/CodeGen/TargetRegisterInfo.h:105:12
 #9 0x000000000090160a
llvm::X86InstrInfo::copyPhysReg(llvm::MachineBasicBlock&,
llvm::MachineInstrBundleIterator<llvm::MachineInstr, false>, llvm::DebugLoc
const&, llvm::MCRegister, llvm::MCRegister, bool) const
llvm/lib/Target/X86/X86InstrInfo.cpp:3468:30
#10 0x0000000000cbcb50 (anonymous
namespace)::ExpandPostRA::LowerCopy(llvm::MachineInstr*)
llvm/lib/CodeGen/ExpandPostRAPseudos.cpp:169:28
#11 0x0000000000cbcb50 (anonymous
namespace)::ExpandPostRA::runOnMachineFunction(llvm::MachineFunction&)
llvm/lib/CodeGen/ExpandPostRAPseudos.cpp:214:23
#12 0x0000000000d9b77d
llvm::MachineFunctionPass::runOnFunction(llvm::Function&)
llvm/lib/CodeGen/MachineFunctionPass.cpp:0:13
#13 0x00000000011a40c5 llvm::FPPassManager::runOnFunction(llvm::Function&)
llvm/lib/IR/LegacyPassManager.cpp:1439:27
#14 0x00000000011aab88 llvm::FPPassManager::runOnModule(llvm::Module&)
llvm/lib/IR/LegacyPassManager.cpp:1485:13
#15 0x00000000011a4789 (anonymous
namespace)::MPPassManager::runOnModule(llvm::Module&)
llvm/lib/IR/LegacyPassManager.cpp:0:27
#16 0x00000000011a4789 llvm::legacy::PassManagerImpl::run(llvm::Module&)
llvm/lib/IR/LegacyPassManager.cpp:542:44
#17 0x00000000006c56d1 compileModule(char**, llvm::LLVMContext&)
llvm/tools/llc/llc.cpp:690:49
#18 0x00000000006c56d1 main llvm/tools/llc/llc.cpp:388:22

-- 
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/20210326/cb562350/attachment.html>


More information about the llvm-bugs mailing list