[LLVMbugs] [Bug 6103] New: Simple Register Coalescing assert failure: invalid register-register move instruction

bugzilla-daemon at cs.uiuc.edu bugzilla-daemon at cs.uiuc.edu
Thu Jan 21 07:22:21 PST 2010


http://llvm.org/bugs/show_bug.cgi?id=6103

           Summary: Simple Register Coalescing assert failure: invalid
                    register-register move instruction
           Product: new-bugs
           Version: unspecified
          Platform: PC
        OS/Version: Linux
            Status: NEW
          Severity: normal
          Priority: P2
         Component: new bugs
        AssignedTo: unassignedbugs at nondot.org
        ReportedBy: baldrick at free.fr
                CC: llvmbugs at cs.uiuc.edu


$ llc crash.bc
llc: llvm/lib/Target/X86/X86InstrInfo.cpp:706: virtual bool
llvm::X86InstrInfo::isMoveInstr(const llvm::MachineInstr&, unsigned int&,
unsigned int&, unsigned int&, unsigned int&) const: Assertion
`MI.getNumOperands() >= 2 && MI.getOperand(0).isReg() &&
MI.getOperand(1).isReg() && "invalid register-register move instruction"'
failed.
...
6  llc       0x00000000010b314f
llvm::X86InstrInfo::isMoveInstr(llvm::MachineInstr const&, unsigned int&,
unsigned int&, unsigned int&, unsigned int&) const + 535
7  llc       0x00000000013d5105
llvm::LiveIntervals::getVNInfoSourceReg(llvm::VNInfo const*) const + 519
8  llc       0x000000000135205b
llvm::SimpleRegisterCoalescing::JoinIntervals(llvm::LiveInterval&,
llvm::LiveInterval&, bool&) + 2901
9  llc       0x000000000134febc
llvm::SimpleRegisterCoalescing::JoinCopy(llvm::CopyRec&, bool&) + 6760
10 llc       0x0000000001353114
llvm::SimpleRegisterCoalescing::CopyCoalesceInMBB(llvm::MachineBasicBlock*,
std::vector<llvm::CopyRec, std::allocator<llvm::CopyRec> >&) + 1240
11 llc       0x0000000001353482 llvm::SimpleRegisterCoalescing::joinIntervals()
+ 624
...
1.      Running pass 'Simple Register Coalescing' on function '@f'
Aborted (core dumped)


Testcase:

; ModuleID = 'crash.bc'
target datalayout =
"e-p:64:64:64-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:64:64-f32:32:32-f64:64:64-v64:64:64-v128:128:128-a0:0:64-s0:64:64-f80:128:128-n8:16:32:64"
target triple = "x86_64-unknown-linux-gnu"

declare void @use(i32, i64)

define fastcc void @f(i64 %a, i64 %b) {
E:
  br label %A

A:                                                ; preds = %A, %E
  %0 = phi i31 [ 1, %E ], [ 0, %A ]               ; <i31> [#uses=1]
  %1 = sext i31 %0 to i64                         ; <i64> [#uses=1]
  call void @use(i32 0, i64 %1) nounwind
  br label %A
}


-- 
Configure bugmail: http://llvm.org/bugs/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.



More information about the llvm-bugs mailing list