aboutsummaryrefslogtreecommitdiff
path: root/gcc/recog.c
diff options
context:
space:
mode:
authorMichael Matz <matz@suse.de>2010-03-22 16:28:51 +0000
committerMichael Matz <matz@suse.de>2010-03-22 16:28:51 +0000
commit69ecc7bea81d3183c7453f6e8978faa771fccc79 (patch)
treef48c85db6997d5824270980a9eab9e75be570a0a /gcc/recog.c
parent1cf637c34cf0208937654c8465204502dc89aa44 (diff)
PR middle-end/43475
* recog.c (validate_replace_rtx_group): Replace also in REG_EQUAL and REG_EQUIV notes. testsuite/ * gfortran.dg/pr43475.f90: New testcase. git-svn-id: https://gcc.gnu.org/svn/gcc/trunk@157640 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/recog.c')
-rw-r--r--gcc/recog.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/gcc/recog.c b/gcc/recog.c
index 810270625a2..bc0b2782d38 100644
--- a/gcc/recog.c
+++ b/gcc/recog.c
@@ -787,12 +787,18 @@ validate_replace_rtx_part_nosimplify (rtx from, rtx to, rtx *where,
}
-/* Try replacing every occurrence of FROM in INSN with TO. */
+/* Try replacing every occurrence of FROM in INSN with TO. This also
+ will replace in REG_EQUAL and REG_EQUIV notes. */
void
validate_replace_rtx_group (rtx from, rtx to, rtx insn)
{
+ rtx note;
validate_replace_rtx_1 (&PATTERN (insn), from, to, insn, true);
+ for (note = REG_NOTES (insn); note; note = XEXP (note, 1))
+ if (REG_NOTE_KIND (note) == REG_EQUAL
+ || REG_NOTE_KIND (note) == REG_EQUIV)
+ validate_replace_rtx_1 (&XEXP (note, 0), from, to, insn, true);
}
/* Function called by note_uses to replace used subexpressions. */