This is the mail archive of the gcc@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]
Other format: [Raw text]

Re: If-conversion and conditional move.


Have a look at MIPS. They only support the same two conditional moves, but
the define_expand does not fail on the rest, but rather generates a compare
for the other cases and then conditionally moves.

Jonah


----- Original Message -----
From: "Dan Towner" <dant@picochip.com>
To: <gcc@gcc.gnu.org>
Sent: Tuesday, May 06, 2003 3:29 PM
Subject: If-conversion and conditional move.


> Hi all,
>
> I have recently been adding conditional move instructions to a GCC port
> for a 16-bit DSP (i.e., movhicc, etc.). The DSP only supports
> move-on-equals and move-on-not-equals, not the whole variety of LE, GT,
> LEU, and so on. The movhicc pattern itself is written to fail if an
> attempt is  made to generate a conditional move using an unsupported
> comparison, but the if-conversion code (ifcvt.c) doesn't seem to check
> that a valid comparison is used. For example, if a simple code block is
> found with a GT comparison controlling entry, the if-conversion code
> attempts to generate a conditional move for a GT comparison, which isn't
> supported. However, rather than giving up, and not performing the
> conversion, the if-conversion code aborts instead.
>
> What is the easiest way to go about solving this problem?
>    1) change the abort to allow graceful failure, with
>       fallback to using branches
>    2) prevent the if-conversion from even being attempted when an
>       unsupported comparison is used?
>
> thanks,
>
> dan.
>
>
============================================================================
=
> Daniel Towner
> picoChip Designs Ltd., Riverside Buildings, 108, Walcot Street, BATH,
> BA1 5BG
> dant@picochip.com
> 07786 702589
>


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