PPro patch for egcs

Jeffrey A Law law@cygnus.com
Fri Jun 5 23:25:00 GMT 1998


  In message < 199806052058.QAA03893@jwlab.FEITH.COM >you write:
  > >   > Does final.c only remove tests / comparisons against zero?
  > > Nope.  It can remove any instruction that sets cc0.
  > 
  > So can the following (contrived) code
  > 
  >   set a = 6
  >   set b = 5
  >   set c = MINUS a  b   sets CC_NO_OVERFLOW
  > 
  >   set cc0 = COMPARE a b
  >   set d IF_THEN_ELSE GE ...
  > 
  > get turned into
  > 
  >   set a = 6
  >   set b = 5
  >   set c = MINUS a  b   sets CC_NO_OVERFLOW
  > 
  >   set d IF_THEN_ELSE GE ...
It can if the port is set up to allow such optimizations.

However, most ports only handle removal of "tst" insns (compares
against zero).  I don't know what the x86 port is set up to optimize.

Jeff

PS. A "tst" insn looks like  (set (cc0) (reg/mem))




More information about the Gcc-patches mailing list