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]

Re: gcc/1532: Redundant compare instructions on i386


In message <20040121074430.GA11819@redhat.com>, Richard Henderson writes:
 >On Tue, Jan 20, 2004 at 11:28:42PM -0700, law@redhat.com wrote:
 >> I won't be able to run through a regression test tonight (already got
 >> something running), but I'll do it tomorrow.  I don't expect any problems.
 >
 >Note that this doesn't directly address the PR, since 
 >
 >    if (i == j) goto <L9>; else goto <L1>;
 >  <L1>:;
 >    if (i > j) goto <L2>; else goto <L10>;
 >
 >can be done with just one compare insn.  So there's
 >still room for something like what Ian's proposing.
Certainly -- I was just pointing out that there was some obvious 
lameness in how this code was handled by the tree-ssa optimizers.

My changes certainly won't fix the problem Ian is trying to resolve.
They merely make the switch statement disappear before we drop from
trees down to RTL.  Ian's changes (or something similar) are still
necessary to kill the redundant compare.


jeff


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