diff options
author | matz <matz@138bc75d-0d04-0410-961f-82ee72b054a4> | 2010-03-22 16:28:51 +0000 |
---|---|---|
committer | matz <matz@138bc75d-0d04-0410-961f-82ee72b054a4> | 2010-03-22 16:28:51 +0000 |
commit | 70bb3c914b2caa213e1063a8a0960efca9593f88 (patch) | |
tree | f48c85db6997d5824270980a9eab9e75be570a0a /gcc | |
parent | 0bdba7760faceb03c5f42a9da1227e4bb4cc11fb (diff) | |
download | gcc-70bb3c914b2caa213e1063a8a0960efca9593f88.tar.gz |
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: svn+ssh://gcc.gnu.org/svn/gcc/trunk@157640 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc')
-rw-r--r-- | gcc/ChangeLog | 6 | ||||
-rw-r--r-- | gcc/recog.c | 8 | ||||
-rw-r--r-- | gcc/testsuite/ChangeLog | 5 | ||||
-rw-r--r-- | gcc/testsuite/gfortran.dg/pr43475.f90 | 14 |
4 files changed, 32 insertions, 1 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 5cff766695d..6b87dd11d8c 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,9 @@ +2010-03-22 Michael Matz <matz@suse.de> + + PR middle-end/43475 + * recog.c (validate_replace_rtx_group): Replace also in + REG_EQUAL and REG_EQUIV notes. + 2010-03-22 Richard Guenther <rguenther@suse.de> PR tree-optimization/43390 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. */ diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index a036f250806..e29c4c9ca43 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,8 @@ +2010-03-22 Michael Matz <matz@suse.de> + + PR middle-end/43475 + * gfortran.dg/pr43475.f90: New testcase. + 2010-03-22 Richard Guenther <rguenther@suse.de> PR tree-optimization/43390 diff --git a/gcc/testsuite/gfortran.dg/pr43475.f90 b/gcc/testsuite/gfortran.dg/pr43475.f90 new file mode 100644 index 00000000000..72c0d18348b --- /dev/null +++ b/gcc/testsuite/gfortran.dg/pr43475.f90 @@ -0,0 +1,14 @@ +! PR middle-end/43475 +! { dg-do compile } +! { dg-options "-O2" } +subroutine ss(w) + implicit none + integer :: w(:) + integer :: b,c,d + b = w(8) + c = 5 + d = 3 + call s1(c) + call s2(b+c) + call s3(w(b)) +end subroutine ss |