This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [patches] Re: convert jump.c, ifcvt.c, cse.c and simplify-rtx.c to new fp conditionals
- To: Jan Hubicka <jh at suse dot cz>
- Subject: Re: [patches] Re: convert jump.c, ifcvt.c, cse.c and simplify-rtx.c to new fp conditionals
- From: Richard Earnshaw <rearnsha at arm dot com>
- Date: Mon, 08 Jan 2001 13:57:05 +0000
- Cc: Richard Henderson <rth at redhat dot com>, patches at x86-64 dot org, gcc-patches at gcc dot gnu dot org
- Cc: rearnsha at arm dot com
- Organization: ARM Ltd.
- Reply-To: rearnsha at arm dot com
> > I'm not sure how you could do this, the restriction is specific to the
> > arm. Anyway, see arm_comparison_operator() in arm.c -- it just calls
> > comparison_operator and rejects the unhandled cases.
> Simply if the condition code is unsupported by target, it can FAIL;.
> Then the generic code can try to split comparison into
> ordered && test
> or the unordered || test
> respectivly.
Yes, you could do that, but I think it would complicate the flow graph.
On the ARM, it is possible to handle it with sequences like
LTGT
cmf f0, f1
bmi Lx
bgt Lx
UNEQ
cmf f0, f1
bvs Lx
beq Lx
The ARM md considers the two branch instructions in each of the above
sequences to be a single insn. The flow-graph remains natural since we
don't end up jumping around the second half of the sequence.
If the condition were to duplicated (as it would have to be for cc0 and
some other machines), you would end up repeating the comparison
instruction unnecessarily. It might be difficult to optimize that away
afterwards.