aboutsummaryrefslogtreecommitdiff
path: root/gcc/ifcvt.c
diff options
context:
space:
mode:
authorJakub Jelinek <jakub@gcc.gnu.org>2013-03-05 23:25:43 +0100
committerJakub Jelinek <jakub@gcc.gnu.org>2013-03-05 23:25:43 +0100
commit7ead14d420b671bbc3e3eff8976fa80b09a7766b (patch)
tree0859b99a62412f9160eef192b41558a061831d2d /gcc/ifcvt.c
parentee61ea3844e8deee83cee22e037b15339f823171 (diff)
downloadgcc-7ead14d420b671bbc3e3eff8976fa80b09a7766b.zip
gcc-7ead14d420b671bbc3e3eff8976fa80b09a7766b.tar.gz
gcc-7ead14d420b671bbc3e3eff8976fa80b09a7766b.tar.bz2
re PR rtl-optimization/56484 (ICE in assign_by_spills, at lra-assigns.c:1268)
PR rtl-optimization/56484 * ifcvt.c (noce_process_if_block): If else_bb is NULL, avoid extending lifetimes of hard registers on small register class machines. From-SVN: r196478
Diffstat (limited to 'gcc/ifcvt.c')
-rw-r--r--gcc/ifcvt.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/gcc/ifcvt.c b/gcc/ifcvt.c
index dd94100..f081ecd 100644
--- a/gcc/ifcvt.c
+++ b/gcc/ifcvt.c
@@ -2491,6 +2491,12 @@ noce_process_if_block (struct noce_if_info *if_info)
|| ! noce_operand_ok (SET_SRC (set_b))
|| reg_overlap_mentioned_p (x, SET_SRC (set_b))
|| modified_between_p (SET_SRC (set_b), insn_b, jump)
+ /* Avoid extending the lifetime of hard registers on small
+ register class machines. */
+ || (REG_P (SET_SRC (set_b))
+ && HARD_REGISTER_P (SET_SRC (set_b))
+ && targetm.small_register_classes_for_mode_p
+ (GET_MODE (SET_SRC (set_b))))
/* Likewise with X. In particular this can happen when
noce_get_condition looks farther back in the instruction
stream than one might expect. */