This is the mail archive of the gcc-patches@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: Resend: reorder conditionals in i386.md


Zack said:

> rearranges a lot of guard expressions in i386.md such that constant
> sub- expressions such as "TARGET_64BIT" appear first.  When the
> subexpression is compile-time false, the optimizer can then discard
> the entire expression

Isn't that pandering to a weak optimizer?   

If we really can do something different with
	if (0 && TARGET_80386)
than we can with
	if (TARGET_80386 && 0)
(where the '0' comes from cpp in specific cases and isn't, of course, 
quite so obvious as I'm making it sound) haven't we left an optimization 
on the table?

Interestingly, if the '0' is a const int expression, we don't appear to
know that these are as unreachable as if they're a zero right in the
expression...

RJL


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