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]

Re: Questions about i386 redundant test and comparison removal



> > Tracking SET_DESTs does allow for noticing that set cc0 is redundant in
> > the example below:
> > 
> > (set (regx) (plus ...))
> > 
> > (set (cc0) (regx))
> Right.  Now imagine that  there's an insn which sets "regx" between
> those instructions, but does not set cc0.
> 
> The compiler may believe the (set (cc0) (regx)) is redundant, when
> in fact it is not redundant.

In this situation regx is a SET_DEST.  If I'm not tracking SET_DESTs
then why would the compiler ever think that (set (cc0) (regx)) is
redundant?  I'm not saying that we shouldn't track SET_DESTs, I'm just
trying to make sure I understand what's going on. :-)

-- John
-------------------------------------------------------------------------
|   Feith Systems  |   Voice: 1-215-646-8000  |  Email: john@feith.com  |
|    John Wehle    |     Fax: 1-215-540-5495  |                         |
-------------------------------------------------------------------------



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