[ARM] Fix PR 65955: Do not take REGNO on non-REG operand in movcond_addsi

PR target/65955
	* config/arm/arm.md (movcond_addsi): Check that operands[2] is a
	REG before taking its REGNO.

From-SVN: r223049
This commit is contained in:
Kyrylo Tkachov 2015-05-12 09:15:09 +00:00 committed by Kyrylo Tkachov
parent 8d1fe980a2
commit 0d780006d4
2 changed files with 7 additions and 1 deletions

View File

@ -1,3 +1,9 @@
2015-05-12 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.
2015-05-12 Thomas Preud'homme <thomas.preudhomme@arm.com>
* combine.c i(set_nonzero_bits_and_sign_copies): Split code updating

View File

@ -9323,7 +9323,7 @@
enum rtx_code rc = GET_CODE (operands[5]);
operands[6] = gen_rtx_REG (mode, CC_REGNUM);
gcc_assert (!(mode == CCFPmode || mode == CCFPEmode));
if (REGNO (operands[2]) != REGNO (operands[0]))
if (!REG_P (operands[2]) || REGNO (operands[2]) != REGNO (operands[0]))
rc = reverse_condition (rc);
else
std::swap (operands[1], operands[2]);