This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [ARM] PR target/49030: ICE in get_arm_condition_code
- From: Richard Earnshaw <rearnsha at arm dot com>
- To: gcc-patches at gcc dot gnu dot org, richard dot sandiford at linaro dot org
- Date: Wed, 07 Sep 2011 11:48:14 +0100
- Subject: Re: [ARM] PR target/49030: ICE in get_arm_condition_code
- References: <g462lb9een.fsf@richards-thinkpad.stglab.manchester.uk.ibm.com>
On 02/09/11 16:01, Richard Sandiford wrote:
> CC_NCV rightly only allows GE(U) and LT(U). GT(U) and LE(U) have to
> implemented by reversing the condition. This is handled correctly when
> the condition is first expanded, but nothing stops later optimisers from
> producing invalid forms.
>
> This patch makes arm_comparison_operator check that the condition
> is acceptable. Tested on arm-linux-gnueabi. OK to install?
>
> Richard
>
>
> gcc/
> * config/arm/arm-protos.h (maybe_get_arm_condition_code): Declare.
> * config/arm/arm.c (maybe_get_arm_condition_code): New function,
> reusing the old code from get_arm_condition_code. Return ARM_NV
> for invalid comparison codes.
> (get_arm_condition_code): Redefine in terms of
> maybe_get_arm_condition_code.
> * config/arm/predicates.md (arm_comparison_operator): Use
> maybe_get_arm_condition_code.
>
> gcc/testsuite/
> * gcc.dg/torture/pr49030.c: New test.
OK.
R.