[ARM] PR target/49030: ICE in get_arm_condition_code
Richard Earnshaw
rearnsha@arm.com
Wed Sep 7 10:55:00 GMT 2011
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.
More information about the Gcc-patches
mailing list