[LLVMdev] implicit CC register Defs cause "physreg was not killed in defining block!" assert

Christian Sayer Christian.Sayer at dibcom.fr
Fri Jan 9 02:50:57 PST 2009


Hello,

For my backend, I define and use a CC register similiarly to the EFLAGS register in X86 (I call it CCFLAGS).
But if I make all arithmetic/logic instructions affect it ('let Defs = [CCFLAGS] in...' in InstrInfo.td) I run into

  // The only case we should have a dead physreg here without a killing or
  // instruction where we know it's dead is if it is live-in to the function
  // and never used.
  assert(!CopyMI && "physreg was not killed in defining block!");

in LiveIntervals::handlePhysicalRegisterDef().

The dump() of the MBB from the debugger looks like the following:

entry.ifcont267_crit_edge: 0x12bc368, LLVM BB @0x12bb900, ID#2:
    Predecessors according to CFG: 0x12bc290 (#0) 0x12bca70 (#1)
        %reg1033<def> = addC %reg1025<kill>, 0, %CCFLAGS<imp-def,dead>
        %reg1032<def> = addC %reg1024<kill>, 0, %CCFLAGS<imp-def,dead>
        %reg1095<def> = addC %reg1028, 0, %CCFLAGS<imp-def>
        %reg1096<def> = addC %reg1029<kill>, 0, %CCFLAGS<imp-def>
        %reg1097<def> = addC %reg1033<kill>, 0, %CCFLAGS<imp-def>
        %reg1098<def> = addC %reg1028<kill>, 0, %CCFLAGS<imp-def>
        %reg1099<def> = addC %reg1031<kill>, 0, %CCFLAGS<imp-def>
        %reg1100<def> = addC %reg1030, 0, %CCFLAGS<imp-def>
        %reg1101<def> = addC %reg1032<kill>, 0, %CCFLAGS<imp-def>
        %reg1102<def> = addC %reg1030<kill>, 0, %CCFLAGS<imp-def>
        br mbb<ifcont267,0x12bc518>
    Successors according to CFG: 0x12bc518 (#4)



Do you have any idea what could be wrong, or how to further debug the problem?

Thanks a lot,
Christian


 --







sorry about that, but there is nothing I can do about it:

CONFIDENTIAL NOTICE: The contents of this message, including any attachments, are confidential and are intended solely for the use of the person or entity to whom the message was addressed. If you are not the intended recipient of this message, please be advised that any dissemination, distribution, or use of the contents of this message is strictly prohibited. If you received this message in error, please notify the sender. Please also permanently delete all copies of the original message and any attached documentation. Thank you.




More information about the llvm-dev mailing list