From 3c11e1af834f7768e14eac0473a346297f1c2a7d Mon Sep 17 00:00:00 2001 From: Jiong Wang Date: Wed, 18 May 2016 14:37:28 +0000 Subject: [PATCH] [Patch, lra] Guard in_class_p with REG_P check gcc/ PR rtl-optimization/71150 * lra-constraint (process_addr_reg): Guard "in_class_p" with REG_P check. From-SVN: r236396 --- gcc/ChangeLog | 6 ++++++ gcc/lra-constraints.c | 3 ++- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 731a7bd3a88..8d09b501d6b 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,9 @@ +2016-05-18 Jiong Wang + + PR rtl-optimization/71150 + * lra-constraint (process_addr_reg): Guard "in_class_p" with REG_P + check. + 2016-05-18 Michael Meissner PR target/70915 diff --git a/gcc/lra-constraints.c b/gcc/lra-constraints.c index 56ab5b45c17..e4e6c8c47eb 100644 --- a/gcc/lra-constraints.c +++ b/gcc/lra-constraints.c @@ -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); } -- 2.30.2