From: Segher Boessenkool Date: Fri, 19 Sep 2014 16:42:26 +0000 (+0200) Subject: recog.c (scratch_operand): Do not simply allow all hard registers: only allow those... X-Git-Tag: releases/gcc-5.1.0~4562 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=f8fb3155820ca6cd39f2f7dbec796b399f705aa5;p=thirdparty%2Fgcc.git recog.c (scratch_operand): Do not simply allow all hard registers: only allow those that are allocatable. 2014-09-19 Segher Boessenkool * recog.c (scratch_operand): Do not simply allow all hard registers: only allow those that are allocatable. From-SVN: r215399 --- diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 261eda3bc95c..22b068d1cc56 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,8 @@ +2014-09-19 Segher Boessenkool + + * recog.c (scratch_operand): Do not simply allow all hard registers: + only allow those that are allocatable. + 2014-09-19 Felix Yang * cfgrtl.c ira.c ira-color.c ira-conflicts ira-lives.c: Update diff --git a/gcc/recog.c b/gcc/recog.c index b1838094cc1b..5ee3816c7cfd 100644 --- a/gcc/recog.c +++ b/gcc/recog.c @@ -1143,7 +1143,9 @@ scratch_operand (rtx op, enum machine_mode mode) return (GET_CODE (op) == SCRATCH || (REG_P (op) - && (lra_in_progress || REGNO (op) < FIRST_PSEUDO_REGISTER))); + && (lra_in_progress + || (REGNO (op) < FIRST_PSEUDO_REGISTER + && REGNO_REG_CLASS (REGNO (op)) != NO_REGS)))); } /* Return 1 if OP is a valid immediate operand for mode MODE.