This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: gcc/1532: Redundant compare instructions on i386
- From: law at redhat dot com
- To: Richard Henderson <rth at redhat dot com>
- Cc: Ian Lance Taylor <ian at wasabisystems dot com>, gcc at gcc dot gnu dot org
- Date: Wed, 21 Jan 2004 00:46:23 -0700
- Subject: Re: gcc/1532: Redundant compare instructions on i386
- Reply-to: law at redhat dot com
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