From 22440aeb56d583759e2cfb8e1dd3bdb3d2101354 Mon Sep 17 00:00:00 2001 From: ktkachov Date: Tue, 12 May 2015 09:15:09 +0000 Subject: [PATCH] [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. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@223049 138bc75d-0d04-0410-961f-82ee72b054a4 --- gcc/ChangeLog | 6 ++++++ gcc/config/arm/arm.md | 2 +- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 0af90650f64..da57c959524 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,9 @@ +2015-05-12 Kyrylo Tkachov + + 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 * combine.c i(set_nonzero_bits_and_sign_copies): Split code updating diff --git a/gcc/config/arm/arm.md b/gcc/config/arm/arm.md index 3dd5f961933..adbb83fd889 100644 --- a/gcc/config/arm/arm.md +++ b/gcc/config/arm/arm.md @@ -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]); -- 2.11.4.GIT