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