This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCH][ARM] Fix PR 65955: Do not take REGNO on non-REG operand in movcond_addsi
- From: Ramana Radhakrishnan <ramana dot radhakrishnan at arm dot com>
- To: Kyrill Tkachov <kyrylo dot tkachov at arm dot com>, GCC Patches <gcc-patches at gcc dot gnu dot org>
- Cc: Richard Earnshaw <Richard dot Earnshaw at arm dot com>
- Date: Tue, 12 May 2015 10:07:49 +0100
- Subject: Re: [PATCH][ARM] Fix PR 65955: Do not take REGNO on non-REG operand in movcond_addsi
- Authentication-results: sourceware.org; auth=none
- References: <55487DA8 dot 1050709 at arm dot com>
On 05/05/15 09:22, Kyrill Tkachov wrote:
Hi all,
As the PR says, the movcond_addsi pattern takes the REGNO of an operand that may be a CONST_INT.
The fix for that is rather simple (perhaps even obvious?).
Unfortunately the testcase is in ada, and I'm not sure how to integrate this into the testsuite.
Does anyone know how to add an ada testcase?
The patch that introduced this faulty check was added for GCC 5 and backported to 4.9, so this patch
should be backported everywhere as well.
I'll be testing it on those branches shortly.
Tested on arm-none-eabi. Bootstrapped on arm-none-linux-gnueabihf with arm and thumb default mode.
I think this is the right thing to do in any case since the current code is clearly doing the wrong
thing if operands[2] is a CONST_INT.
Ok for trunk?
Thanks,
Kyrill
P.S. I'm attaching the patch with a larger than usual context so that the definition of operands[2]
can be seen more clearly.
2015-05-05 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
PR target/65955
* config/arm/arm.md (movcond_addsi): Check that operands[2] is a
REG before taking its REGNO.
OK for trunk and all release branches if no regressions.
Sorry to have missed this email earlier.
Ramana