From: Kyrylo Tkachov Date: Thu, 14 May 2015 13:16:32 +0000 (+0000) Subject: [ARM] Fix PR 65955: Do not take REGNO on non-REG operand in movcond_addsi X-Git-Tag: releases/gcc-4.9.3~149 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=d5ac7e56d2f4402d9fed35a31aefd978a9b43343;p=thirdparty%2Fgcc.git [ARM] Fix PR 65955: Do not take REGNO on non-REG operand in movcond_addsi Backport from mainline 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. From-SVN: r223195 --- diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 96ec517a2ed8..62dbdd26f7bc 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,12 @@ +2015-05-14 Kyrylo Tkachov + + Backport from mainline + 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 Andreas Krebbel * config/s390/2827.md: Split zEC12_simple into zEC12_simple_int diff --git a/gcc/config/arm/arm.md b/gcc/config/arm/arm.md index 93b25e99c5b3..7ca816218a67 100644 --- a/gcc/config/arm/arm.md +++ b/gcc/config/arm/arm.md @@ -10942,7 +10942,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 {