This is the mail archive of the gcc-patches@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]

Re: [patches] Re: convert jump.c, ifcvt.c, cse.c and simplify-rtx.c to new fp conditionals


> > 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.


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