rl78.c (move_elim_pass): Don't optimize away volatile memory references.

* config/rl78/rl78.c (move_elim_pass): Don't optimize away
volatile memory references.

From-SVN: r220151
This commit is contained in:
DJ Delorie 2015-01-26 23:07:54 -05:00 committed by DJ Delorie
parent 82a0fe9a1d
commit 1230f784cf
2 changed files with 11 additions and 1 deletions

View File

@ -1,3 +1,8 @@
2015-01-26 DJ Delorie <dj@redhat.com>
* config/rl78/rl78.c (move_elim_pass): Don't optimize away
volatile memory references.
2015-01-26 Oleg Endo <olegendo@gcc.gnu.org>
PR target/49263

View File

@ -222,7 +222,12 @@ move_elim_pass (void)
can eliminate the second SET. */
if (prev
&& rtx_equal_p (SET_DEST (prev), SET_SRC (set))
&& rtx_equal_p (SET_DEST (set), SET_SRC (prev)))
&& rtx_equal_p (SET_DEST (set), SET_SRC (prev))
/* ... and none of the operands are volatile. */
&& ! volatile_refs_p (SET_SRC (prev))
&& ! volatile_refs_p (SET_DEST (prev))
&& ! volatile_refs_p (SET_SRC (set))
&& ! volatile_refs_p (SET_DEST (set)))
{
if (dump_file)
fprintf (dump_file, " Delete insn %d because it is redundant\n",