This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Use-and-clobber insns and REG_DEAD notes


Hello,

I'm trying to implement an add-with-carry insn and running 
into a problem because the my pattern both uses and clobbers
(not sets!) the condition code register.

There appears to be confusion how such insns are supposed to
be treated w.r.t. REG_DEAD notes.  Should there be one for
the CC register in such an insn or not?  For use-and-set
patterns it is clear that there will be no REG_DEAD note
(only the REG_UNUSED note).  However, for use-and-clobber
patterns there is a discrepancy (which causes an assertion
failure in the scheduler later on):

flow.c generates a REG_DEAD note for that insn (and a 
REG_UNUSED note as well).  However, when some other insn 
is combined into it, combine.c thinks it does not need to 
distribute the REG_DEAD note into the insn (because 
dead_or_set_p returns true), so after combine the note 
is gone.

Which of the two is right?

Bye,
Ulrich

-- 
  Dr. Ulrich Weigand
  weigand@informatik.uni-erlangen.de


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]