This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: Use cbranch optabs in ifcvt.c
- From: Jeff Law <law at redhat dot com>
- To: gcc-patches at gcc dot gnu dot org, richard dot sandiford at arm dot com
- Date: Mon, 24 Aug 2015 10:49:12 -0600
- Subject: Re: Use cbranch optabs in ifcvt.c
- Authentication-results: sourceware.org; auth=none
- References: <87oahx6igk dot fsf at e105548-lin dot cambridge dot arm dot com>
On 08/24/2015 05:20 AM, Richard Sandiford wrote:
Similarly to the patch for cmpstr(n), this patch uses the optabs
interface for cbranchcc4 instead of using HAVE_cbranchcc4 directly.
I've cached the result in a pass-local variable (valid only for
the duration of the pass).
The references to incscc and decscc are dead. The only reference
to them in the documentation is:
Some machines can also perform @code{and} or @code{plus} operations on
condition code values with less instructions than the corresponding
@samp{cstore@var{mode}4} insn followed by @code{and} or @code{plus}. On those
machines, define the appropriate patterns. Use the names @code{incscc}
and @code{decscc}, respectively, for the patterns which perform
@code{plus} or @code{minus} operations on condition code values. See
@file{rs6000.md} for some examples. The GNU Superoptimizer can be used to
find such instruction sequences on other machines.
which is in tm.texi rather than md.texi. This seems hopelessly out of
date, not least because rs6000.md has no incscc or decscc patterns.
If the "appropriate patterns" are just combine patterns, perhaps we
should just delete the whole paragraph?
I think the whole paragraph should just go away. We don't do anything
with those special patterns anymore. The PA still defines them, but
they're just combiner patterns in the end.
Tested on x86_64-linux-gnu. OK to install?
Thanks,
Richard
gcc/
* ifcvt.c (HAVE_incscc, HAVE_decscc, HAVE_cbranchcc4): Delete.
(have_cbranchcc4): New variable.
(cc_in_cond, noce_emit_cmove, noce_get_alt_condition)
(noce_get_condition): Use it instead of HAVE_cbranchcc4.
(if_convert): Initialize have_cbranchcc4.
OK.
jeff