This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: Questions about i386 redundant test and comparison removal
- To: john at feith dot com (John Wehle)
- Subject: Re: Questions about i386 redundant test and comparison removal
- From: Jeffrey A Law <law at cygnus dot com>
- Date: Sat, 06 Jun 1998 00:21:06 -0600
- cc: egcs at cygnus dot com
- Reply-To: law at cygnus dot com
In message <199806052349.TAA04390@jwlab.FEITH.COM>you write:
> > What does SET_DEST (exp) have to do with setting cc0?
>
> Okay, I think I've figured out part of the answer. Recording
> SET_DEST (exp) probably allows us to later notice that:
consider a machine where memory loads do not set cc0, but
an add or subtract does set them in some useful manner.
(set (regx) (plus ...)) Would record regx & the status bits that
are useful after a plus.
[ ... stuff that doesn't scrog cc0 ]
(set (regx) (load from memory)
(set (cc0) (regx))
conditional branch
If you don't track the SET_DESTs and invalidate known cc0 status
at the second set of regx, then you may end up deleting the
(set (cc0)) instruction even though it is not redundant.
jeff