aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorRobert Suchanek <robert.suchanek@imgtec.com>2015-11-11 10:36:00 +0000
committerRobert Suchanek <rts@gcc.gnu.org>2015-11-11 10:36:00 +0000
commit394b24ea80626c5464f842f574a57547fb024ad6 (patch)
treebb106b1923b1a2acc453a0f8d67b5d3cce408431 /gcc
parent6eef39f15bb3ca2de1cddc0d9b48b8644b9d5abc (diff)
downloadgcc-394b24ea80626c5464f842f574a57547fb024ad6.zip
gcc-394b24ea80626c5464f842f574a57547fb024ad6.tar.gz
gcc-394b24ea80626c5464f842f574a57547fb024ad6.tar.bz2
Tighten up checks when tying chains.
gcc/ * regname.c (scan_rtx_reg): Check the matching number of consecutive registers when tying chains. (build_def_use): Move terminated_this_insn earlier in the function. From-SVN: r230149
Diffstat (limited to 'gcc')
-rw-r--r--gcc/ChangeLog6
-rw-r--r--gcc/regrename.c7
2 files changed, 10 insertions, 3 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index e3a0432..21ea2f0 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,3 +1,9 @@
+2015-11-11 Robert Suchanek <robert.suchanek@imgtec.com>
+
+ * regname.c (scan_rtx_reg): Check the matching number of consecutive
+ registers when tying chains.
+ (build_def_use): Move terminated_this_insn earlier in the function.
+
2015-11-10 Mike Frysinger <vapier@gentoo.org>
* configure.ac: Use = with test and not ==.
diff --git a/gcc/regrename.c b/gcc/regrename.c
index d727dd9..d41410a 100644
--- a/gcc/regrename.c
+++ b/gcc/regrename.c
@@ -1068,7 +1068,9 @@ scan_rtx_reg (rtx_insn *insn, rtx *loc, enum reg_class cl, enum scan_actions act
&& GET_CODE (pat) == SET
&& GET_CODE (SET_DEST (pat)) == REG
&& GET_CODE (SET_SRC (pat)) == REG
- && terminated_this_insn)
+ && terminated_this_insn
+ && terminated_this_insn->nregs
+ == REG_NREGS (recog_data.operand[1]))
{
gcc_assert (terminated_this_insn->regno
== REGNO (recog_data.operand[1]));
@@ -1593,6 +1595,7 @@ build_def_use (basic_block bb)
enum rtx_code set_code = SET;
enum rtx_code clobber_code = CLOBBER;
insn_rr_info *insn_info = NULL;
+ terminated_this_insn = NULL;
/* Process the insn, determining its effect on the def-use
chains and live hard registers. We perform the following
@@ -1749,8 +1752,6 @@ build_def_use (basic_block bb)
scan_rtx (insn, &XEXP (note, 0), ALL_REGS, mark_read,
OP_INOUT);
- terminated_this_insn = NULL;
-
/* Step 4: Close chains for registers that die here, unless
the register is mentioned in a REG_UNUSED note. In that
case we keep the chain open until step #7 below to ensure