From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 8648 invoked by alias); 7 Sep 2011 10:48:31 -0000 Received: (qmail 8610 invoked by uid 22791); 7 Sep 2011 10:48:30 -0000 X-SWARE-Spam-Status: No, hits=-2.3 required=5.0 tests=AWL,BAYES_00,RP_MATCHES_RCVD X-Spam-Check-By: sourceware.org Received: from cam-admin0.cambridge.arm.com (HELO cam-admin0.cambridge.arm.com) (217.140.96.50) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Wed, 07 Sep 2011 10:48:16 +0000 Received: from geoffrey.Emea.Arm.com (geoffrey.emea.arm.com [10.1.255.46]) by cam-admin0.cambridge.arm.com (8.12.6/8.12.6) with ESMTP id p87Aln11016062; Wed, 7 Sep 2011 11:47:49 +0100 (BST) Received: from cam-owa2.Emea.Arm.com ([10.1.105.18]) by geoffrey.Emea.Arm.com with Microsoft SMTPSVC(6.0.3790.3959); Wed, 7 Sep 2011 11:48:15 +0100 Received: from [10.1.67.65] ([10.1.255.212]) by cam-owa2.Emea.Arm.com with Microsoft SMTPSVC(6.0.3790.3959); Wed, 7 Sep 2011 11:48:14 +0100 Message-ID: <4E674BEE.1010401@arm.com> Date: Wed, 07 Sep 2011 10:55:00 -0000 From: Richard Earnshaw User-Agent: Mozilla/5.0 (X11; Linux i686 on x86_64; rv:6.0.1) Gecko/20110830 Thunderbird/6.0.1 MIME-Version: 1.0 To: gcc-patches@gcc.gnu.org, richard.sandiford@linaro.org Subject: Re: [ARM] PR target/49030: ICE in get_arm_condition_code References: In-Reply-To: Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 7bit X-IsSubscribed: yes Mailing-List: contact gcc-patches-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-patches-owner@gcc.gnu.org X-SW-Source: 2011-09/txt/msg00474.txt.bz2 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.