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: [PATCH][ARM] Fix PR 65955: Do not take REGNO on non-REG operand in movcond_addsi




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


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