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]
Other format: [Raw text]

Re: [ARM] PR target/49030: ICE in get_arm_condition_code


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.


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