This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: Clean up MIPS branch handling, fix mips-ps-*.c failures
- From: Adam Nemet <anemet at caviumnetworks dot com>
- To: gcc-patches at gcc dot gnu dot org
- Cc: echristo at apple dot com, rsandifo at nildram dot co dot uk
- Date: Thu, 09 Mar 2006 10:54:05 -0800
- Subject: Re: Clean up MIPS branch handling, fix mips-ps-*.c failures
- References: <87u0a75xao.fsf@talisman.home>
Richard Sandiford <richard@codesourcery.com> writes:
> I also checked the before-and-after output of gcc.c-torture and
> gcc.dg using -O2 -mbranch-likely. There were differences in 21
> files because of the VOIDmode stuff, which changes the way
> simplify_relational_operation_1 handles (eq foo (const_int 0)) and
> (ne foo (const_int 0)). Some of the differences were improvements,
> some were degredations, but I think the overall effect was a wash.
Funny, I was debugging the same thing yesterday because I too was
trying to remove the mode from comparisons when we expand conditional
branches and these showed up as local performance-regressions. One
thing I found was that because of the VOIDmode check in
simplify_relational_operation we don't run
simplify_relational_operation_1 in some cases and in turn fail to do
this simplification:
(if_then_else (eq (plus:SI (reg:SI 4) -1) -1) ...)
-> (if_then_else (eq (reg:SI 4) 0) ...)
where the result would have been a valid insn. I will look into this
more after your patch is checked in. Thanks very much for your work.
Adam