[Patch, lra] Guard in_class_p with REG_P check
authorJiong Wang <jiong.wang@arm.com>
Wed, 18 May 2016 14:37:28 +0000 (14:37 +0000)
committerJiong Wang <jiwang@gcc.gnu.org>
Wed, 18 May 2016 14:37:28 +0000 (14:37 +0000)
gcc/

PR rtl-optimization/71150
* lra-constraint (process_addr_reg): Guard "in_class_p" with REG_P
check.

From-SVN: r236396

gcc/ChangeLog
gcc/lra-constraints.c

index 731a7bd3a88575a33e2cceab363043ec11f674ec..8d09b501d6b181d247c6c956285ab531b3621174 100644 (file)
@@ -1,3 +1,9 @@
+2016-05-18  Jiong Wang  <jiong.wang@arm.com>
+
+       PR rtl-optimization/71150
+       * lra-constraint (process_addr_reg): Guard "in_class_p" with REG_P
+       check.
+
 2016-05-18  Michael Meissner  <meissner@linux.vnet.ibm.com>
 
        PR target/70915
index 56ab5b45c17cdfebe0593834111cc9e4f7f69a0c..e4e6c8c47eb5738de935b9870013482a5771c1c1 100644 (file)
@@ -1317,7 +1317,8 @@ process_addr_reg (rtx *loc, bool check_only_p, rtx_insn **before, rtx_insn **aft
         register, and this normally will be a subreg which should be reloaded
         as a whole.  This is particularly likely to be triggered when
         -fno-split-wide-types specified.  */
-      if (in_class_p (reg, cl, &new_class)
+      if (!REG_P (reg)
+         || in_class_p (reg, cl, &new_class)
          || GET_MODE_SIZE (mode) <= GET_MODE_SIZE (ptr_mode))
        loc = &SUBREG_REG (*loc);
     }